The term AJAX was coined in 2005. It originated in the Java community and was used in reference
to a range of related technologies for implementing forms of remote scripting. Today,
any form of remote scripting is generally tagged with the AJAX prefix. Modern AJAX-based
solutions for the Windows platform are based on the XMLHttpRequest object. Google Maps
and Gmail are the two most popular Web applications designed according to AJAX patterns
and techniques. For AJAX, these were certainly the killer applications that established its usefulness and showed its potential.
Two combined elements make an AJAX application live and thrive. On one hand, you need to
serve users fresh data retrieved on the server. On the other hand, you need to integrate new
data in the existing page without a full page refresh.
Browsers generally place a new request when an HTML form is submitted either via clientside
script or through a user action such as a button click. When the response is ready, the
browser replaces the old page with the new one. Figure 1-1 illustrates graphically this traditional
approach.
The chief factor that enables remote scripting is the ability to issue out-of-band HTTP requests.
In this context, an out-of-band call indicates an HTTP request placed using a component that
is different from the browser’s built-in module that handles the HTML form submission (that
is, outside the traditional mechanism you see in Figure 1-1). The out-of-band call is triggered
via script by an HTML page event and is served by a proxy component. In the most recent
AJAX solutions, the proxy component is based on the XMLHttpRequest object; the proxy component was a Java applet in the very first implementation of RS.