AJAX Is No Overnight Success

 
 
By Peter Coffee  |  Posted 2006-01-16 Email Print this article Print
 
 
 
 
 
 
 

Opinion: This one-year-old label intensifies interest but obscures options and burdens.

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.

The term AJAX has its origins in "Asynchronous JavaScript and XML." The first word in that spellout is the most important, while the others should not be taken too literally.

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."

Even Garrett has stressed that the promise of AJAX is a potential rather than intrinsic improvement in the users Web experience. "AJAX applications inevitably involve running complex JavaScript code on the client. Making that complex code efficient and bug-free is not a task to be taken lightly," Garrett warned in his AJAX essay.

Developers should also consider the performance implications: As bandwidth stops being the limiting factor, eWEEK Labs is already seeing rich AJAX applications that expose processor speed and JavaScript implementation issues as new bottlenecks to Web site interaction.

Handheld devices, with their modest processor and memory resources, may disappoint users who first encounter AJAX responsiveness on much faster desktops and laptops.

Google and BlackBerry maker RIM have signed an agreement that will allow users to access Google Talk and Google Maps on the go. Click here to read more. Advocates of standards-based development have noted the unfortunate history of JavaScript, the "J" in AJAX. "In the past, browsers made a distinct point of being as incompatible as possible, and they gleefully ignored standards such as W3C [World Wide Web Consortium] recommendations," states the JavaScript Manifesto of the DOM Scripting Task Force of the Web Standards Project. Experience at eWEEK Labs confirms continued browser-specific variation in AJAX application behaviors, including both display and printing.

It requires a real effort for developers to skirt the browser-war debris that clutters the AJAX battlefield, as noted by Brett McLaughlin of OReilly Media Inc. in a December tutorial published on IBMs DeveloperWorks site. The defining act of an AJAX application is the creation of a JavaScript XMLHttpRequest object, whose interfaces enable behind-the-scenes communication with the server. Different browsers create that object using different incantations. McLaughlin urges developers to encapsulate the differences in JavaScript exception-handling mechanisms, coming up for air with their chosen variable name bound to a proper XMLHttpRequest object in any AJAX-capable browser.

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.

Connection management issues that were previously the problem of browser designers may require an AJAX application to provide specific JavaScript logic—especially if an application offers multiple tabbed panes or other user interface elements whose updates should proceed in parallel but with priority given to what the user is currently seeing.

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.

Next page: AJAX faces cultural obstacles too.


 
 
 
 
Peter Coffee is Director of Platform Research at salesforce.com, where he serves as a liaison with the developer community to define the opportunity and clarify developers' technical requirements on the company's evolving Apex Platform. Peter previously spent 18 years with eWEEK (formerly PC Week), the national news magazine of enterprise technology practice, where he reviewed software development tools and methods and wrote regular columns on emerging technologies and professional community issues.Before he began writing full-time in 1989, Peter spent eleven years in technical and management positions at Exxon and The Aerospace Corporation, including management of the latter company's first desktop computing planning team and applied research in applications of artificial intelligence techniques. He holds an engineering degree from MIT and an MBA from Pepperdine University, he has held teaching appointments in computer science, business analytics and information systems management at Pepperdine, UCLA, and Chapman College.
 
 
 
 
 
 
 

Submit a Comment

Loading Comments...

 
Manage your Newsletters: Login   Register My Newsletters























 
 
 
 
 
 
 
 
 
 
 
Rocket Fuel