AJAX

Overview

Asynchronous JavaScript and XML, known as AJAX, is the name given to a group of technologies that are now being brought together by web designers and developers to eliminate the start-stop-start-stop nature of web applications.

How AJAX Works

Traditionally a web application will work simply by submitting a form filled out by the user to a web server for processing, after which the server generates a new page and sends this back to the browser.

AJAX differs from this approach and is more efficient in that it is possible to retrieve only the data that is required from a web server. Using AJAX there is no need to download a whole new page.

AJAX is used to provide an intermediary between the browser and the server and allows a user’s interaction to happen asynchronously and independent of communication with the server. This means that the user is never left sitting around waiting for the server to do something.

Instead of using a HTTP request method, JavaScript is now used to instead to make a call to the AJAX engine that is loaded into the browser. The AJAX engine then decides whether the server needs to handle the action or whether it can handle the call itself. An AJAX engine will often be able to validate data itself, which helps to lessen the workload of the server. If the engine cannot handle the requests, then it communicates with the server on the user’s behalf, usually using XML.

Criticisms of AJAX

One major criticism of AJAX is that it relies on JavaScript to be enabled in the user’s browser. If JavaScript is disabled the application cannot be used. Because AJAX also runs in a browser, AJAX based applications must be rigorously tested on as many platforms as possible before launch to ensure that they will function properly for all users.

Developers must take care when developing with AJAX to ensure that issues involving network latency will not cause problems for end users. Developers must carefully make sure that data is correctly pre-loaded for the user, and users must be informed when the AJAX engine is communicating with the server (developers often choose to display a “loading” or “please wait” message) or the user may not expect or understand why there is a delay in the application interface.

Who has been using AJAX?

Google is a heavy user and believer in AJAX – most of Google’s major products released within the past 18 months – 2 years have relied upon AJAX. These include GMail, Google Maps, Google Suggest and Google Reader.

Flickr is an example of another popular site that relies on AJAX.

Browsers that support AJAX

The following browsers all support AJAX, although it is not a definitive list and does not include every browser that does.

Technologies based on AJAX

Despite AJAX being a relatively new concept there are already other technologies appearing based upon it, such as AFLAX.

AFLAX, which stands for “Asynchronous Flash and XML”, is a development technique of combining AJAX and Flash to create even more dynamic web based applications.

Tags

, , ,

Bookmark on del.icio.us

Leave a Reply