Like other web applications, an AJAX-enabled web application uses a markup language such as HTML or XHTML to present web pages, or a server-side technology such as JavaServer Pages (JSP) technology to generate web pages. In addition, server-side application systems play a key role in processing AJAX applications. A server-side application system such as Java Platform, Enterprise Edition (Java EE), that includes support for data validation, user identity management, and persistence fits very well with the AJAX methodology. See the AJAX and Server-Side Java Technologies section of this article.
Figure 1 illustrates how these technologies work together to handle a user action that triggers an AJAX response
3. The XMLHttpRequest object makes a call — an asynchronous HTTP request — to the web server.
4. The web server processes the request and returns an XML document that contains the result.
5. The XMLHttpRequest object calls the callback function and exposes the response from the web server so that the request can be processed.
6. The client updates the HTML DOM representing the page with the new data.You can incorporate these technologies into a web application in a variety of ways.
Entry filed under: Ajax.