The difference between a web site and an application is that an application is more dynamic, more responsive, to the user. A traditional web site is a set of pages you browse through, like an online catalog or brochure. A web application needs to be more interactive in two ways: By having a richer graphical interface, and by having real-time data. Here’s how.
A richer graphical interface
If you can accept targeting your application only at Firefox, for example for an in-house app, then an alternative is to build it as a Firefox extension.
AJAX has given us more responsive web applications, by allowing them to fetch data from a server programmatically. This is what gmail does to check if you have new e-mail. AJAX, or more correctly the browser XmlHttpRequest object, solves the problem of a client fetching data from the server., but it does not allow a server to tell a client that there is new data to fetch. Currently most servers will just check at regular intervals. There are currently two ways to allow the server to push data to the client.
You can trick the browser into keeping your HTTP connection connected, and receive data this way. There are many very nasty ways of doing this, collectively known as Comet.
Or, you can allow your web application to chat, using IM, with your server, or with anything else on the XMPP network. This is a fantastic way of making your app ‘connected’, receiving live data about anything you care to send it. Other people are saying this better than me, such as Matt Tucker here – a less technical summary is here.
There is an XMPP library for Flex, called XIFF. I’ve blogged some documentation about using XIFF.
Applications that just happen to come from the web
So, what can a desktop client do that a browser originated one can’t?
Drag and drop from the OS, for example to upload a file, is still difficult. In Firefox the dragdropupload plugin makes this easy. In IE there are some ActiveX’s. For a cross-browser solution you have to turn to Java, see here drag drop file uploading in Java. I wish Flex / Flash did this.
Desktop integration, such as minimizing your application to the taskbar. If you need strong desktop integration, you could use Mozilla’s Prism, or write an Adobe AIR application. In most cases launching your app from a button in the browser toolbar instead of from the OS menu doesn’t make a difference to the user.
Work offline. If a user is offline, they aren’t getting their e-mail, can’t get to their network shares. They will be quite unhappy. The fact they can’t access your application will likely be far down their upset list, so for most applications this doesn’t matter much. For those apps where it does matter, there is Google Gears which is wrapped by the Dojo offline toolkit. Firefox 3 also has offline support.
Let’s be sensible now
Yesterday: cgi-bin/submit.pl. Tomorrow: the world.