AJAX
AJAX stands for Asynchronous JavaScript and XML. Although AJAX has been available for the last 8 years, its utility was not realized until recently.
AJAX offers a versatile platform for developing rich web applications that arehighly interactive and behave just like desktop applications adding up to the usability and availability of web applications that serve enterprise business services.
The term AJAX was invented by Jesse James Garrett that described a collection of technologies that allows a rich user experience to web users.
AJAX combines the following technologies
- XML and XSLT for data exchange
- HTML or XHTML as mark up language
- CSS for creating custom styles
- Document Object Model (DOM)
- Client-end scripting language like JavaScript
- XMLHttpRequest object for asynchronous data exchange with the web server
From programming perspective AJAX enables a new way of combining client side programming in JavaScript with server side processing that deliver XML chunks to web pages. This allows web pages to be updated with new data without any need to reload the entire data.
What makes AJAX special
- AJAX is simple to develop and use that makes it easy for developers to learn and develop web applications using AJAX. For users, AJAX is intuitive and provides an engaging experience
- AJAX supports some of the most popular browsers and platforms that makes the applications highly compatible
- AJAX based applications are more usable and provide better user experience. Since user requests fetch small volume of data from the server and not the complete set of information, applications using AJAX deliver high-speed output, eliminating slow server responses and page refreshes
- AJAX offers good compatibility with server-side languages that include ASP, PHP, ColdFusion, Perl etc. This works well for everyone with a vast resource of server-side language experts
- AJAX development involves low learning and development costs. AJAX offers low cost of deployment since there is nothing to install at client-end
- AJAX has a key role to play in Web 2.0 philosophy. AJAX technologies are key components for many Web 2.0 applications.
The AJAX engine works as a mediator between the client and server. When the session starts, the AJAX engine is first loaded, unlike other technologies where the web page is loaded first. The job of this engine is to render the user interface and start communicating with the server on behalf of the user. From client-end, the engine enables asynchronous interaction between the user and application.
An AJAX script makes a request to the server by using the JavaScript XMLHttpRequest object. This is a special JavaScript object that invokes a URL and makes requests without a single page refresh. This XMLHttpRequest object retrieves information from the server and presents it to the user. The most remarkable feature of the engine is that it does not fetch any information from the server that is already cached, resulting in a swift information fetch for the application and a smooth and pleasurable experience for the user.
Coding AJAX
Coding an AJAX application involves creating XMLHttp object. This is a JavaScript object that can be created like this:
Coding an AJAX application involves creating XMLHttp object. This is a JavaScript object that can be created like this:
var xmlHttp=new XMLHttprequest();
br />var xmlHttp=new XMLHttprequest();
var xmlHttp=new XMLHttprequest();
In Internet Explorer this is how the request appears:
http = newActiveXObject(“Microsoft.XMLHTTP”);
This XMLHttpRequest object handles all server communication and it is the JavaScript technology that talks to the server through this object.
In AJAX, when data is submitted through a form it does not go directly to the server; instead it goes to the JavaScript code. The JavaScript in turn sends the request to the server. When this takes place, the user’s screen never refreshes and the user is free to perform other screen activities while the processing continues and results are fetched in a very short time.
Browser compatibility with AJAX
AJAX is becoming a global technology that is supported by most of the Browsers. Some of these are as follows:
AJAX is becoming a global technology that is supported by most of the Browsers. Some of these are as follows:
- Microsoft Internet Explorer 5.0 and above
- Netscape 7.1 and above
- Mozilla, Mozilla Firefox
- Apple Safari version 1.2 and above
- Opera browser version 8.0 and above
AJAX has been an innovation in technology.
No comments:
Post a Comment