I recently finished evaluating Microsoft's ASP .NET AJAX Extension toolkit (also called Atlas) and have previously dabbled with hand-coded AJAX features. Let me begin by saying I am highly impressed with Microsoft's AJAX library. It indeed displays stunning results, hidden asynchronous post-backs, and web page effects. Yet when I asked a non-techie user to view a sample application with AJAX, they simply replied with "So what? I don't see the difference". And that's the problem.
A Fancy Form Submit
At its core, AJAX is all about bypassing the browser-refresh on a post-back. That is, when you click the Submit button in a web page, you don't hear the web browser make a little click sound, you don't see the status bar change, and you don't see the web page reload. Ok, but for non-techie users, they don't notice that stuff anyway. All they care about is that their data displays after clicking Submit. So why the AJAX craze and does the world really need it?
Let me elaborate on several factors I fear with AJAX.
1. AJAX does not make anything easier.
The whole point of a new technology becoming popular and used in everyday applications is to make our lives easier. Windows replaced the green-screen not because it was cooler, but because it was easier to click an icon with a mouse than to memorize a series of commands to type at a prompt. Does bypassing a browser-refresh make anything easier? If anything, it makes things more confusing to the user. It also makes things more complicated for the programmer. Asynchronous events are always more confusing.
2. AJAX does nothing we can't already do.
AJAX can change html in the web page on the fly and perform invisible post-backs. But Flash has been doing this for years. AJAX may not require the Macromedia plug-in, but is bypassing the security issue of installing the plug-in the only benefit here?
4. AJAX is buggy.
Almost all implementations of AJAX web applications seem to contain at least a few bugs. By bugs, I am refering to misplaced objects during animation, buttons not re-enabling, windows unable to be closed without clicking several times. This also includes variations in operation depending on the web browser. You can also throw in issues regarding latency and dial-up users vs broadband. Reliability is a big strike. Sure, this can be resolved with work towards a standard bug-free multi-browser compliant AJAX library, but is it worth it?
5. Sites abuse AJAX.
Too many sites are using AJAX to dim windows, animate messages, show inline text where an alert box or new page would be simpler, spy on user interaction with the web site, and more. This only creates confusion for users. If the web application has a real neccessity for a draggable window, then by all means, use AJAX (or rather DHTML) to include one. However, if the only point of including the feature is to look cool, maybe you could skip it.
6. The Privacy Factor.
A technique for tracking web site metrics, which is growing in popularity, is using AJAX to spy on users who visit a web site. Anything can be tracked, from the obvious page hits and link clicks tothe not so obvious clicks on images, mouse movement on the page, mouse movement over an image or object, and even a timed heartbeat giving away how long a user remains on a page. This is certainly a different kind of privacy risk posed by AJAX than most of us are used to.
Don't get me wrong. I am all for advancing useful technologies. I am just concerned with the popularity and hype of AJAX compared with how practical it is to actually use it. Sites like Digg, Reddit, and Yahoo have implemented AJAX, but isn't it really just bells and whistles? On Digg, clicking Login slowly fades in a username/password box. Reddit uses the grey method where the background of the web page greys out to show a white login box in the center of the page.
The non-techie user would be just as happy (maybe even more happy) to see a new page appear with a clear username/password box to perform the login.
AJAX's Promising Features
There are some uses of AJAX which show a great deal of promise to push web applications to the point where they antiquate the desktop apps. Of course, the look and feel of a web application compared with a desktop one is important. YouOS has an amazing display of AJAX; moving windows around the web page, loading data, and running multiple processes all within the web browser. This is a more practical implementation of AJAX. Yahoo's roll-over help boxes are a convenient use of DHTML (which may as well be considered in the AJAX world).
If developers can weigh their options more strictly regarding the usage of AJAX and the business world can reduce the hype, maybe we can put it to some good use. Until then, let's really consider how important AJAX is to the future of web application development .. or could we be focusing on something better?