Wednesday, April 9, 2008

AJAX

Asynchronous JavaScript And XML

Ajax is a combination of several technologies (JavaScript, XML, HTML and CSS) for creating better, faster, and more interactive web applications
Asynchronous JavaScript And XML mean: Asynchronous means that when a request is sent, instead of compulsorily waiting till a response comes back, the user still continues working. A function which has been setup will wait for the server’s
response and will react to it JavaScript makes the request to the web server and once a response is returned, JavaScript modifies the current page using its DOM informing the user XML is used to wrap-up the data that is received back from the webserver Ajax was made popular by Google with the introduction of Google
Suggest and Google Maps

How AJAX Works?

Traditional web applications send a request to the web server (using GET or POST method), wait for the server to respond, then a new page will load with the results, thus results in huge overheads With AJAX, JavaScript communicates directly with the server, through the JavaScript XMLHttpRequest object, and gets a response from the server without reloading the web page

Advantages of AJAX

Interactivity
– Ajax applications can perform number of tasks without having
their performance being limited by Internet bandwidth. This
makes the development of interactive and rich graphic
applications.

Portability
– Ajax applications are created using existing technologies that are
well implemented by all major browsers and platforms.
Therefore, Ajax applications are cross-platform compliant.

Disadvantages of AJAX

Usability criticisms
– An Ajax application might behave differently than a classical web
application. E.g.

Brower’s back button will not guarantee to take the user to the previous instance of the page

Difficult to bookmark a particular state of the application

Response time concerns
– Without clear feedback to the user, network latency might result delay in
the interface of the web application something the user might not expect
or understand.

JavaScript must be enabled
– The browser should support JavaScript and it should be enabled in the
browser.

AJAX TUTORIAL

No comments: