Web Development: Introduction to Ajax

Published on Jun 23, 2009   //  Development
Off

Web Development

Ajax (which stands for Asynchronous Javascript and XML) is the technology behind many “Web 2.0″ applications. Ajax is used to exchange data with the server in the background, without the need to refresh the page. Ajax creates a more seamless experience for the user, making the web application feel more like a desktop application.

Ajax is used extentively in many of the websites you (probably) visit daily. Web sites such as Gmail, Google Reader, Twitter and even the administration of WordPress using Ajax throughout. Without Ajax, these web sites would be much slower and clunkier to use. Which would, effectively, ruin the simulated experience of using a desktop application.

Ajax’s concept is fairly simple. Using Javascript, data is sent or requested to/from a server, which then returns back something. Still using Javascript, that return from the server is then used to replace (or add to) what the current page is displaying. Basically you can change the whole page, without requiring the page to reload. Ajax is invisible to the user, and most actions can be carried out in less than one second, recreating the desktop experience – on the web.

However, Ajax exists differently in different browsers, creating a lot of extra cross-browser scripting required in Javascript. To make Ajax seem less daunting, and easier to achieve, we’ll be showing you how to do it in jQuery. jQuery greatly simplifies the process, making it easier for you.