Ajax Technologies
In 90s web browsers and web sites were based on mainly static pages and for each user action a new web page had to be re-loaded from the server (or a new page loaded). This leads to slow down the user interaction greatly. So the new technology Ajax (Asynchronous JavaScript and XML) was introduced in the web technology. This is neither a language nor a technology itself, but a group of technologies that first used and implemented by Google to develop GMaps.
Ajax uses a combination of HTML and CSS to mark up and style information. The DOM is accessed with JavaScript to dynamically display, and to allow the user to interact with the information presented. JavaScript and the XMLHttpRequest object provide a method for exchanging data asynchronously between browser and server to avoid full page reloads. Thus the action is faster and greatly enhances the user accessibility and visibility.
The term Ajax has come to represent a broad group of web technologies that can be used to implement a web application that communicates with a server in the background, without interfering with the current state of the page. Mr. Jesse James Garrett explained that the following technologies are required.
- HTML or XHTML and CSS for presentation.
- DOM for dynamic display of and interaction with data.
- XML and XSLT for the interchange, and manipulation and display, of data, respectively.
- XMLHttpRequest object for asynchronous communication.
- JavaScript to bring these technologies together.
Since then, however, there have been a number of developments in the technologies used in an Ajax application, and the definition of the term Ajax. In particular, it has been noted that JavaScript is not the only client-side scripting language that can be used for implementing an Ajax application. Other languages such as VBScript are also capable of the required functionality. However JavaScript is the most popular language for Ajax programming due to its inclusion in and compatibility with the majority of modern web browsers. XML is not required for data interchange and therefore XSLT is not required for the manipulation of data.
Ajaxs most appealing characteristic, however, is its asynchronous nature, which means it can do all of this without having to refresh the page. This allows you to update portions of a page based upon user. The DOM plays into Ajax in a number of ways. How you use the DOM depends a good deal on how you handle the content returned from the server. You can show the content as simple text using the responseText property of the server response, or you can get it as XML using responseXML. Assuming the content you pull back from the server is an (X)HTML snippet and youve gotten it as responseText, you could drop/print that content into a particular spot on the page using innerHTML(May be in a div or a table).
Merits and demerits: Apart from its advantages using it in web pages to load faster it has some demerits too. AJAX will not work in all web browsers. As its name suggests, AJAX requires JavaScript to run. This alone means that AJAX applications will not work in web browsers and devices that do not support JavaScript or where JavaScript is disabled. For this reason it is not accessible to many typical Web users who are using old and typical web browsers. The Web Content Accessibility Guidelines also require that web applications function when JavaScript is disabled or not supported. AJAX also requires that XMLHttpRequest be supported, which many browsers do not. But nowadays almost all popular browsers have this feature to run AJAX.
Disclaimer: Some contents are taken from this site. Click here to read more.