Google suggests AJAX

Rich internet application developers spoilt for choice

There are several candidates striving for mindshare in the rich internet application development environment. One approach goes by the acronym AJAX, and the leading proponent of that approach is Google, which uses AJAX in its Mail, Maps and Suggest products. (For those who have not experienced the phenomenal performance of Google Suggest, perhaps they should google “Google Suggest” and try it.)

AJAX stands for Asynchronous JavaScript and XML. It is an approach with a number of parts that are standards-based:

  • Presentation is done in the browser using HTML and CSS in frames.
  • Presentation logic and navigation is done with JavaScript.
  • Data interchange is done asynchronously with XMLHTTPRequest object.

The XMLHTTPRequest object is programmed in JavaScript (or, optionally, VBScript). First one needs to assign a function to respond to incoming data, and then pass it a URL to fetch remotely. It will execute the function when a reply is received so that it can process the incoming data. It is worth noting that this asynchronous model gives developers a real headache the first time they are confronted with it: the temptation is to do a call to the server and then go into a loop waiting for the data. However, that path leads to timeouts, thread blocks, hung browsers and, eventually, madness.

The main and perhaps only advantage of AJAX is the richer client experience that can be supported. The user is no longer constrained by the pedestrian pace of a page-based interaction model. They can drag-n-drop, sort columns and resize widgets just like in a real desktop app.

The disadvantages are numerous. It is more complex to program and it is very easy to get bogged down in cross-browser incompatibility issues. The development and debugging tools are somewhat fragmentary. The search engines find it hard to navigate which is quite ironic given the heavy investment by Google into developing AJAX techniques.

In spite of all these problems, our customers are going to drive us there in the fullness of time. It can only be hoped that the technical problems are ironed out before we all turn into JavaScripters!

Reynolds is an Auckland developer. Contact him at chris_reynolds@computerworld.co.nz

Join the newsletter!

Error: Please check your email address.

More about Google

Show Comments

Market Place

[]