Ajax Webapplication Model
Ajax Webapplication Model
AJAX Wen application model uses JavaScript and XMLHttpRequest object for
asynchronous data exchange. The JavaScript uses the XMLHttpRequest object
to exchange data asynchronously over the client and server.
AJAX Web application model resolve the major problem of synchronous request-
response model of communication associated with classical Web application
model, which keeps the user in waiting state and does not provide the best user
experience.
AJAX, a new approach to Web applications, which is based on several
technologies that help in developing applications with better user experience. It
uses JavaScript and XML as the main technology for developing interactive Web
applications.
The AJAX application eliminates the start-stop-start-stop nature or the click, wait,
and refresh criteria of the client-server interaction by introducing intermediary
layer between the user and the Web server.
Instead of loading the Web page at the beginning of the session, the browser
loads the AJAX engine written in JavaScript.
Every user action that normally would generate an HTTP request takes the form
of a JavaScript call to the AJAX Engine.
The server response comprises data and not the presentation, which implies that
the data required by the client is provided by the server as the response, and
presentation is implemented on that data with the help of markup language from
Ajax engine.
The JavaScript does not redraw all activities instead only updates the Web page
dynamically.
In JavaScript, it is possible to fill Web forms and click buttons even when the
JavaScript has made a request to the Web server and the server is still working
on the request in the background. When server completes its processing, code
updates just the part of the page that has changed. This way client never has to
wait around. That is the power of asynchronous requests.
AJAX Engine between the client and the application, irrespective of the server,
does asynchronous communication. This prevents the user from waiting for the
server to complete its processing.
The AJAX Engine takes care of displaying the UI and the interaction with the
server on the user’s behalf.
In traditional Web applications, the synchronous mode of communication existed
between the client and the server as shown in following figure: