Emergic: Rajesh Jain's Blog

Emergic: Rajesh Jain's Blog header image 2

More on Ajax

March 26th, 2005 · No Comments

Diego Duval has a nice comparison between the old way and the new way:

The basic concept is a simple one: turn a web browser into a more responsive client by making asynchronous requests to the server on another thread, handled by Javascript (there’s nothing that says that this couldn’t be done with, say, Flash or Java, but Javascript is a more universal platform on which to implement this). This separate thread can create the appearance of a more responsive UI by managing the requests in a manner transparent to the browser’s default navigation mechanisms (e.g., Back, Forward, etc.).

In the early 90’s, the buzzwords du jour were “client/server systems”. These were systems where PCs actually performed a certain amount of processing on data obtained and passed back through tightly coupled connections (typically TCP). As important as servers were in that scheme, one of the keys of client/server computing was that the client maintained most of its state. True, the server did maintain a certain amount of state and logic (just keeping state on a TCP connection would count, for instance), but it was the client that drove the interaction, that kept information on a user’s location in the dataflow, etc. The web, however, changed all that.

If the web thin client model decoupled UI from processing (at least relative to client/server), AJAX allows for a flexible “free form coupling” when necessary. By pulling more data-management logic back into the client, AJAX goes back to a more traditional client-server model. True, the server could maintain state if necessary, and undoubtedly some AJAX-powered applications, such as Gmail, do so to some extent. But consider the difference between Google maps and, say, Mapquest. Mapquest stores the current view’s data in hidden fields in the page, which have to be sent back to the server on each request. While this is, speaking strictly, stateless operation, the server has to re-create the state of the client for every request, modify it as necessary, and then send it back. Google maps, on the other hand, can keep the state on the client, requesting new data from the server as the user moves around the map, zooms, etc. The result? The server is freed from creating/keeping/updating state and goes back to doing what it does really well, which is serve data.

Diego’s conclusion: “So does this mean that we’re going back to client/server? Doubtful. There is no silver bullet. As cool as AJAX apps (like Google Suggest, Google maps, or A9) are, I suspect that AJAX’s greater value will be to add another tool to the toolset, allowing for hybrid thin client/fat client applications that improve web UI interactions and bring us to the next level of distributed applications.”

Another post has more.

Tags: Software

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment