Developing AJAX Application

Ajax is a way of developing Web applications that combines:

XHTML and CSS standards based presentation.
Interaction with the page through the DOM.
Data interchange with XML and XSLT.
Asynchronous data retrieval with XMLHttpRequest.
JavaScript to tie it all together.

How Ajax Works ?

Ajax attempts to remedy this problem by letting your Javascript communicate directly with the server, using a special Javascript object XMLHttpRequest. With this object, your Javascript can get information from the server without having to load a new page!

When user first visits the page, the Ajax engine is initialized and loaded. From that point of time user interacts with Ajax engine to interact with the web server. The Ajax engine operates asynchronously while sending the request to the server and receiving the response from server. Ajax life cycle within the web browser can be divided into following stages:

User Visit to the page:
User visits the URL by typing URL in browser or clicking a link from some other page.

Initialization of Ajax engine:
When the page is initially loaded, the Ajax engine is also initialized. The Ajax engine can also be set to continuously refresh the page content without refreshing the whole page.

Event Processing Loop:
* Browser event may instruct the Ajax engine to send request to server and receive the response data
* Server response – Ajax engine receives the response from the server. Then it calls the JavaScript call back functions
* Browser (View) update – JavaScript request call back functions is used to update the browser. DHTML and css is used to update the browser display.

By using the programming practice termed “Ajax” you will be able to trade data, with a web server, without having to load a new page.