“It all clicked in my head the middle of 2004,” Lackner says. “I started trying to add AJAX components to every Web app I worked on.”
A new kind of app
AdaptivePath’s Jesse James Garrett, who coined the AJAX acronym in an essay written in February, says that the response has been surprising. “Right now, it’s all so new that what we’ve got is a lot of excitement,” he says.
The excitement is understandable when you consider the advantages AJAX brings. For one thing, it greatly simplifies software distribution. Browsers load AJAX applications automatically. Customers are often reluctant to install custom applications, but most people can be convinced to visit a Web site.
David Heinemeier Hansson, a programmer at 37signals, says he’s concentrating on removing the lag time when a user submits a form. “If you have a Weblog and you add a comment, it will be updated on the server side in the background. Whenever you need to add or change content, you can do it without reloading.”
“For me, it’s not about building something big, it’s about making sure that the experience is right for the right people,” says Jason Fried, president of 37signals.
Browser problems persist
Enthusiasm for these new techniques, however, is usually tempered by reality. There are few good tools for AJAX development, the platform can be unstable, and adherence to standards is inconsistent. Even the biggest proponents complain about differences between Web browsers and concede that they don’t understand the best way to add many interactive features. What’s more, these new capabilities can confuse users who don’t expect the features and, in some cases, can even open up new security gaps.
Some of the newest browsers offer stable platforms for using XSLT (XSL Transformation), but the details seem to be fluid. There are big differences in the way IE 5.0, 5.5, and 6.0 handled namespaces. Mozilla 1.8 now shares many of the same capabilities, but earlier versions don’t.
Programmers are forced to smooth over some of these ambiguities by building custom loaders that match the code to the browser version. Rob Brown, an early AJAX developer and creator of the Firefox plug-in Aardvark, is optimistic. “Luckily, most browser differences can be fairly easily encapsulated into a few utility functions, and the ‘meat’ of your AJAX application can be free from ugly conditional code,” he says.
But these contortions can be painful, and some are simply abandoning earlier browsers. “We’re working on a project now called Backpack and it’s going to be one of the most advanced AJAX apps outside of Gmail,” 37signals’ Fried says. “We made the decision to just say no to IE 5. It was a conscious decision we made. It’s about time.”
This same challenge faces many enterprise designers. If a Web application will only be used internally, an enterprise architect can reasonably assume that every browser in the company meets a certain specification. Such a uniform infrastructure is much easier for programmers. But a company that distributes Web applications to customers can’t make the same assumptions. There will always be some customers running old versions of browsers.
The appearance of new glitches such as these requires Web designers to think twice about new features. Browser users have come to understand the way traditional Web applications work. They have been warned many times, for example, that clicking a button twice could create a double charge on their credit card. AJAX applications break many of those assumptions.
“People are used to clicking a check box and confirming things. Now you don’t have to. That introduces some confusion,” 37signals’ Fried explains. “Now in some places there’s a button and in some places there isn’t. There are a lot of pitfalls, but they’re not insurmountable by any means.”
Will AJAX prevail?
Some companies see an opportunity here. Thomas Lackner’s development group at ModernMethod is rolling some of its development efforts into an open-source library Lackner calls SAJAX, short for Simple AJAX. JackBe, on the other hand, sells a collection of small libraries that abstract away many browser incompatibilities. A programmer can add Excel-like spreadsheets or forms to a Web page and the JackBe libraries will handle much of the interaction with the client.