Within the last couple of years, a phrase has begun to emerge in the digital context of the internet:
(Hopefully the enigmatic blue gives it a nice effect.) Some have sneered at it, others poked it with a stick, many started abusing the phrase because they thought it made them sound cool (like “The Cloud”, oohhhhh! Servers!), and, lastly, many programmers bemoaned that they’d been making them for years.
So what is a Web Application?
Simply, a web application is an executable that sits happily on a server somewhere, and is accessed via web. (Huh, sort of sounds less glorious when put that way.) This definition is almost unhelpful, however, as most people hardly even stop to consider how a web page is constructed at all, much less where it comes from. I might as well say that it’s made by tiny gnomes that live in a server far, far away. Who cares? The real question is: “Why? what’s the advantage?” I’m glad you asked! Let’s work our way up.
How does a normal Web Page work?
Most people have heard the acronym, HTML — or Hypertext Markup Language. What the heck is it? In short, it’s the language of the internet. Everything visual must be broken down to HTML in order for your browser to display it on your screen. So let’s examine some of this fancy stuff:
Let’s say that code is sitting on a file far, far away on some server. You direct your browser to the address of the site, and it sends the content of the file to your browser. The browser receives it and does what’s called parsing the text — that means it sifts through it to pull out what’s meaningful to itself. It takes the parsed contents and places them in what’s called the Document Object Model (DOM), which is an object structure the browser uses to begin constructing the site.
So in the above example, a Head object would be created, and it has a property called Title which is now “Hi there!”. Meanwhile, the body object has a paragraph property that contains “Hello World!”. It’s not too bad, but it get’s really ugly on a complicated site. Right-click on this page, view the source, and try to imagine that in the DOM. Not only that, but how do you resolve mistakes? Do you break everything and stop, or try to work around it? It’s a nightmare, and for this reason parsing was, for a long time, non-standard — every browser had its own way of building the DOM. That’s why sites don’t look the same on old browsers. Bug I digress slightly.
So what about Web Applications?!
Why isn’t the whole internet Web Applications?
Well, Web Applications are cool and capable, but they do have drawbacks. For one, it takes almost nothing for a server to just spit out the content of some files to your browser; but to have an application running, that costs considerably more (relatively speaking) memory and processor power. And hosts make you pay for it, which can be expensive. The second issue is that there’s quite a bit more traffic between the browser and server, and people like their browsers super responsive. In this digital age of microwaves and jukeboxes, people start tapping their foot after two seconds. (In fact, many people haven’t even read this post this far because it takes too long!) Now as internet speeds increase, this isn’t as much of an issue, which is really why Web Applications are proliferating now. They’re not new, but the technology to support them effectively is. Also, HTML5 is a great foundation for more capable HTML with less overhead, as the browser itself is more capable.
The last reason the internet isn’t about to suddenly become all Web Applications, is that it’s simply overkill. Most people don’t want to have to write a program just to blog about stuff, tell about their business, receive donations, etc. It’s really a niche, presently, and it’s being explored.
Alright, so what’s an example, then?
Recently, I wrote a Web Application to run on a local server (you can’t access it from the internet). I had a server that collected data from testing equipment onto a PostgreSQL database. So a way was needed to retrieve the data from the server to be able to be formed into reports and the like. Many people might be doing this at once.
Years ago, that would’ve meant writing a program to be distributed to every employee that planned on generating/viewing reports. That would entail quite a bit of work for cross-platform deployment, and there’s always the nuisance of distribution. If I make an update, every employee needs a way of updating their version.
But, as I scratched my chinny chin chin, I thought, “Hey, I already have a server for the database, what if I just expanded the server to also have a Web Application that people could just connect to? Wouldn’t that also make the database queries faster since it’s on the same machine?” I was right! It was a perfect match, and I got to work. I ended up producing, project name, the “Tribo Reader 5000″ — a mighty name, I felt. It ran extremely well over the network, hardly used up any browser memory (around 50mb cap), queried quickly, and made distribution painless. It also meant that mobile devices like droids, iPhones, and iPads could log on and use it! Snap! And it all just worked because I’m taking advantage of the fact that most electronics these days have a browser! I was very pleased with the outcome.
So Web Application really is a welcomed old friend to the world of the internet. It does server a purpose, and will likely continue to grow over the next couple years. Creating them is easier than it used to be (e.g. Real Studio Web Edition), but developers need to be careful not to overkill a project. Also, be patient, because HTML5 isn’t complete yet and that makes the compilation into web-code for Web Apps a bit difficult. But no doubt they’re here to last, and hosts will have to respond to the sudden rise in requests for VPS hosting in fair price ranges.
Developers, play around, they’re pretty neat. Feel free to contact me and ask how I set up the Ubuntu server to run the Web App. There are some gotchas, and I’ll be posting a bit more on this in the future.
Users, try to use the phrase correctly. Tell someone how much you’ve learned and shake your head with all-knowing condescension the next time someone glibly tosses the phrase.