by Juan C. DÃ¼rsteler
[message nº 177]
|This is the name given to a set of web technologies that promise to make the user experience advance towards more interactive surroundings and closer to the immediacy of the work within the desktop metaphor environment, with all the advantages of Internet.
When we connect to a web site, be it static or dynamic, we are used to moving through hyperlinks that, once clicked upon, cancel the current page and show, after a brief or sometimes not so brief lapse, a new page. Unlike what happens in the desktop metaphor of our computer, where the applications respond very quickly once loaded and we are able to interact in a very fluid way, web pages require the downloading of a new page for most of the operations, for example zooms or links to new pages.
- HTML or XHTML and CSS (Cascading Style Sheets), as most web applications do.
- XML and XLST to provide the asynchronous data exchange with web server.
The operating model of Ajax transforms the usual way the data is processed in web applications. Let's see how it's done
Traditional Web Aplication
In a typical web application the browser interacts with the user in his or her computer. When the interaction is initiated, an HTML page is downloaded from the server following a request of the browser. When the user clicks on a hyperlink, fills in a form or issues a query, the browser builds up an http request that is sent to the web server that can be placed elsewhere in the world.Â
With this information the server performs the operation requested, that can involve querying a database, producing a chart or performing a complex computation, and builds a new page using HTML and possibly CSS. Alternatively it can simply identify which preexistent page fits the operation. In any case it erases the former page and substitutes it with the new one. In many cases the new page is very similar to the former one, maybe with just a field validated or a graphic zoomed in or out.
The (well known) problem with this model is that while the server is busy processing our request (among many others) we are just waiting patiently forthe arrival of the new page, what very often doesn't happen very quickly. Everything happens in the server side while in the user side the browser just waits.
AsÂ Jesse James Garrett explains in his very interesting and referential article about Ajax in this case the model changes in the following way:
This way interaction becomes unlinked from the server (it becomes asynchronous, as the A of Ajax states) and while we are interacting with the application, the browser can communicate with the server without us waiting for the end of the data transmission.
Usually the first Ajax application is considered to be the one that contains the web client of Microsoft Exchange Server. Nevertheless the one who is making a deep and systematic use of this interaction model is our old friend Google, that incorporates it (in a brilliant way I dare to say) in applications like
But not only Google is making proficient use of Ajax, other companies are gradually introducing this system. Among them you find, of course, Amazon with its A9 search engine or Flickr, an online photo album, among many others. See the Wikipedia entry for Ajax to get a more extended listing.
An interesting example is WritelyÂ an online word processor that can be used from anywhere in the world (as any web application) but whose interaction is so fluid and familiar like any other word processor run directly in our computer.
Ajax is an interesting proposal that brings closer together the rigid and not so interactive world of the web to the more flexible and friendly one of the desktop metaphor. Not yet being the definitive proposal it provides a significant methodological and technical advance that begins to enable the union of the best of two worlds: the ubiquity and simplicity of the web with the interactivity of the desktop.
Links of this issue: