Wednesday, September 20, 2006

Ajax

Ajax is at the heart of a quiet revolution that is sweeping the Web. Many people have seen, and been impressed by, its effects; fewer have heard of it.

Ajax is not a single technology; rather it is a cobbling together of several disparate tools, adapting them in ways they were not designed to work. In other words, it's a kludge, but it's one that makes dynamic Web pages look a lot more like desk-top applications than they ever did before. It will never be what Java could have been without the Sun/Microsoft pissing contest, but it's the best we've got for now.

The term "Ajax" seems to have been coined by Jesse James Garrett, and one of its earliest uses was in his February 2005 essay for Adaptive Path, where he says it "is shorthand for Asynchronous JavaScript + XML". He cites Google Maps as one of the best-known examples of Ajax technology, and references Joel Webber's blog as simple as possible, but no simpler for an explanation of how it works.

Throughout 2005, the Web was abuzz with tales of Ajax. In September of that year, venture capitalist Dan Grossman in his blog A Venture Forth listed his Top 10 Ajax Applications, followed swiftly by his
Top 10 Ajax Applications (Part 2).

In 2006, the novelty wore off, but quietly in the background people have continued developing their Ajax applications. "Applications" is the appropriate word, because of the way Ajax brings the Web and the desktop closer together than ever before. When Protopage featured in Dan Grossman's original list , it was very close to being the Web application I had always wanted. It has been steadily refined ever since, and my own Protopage (with its public interface at http://www.protopage.com/david.mclaughlin) is now one of my favourite Web portals.

People who care about accessibility may have concerns about Ajax. The most obvious one is that it relies on JavaScript, which has a different flavour for every browser on the market. Microsoft's version isn't even called JavaScript, but JScript. But there is a standard, ECMAScript, which provides cross-browser compatibility for a significant subset of JavaScript and JScript.

Another concern is that Ajax applications sometimes "break the Back button", but I fear there is an element of cargo cult thinking behind this taboo. When using a browser to step through a series of static pages, it is obvious what the Back button should do. When running an application within a browser, it is no longer obvious: should it go back to the previous page, or to some previous state within the current application? Ajax developers should give careful thought (and user testing) to what the back button should do in any given situation.

Further reading



Ajax (programming) in Wikipedia
Ajax in SWiK

No comments: