Its almost time to send first-birthday-party invitations for AJAX, a catchy label (though not a novel idea) that has quickly become the banner buzzword of standards-based interactive applications for the Web. The benefits of AJAX are far more obvious than its burdens on developers, and eWEEK Labs therefore offers this perspective on the choices that developers face.
An AJAX application combines behind-the-scenes server interactions with client-side user interface rendering. “The user is never staring at a blank browser window and an hourglass icon, waiting around for the server to do something,” said Jesse James Garrett, co-founder of San Francisco-based Web consultancy Adaptive Path LLC., in his widely cited article propounding the AJAX label.
The result, as clearly apparent in AJAX applications such as Google Inc.s Google Maps, can be a Web application that looks and behaves much more like a conventional “thick client” app—one that responds dynamically to user actions, rather than waiting for an explicit “submit” command.
Note well the qualifier “can be.”
Handheld devices, with their modest processor and memory resources, may disappoint users who first encounter AJAX responsiveness on much faster desktops and laptops.
Once the asynchronous engine is started, the challenge for developers is to make an AJAX application better than a Web 1.0 ancestor without being jarringly different. For example, Web users are accustomed to the idea that if they dont like what theyve just done, the browsers Back button will get them to a previous state from which they can try something else. An AJAX application should not deprive the user of this same sense of security. Web application developers must therefore implement “undo” to a degree that was not previously their problem.
Web users also expect to be able to copy a URL and send it to another user, who will then be able to navigate directly to the same page in the same state. AJAX applications must make explicit provisions for this, generating and displaying a state-representing URL on request and interpreting that URL correctly when it is received.
AJAX updating of Web-page elements can be too seamless if a user doesnt even notice that something has changed. This requires AJAX application designers to consider various means (such as temporary color highlights or animations) for briefly calling attention to new data—as opposed to conventional Web applications, whose content changes only when the user asks for that to happen.
AJAX faces cultural obstacles
Other barriers to AJAX development are as much cultural as technical. The perception that real programmers write [insert technology here] applications, with the insertion being chosen from .Net, Java or other technology du jour, may be entrenched in a development shop.
Developers may even argue that the generation beyond AJAX is already being defined by Microsoft Corp.s .Net languages and frameworks—specifically, the presentation and communication foundations of Microsofts forthcoming Windows Vista. This platform offers developers the prospect of powerful asynchronous communication mechanisms plus engaging client-side interaction, freed from the confines of a Web browser. One could argue that AJAX takes aim at the problems of browser-based application development, just as the developer community prepares to leave the browser behind.
Googles high profile has contributed to an aura of fairy dust surrounding AJAX, making it seem both more powerful and less risky than it may prove to be in the hands of any but the most talented developers. But as Sophocles wrote in 440 B.C., “Ever do I behold thee scheming to snatch some vantage oer thy foes. Skilled in the chase thou seemest. Say what eager quest is thine, that I who know may give thee light.” Thats Athenas opening speech in the classic play “Ajax.”
Peter Coffee can be reached at [email protected]