Tuesday, June 16, 2009

AJAX


window.google_render_ad();
AJAX = Asynchronous JavaScript and XML
AJAX uses the following web standards:
• JavaScript
• XML
• HTML
• CSS
AJAX applications are browser- and platform-independent.
Asynchronous JavaScript + XML is not a new technology or a new programming language It is a term coined in 2005 by Jesse James Garrett, which describes a "new" approach to using a number of existing technologies together, including: HTML or XHTML, Cascading Style Sheets, JavaScript, The Document Object Model, XML, XSLT, and the XMLHttpRequest object. It is a new technique for creating better, faster, and more interactive web applications.When these technologies are combined in the AJAX model, web applications are able to make quick, incremental updates to the user interface without reloading the entire browser page. This makes the application faster and more responsive to user actions.
With AJAX, a JavaScript can communicate directly with the server, with the XMLHttpRequest object. With this object, a JavaScript can trade data with a web server, without reloading the page.AJAX uses asynchronous data transfer (HTTP requests) between the browser and the web server, allowing web pages to request small bits of information from the server instead of whole pages. The AJAX technique makes Internet applications smaller, faster and more user-friendly.
AJAX is about better Internet-applications
Internet-applications have many benefits over desktop applications; they can reach a larger audience, they are easier to install and support, and easier to develop.However, Internet-applications are not always as "rich" and user-friendly as traditional desktop applications and most Web applications are slow and tedious. In the traditional Web application, the interaction between the customer and the server goes like this:
1. Customer accesses Web application
2. Server processes request and sends data to the browser while the customer waits
3. Customer clicks on a link or interacts with the application
4. Server processes request and sends data back to the browser while the customer waits
5. etc....
There is a lot of customer waiting. It’s a model adapted from the Web’s original use as a hypertext medium.
How Ajax is Different
An Ajax application eliminates the start-stop-start-stop nature of interaction on the Web by introducing an intermediary — an Ajax engine — between the user and the server. Instead of loading a webpage, at the start of the session, the browser loads an Ajax engine — written in JavaScript and usually tucked away in a hidden frame. This engine is responsible for both rendering the interface the user sees and communicating with the server on the user’s behalf. The Ajax engine allows the user’s interaction with the application to happen asynchronously — independent of communication with the server. So the user is never staring at a blank browser window and an hourglass icon, waiting around for the server to do something.
Ajax Acts as an Intermediary
The Ajax engine works within the Web browser (through JavaScript and the DOM) to render the Web application and handle any requests that the customer might have of the Web server. The beauty of it is that because the Ajax engine is handling the requests, it can hold most information in the engine itself, while allowing the interaction with the application and the customer to happen asynchronously and independently of any interaction with the server.
Asynchronous
This is the key. In standard Web applications, the interaction between the customer and the server is synchronous. This means that one has to happen after the other. If a customer clicks a link, the request is sent to the server, which then sends the results back.With Ajax, the JavaScript that is loaded when the page loads handles most of the basic tasks such as data validation and manipulation, as well as display rendering the Ajax engine handles without a trip to the server. At the same time that it is making display changes for the customer, it is sending data back and forth to the server. But the data transfer is not dependent upon actions of the customer.Some of the real time examples of Ajax are
Take a look at Google Suggest/GMail. Watch the way the suggested terms update as you type, almost instantly. Now look at Google Maps.,Yahoo Maps and Windows Live Local Zoom in. Use your cursor to grab the map and scroll around a bit. Again, everything happens almost instantly, with no waiting for pages to reload.Google Suggest and Google Maps are two examples of a new approach to web applications using AJAX.
Limitations of AJAX:
AJAX will not work in all web browsers. As its name suggests, AJAX requires JavaScript. This alone means that AJAX applications will not work in web browsers and devices that do not support JavaScript. For this reason it is not accessible to many typical Web users.
Future of AjAX:
The biggest challenges in creating Ajax applications are not technical. The core Ajax technologies are mature, stable, and well understood. Instead, the challenges are for the designers of these applications: to forget what we think we know about the limitations of the Web, and begin to imagine a wider, richer range of possibilities.AJAX is a tool that web developers can use to create smarter web applications that behave better than traditionalweb applications when interacting with humans.

No comments: