Web applications are fun to build. They are like the fancy sportscar of Web sites. Web applications allow the designer and developer to get together and solve a problem for their customers that the customers might not have even know they had. That's how the blogging tools like MovableType and Blogger came about after all. I mean, before Blogger, did you know you needed an online tool to build your Web site blog?
But most Web applications are slow and tedious. Even the fastest of them has lots of free time for your customers to go get a coffee, work on their dog training, or (worst of all) head off to a faster Web site. It's that dreaded hourglass! You click a link and the hourglass appears as the Web application consults the server and the server thinks about what it's going to send back to you.
Ajax is Here to Change That
What is Ajax?
Ajax is a way of developing Web applications that combines:
- XHTML and CSS standards based presentation
- Interaction with the page through the DOM
- Data interchange with XML and XSLT
- Asynchronous data retrieval with XMLHttpRequest
In the traditional Web application, the interaction between the customer and the server goes like this:
- Customer accesses Web application
- Server processes request and sends data to the browser while the customer waits
- Customer clicks on a link or interacts with the application
- Server processes request and sends data back to the browser while the customer waits
There is a lot of customer waiting.
Ajax Acts as an Intermediary
This is the key. In standard Web applications, the interaction between the customer and the server is synchronous. This means that one has to happen after the other. If a customer clicks a link, the request is sent to the server, which then sends the results back.
Ajax is Not New Technology
Ajax is instead a new way of looking at technology that is already mature and stable. If you're designing Web applications right now, why aren't you using Ajax? Your customers will thank you, and frankly, it's just fun!