Webreakstuff's blog on design, development and strategy. Click here to subscribe.

Tackling XMLHttpRequest (Ajax)

Fred Oliveira on March 21, 2005

Unless you’ve been under a rock for the last 3 or 4 months or you’ve got nothing to do with web development, you’ve heard about it out there. XMLHttpRequest (only one of the faces of Ajax, but probably the most important) is causing a massive hype. Why? Because it allows developers to create web applications that respond to user interaction like a desktop app would.

Instead of going through weird explanations, a few examples are GMail’s interface, the recently yahoo-acquired oddpost and A9 search at amazon. Whats common about all those? The page instantly responds to user requests like searching for pages, opening an email message, etc, requiring no browser refreshes. If you’re interested in why that happens, the great guys over at Adaptive Path wrote a pretty interesting essay on Ajax that you should definitely have a look at.

Explanation: Basically instead of having the server and client communicate only when the user clicks something, ajax provides a third layer between client and server that communicates with the server and maintains the page updated on the fly. Think of it as the middleware that gets your data and puts it on screen instantaneously, without requiring a page refresh.

Using Ruby on Rails that I’ve covered before, I’ve began to deploy ajax-based sollutions into some of my current projects, and I must say this is fascinating turf. It ain’t about exploring a new technology (because neither Javascript, XML or the DOM are new), but about using existing technologies to build what you might call a glimpse of the future. More on my experiences with Ajax in the future.

Oh, and if you’re (still) using PHP to develop your web applications there are already a couple of helping classes for Ajax-deployment: sajax and jpspan. Have a look at those too.


Sorry, the comment form is closed at this time.