Even if you’ve never heard of AJAX, you’ve very likely experienced it. AJAX is the technology that makes pieces of web pages update smoothly. Google Maps is a prime example of AJAX in action. You give Google a street address, it draws a map, and you can drag the map in all directions. Without AJAX, if you wanted to “drag” the map, you’d have to click a button to shift the map east, west, north or south. Then, the whole web page would redraw itself. The map navigation process is much smoother thanks to AJAX.
Note that there are two things going in when AJAX is used. First, a piece of a web page needs to be updated. This is handled by rewriting what’s called the Document Object Model (DOM) of the web page. the DOM contains the HTML of the web page and the structure, or organization, of the page. The structure has to do with HTML tags, the text inside of tags, and which tags are embedded within which other tags. AJAX manipulates the DOM, adding or removing rows from HTML tables, or editing HTML on the fly in other ways. Only isolated parts of the DOM are manipulated and only those affected parts of the HTML page are redrawn. The second thing that needs to happen when AJAX is employed in a web application is on the server side. The server must, in some cases, update relevant information. If a user is deleting a mail message in Gmail, for example, which utilizes AJAX heavily, then not only must the list of mail messages be redrawn to omit the just deleted message, but the Gmail application must update its database of mail messages to mark a particular message as being deleted.
While AJAX is a wonderful way to enhance a user’s federated search experience, there are several things that developers need to consider. The first consideration is that AJAX programming is more difficult than the simpler style of programming where the entire HTML page is refreshed whenever anything on it changes. A second consideration is that while AJAX is, in theory, browser independent, in reality, no complex application is browser independent. An AJAX programmer will need to be especially careful to test all AJAX-related functionality against all support browsers and may need to code special handling of certain functions for different browsers.
Note: I wrote a four-part series on content access basics. You can find links to these, and other, articles in the Articles page of this blog.
Tags: federated search