The term Ajax is all the rage in the software world. The acronym originally stood for Asynchronous JavaScript and XML, though now it refers to a broad range of techniques that may not, for example, include XML.

Beyond the technical jargon, Ajax represents an architecture for the software that is designed to be used with any web browser, but that includes an interface with the responsive feel of a desktop application. This means that, for example, a grid component such as a spreadsheet that appears in the web page responds instantly to the user's manipulation of the data, without the time delays or visual disruptions caused by the page "refreshing" or being rebuilt with new HTTP requests. Google's Gmail and Calendar, and Yahoo! Maps, are three examples of typical Ajax applications.

Ajax works by communicating with the application's middle and/or database tiers using a client-side JavaScript object. This object is called XMLHttpRequest (XHR). The web page is composed of and programmed with common, standard technologiesnamely, HTML/XHTML, cascading style sheets (CSS), JavaScript, and the Document Object Model API that lies behind each web page's structure. The data that the page exchanges with its server tiers, such as a product database, can be plain text, XML, or a format called JavaScript Object Notation (JSON).

For example, the user might choose a product name from a selection list widget on a web page. In response to this event, the application uses XHR to send a request for data on this product. The page never changes, because the application sent the request asynchronously behind the scenes. The server component, such as a PHP file or a servlet, receives the HTTP request, then sends back a response containing information about the product, in, say, XML or JSON format. The application processes the request using JavaScript's DOM API, or by converting the JSON value to a client-side object (see later in this shortcut). The user sees the new information on the web page, hopefully without a very long delay.

Google Web Toolkit for Ajax
Google Web Toolkit GWT Java AJAX Programming: A step-by-step to Google Web Toolkit for creating Ajax applications fast
ISBN: 1847191002
EAN: 2147483647
Year: 2006
Pages: 29 © 2008-2017.
If you may any questions please contact us: