Tuesday, May 27, 2008

Ajax

Ajax (asynchronous JavaScript and XML) is a group of inter-related web development techniques used for creating interactive web applications. A primary characteristic is the increased responsiveness and interactivity of web pages achieved by exchanging small amounts of data with the server "behind the scenes" so that entire web pages do not have to be reloaded each time there is a need to fetch data from the server. This is intended to increase the web page's interactivity, speed, functionality and usability.

Ajax is asynchronous, in that extra data is requested from the server and loaded in the background without interfering with the display and behavior of the existing page. JavaScript is the scripting language in which Ajax function calls are usually made.[1] Data is retrieved using the XMLHttpRequest object that is available to scripting languages run in modern browsers, or, alternatively, through the use of Remote Scripting in browsers that do not support XMLHttpRequest. In any case, it is not required that the asynchronous content be formatted in XML.

Ajax is a cross-platform technique usable on many different operating systems, computer architectures, and web browsers as it is based on open standards such as JavaScript and the DOM. There are free and open source implementations of suitable frameworks and libraries.

History

Techniques for the asynchronous loading of content on an existing Web page without requiring a full reload date back as far as the src attribute that could take any external URL, and by loading a page containing JavaScript that manipulated the parent page, Ajax-like effects could be attained. This set of client-side technologies was usually grouped together under the generic term of DHTML. Macromedia's Flash could also, from version 4, load XML and CSV files from a remote server without requiring a browser to be refreshed.

Microsoft's Remote Scripting (MSRS), introduced in 1998, acted as a more elegant replacement for these techniques, with data being pulled in by a Java applet with which the client side could communicate using JavaScript. This technique worked on both Internet Explorer version 4 and Netscape Navigator version 4 onwards. Microsoft then created the XMLHttpRequest object in Internet Explorer version 5 and first took advantage of these techniques using XMLHttpRequest in Outlook Web Access supplied with the Microsoft Exchange Server 2000 release.

The Web development community, first collaborating for remote scripting to enable consistent results across different browsers, created in 2002 a user-community modification[2] to Microsoft Remote Scripting which was created to replace the Java applet with XMLHttpRequest.

Remote Scripting Frameworks such as ARSCIF[3] surfaced in 2003 not long before Microsoft introduced Callbacks in ASP.NET.[4]

In addition, the World Wide Web Consortium (W3C) has several recommendations that also allow for dynamic communication between a server and user agent, though few of them are well supported. These would include:

* The object element defined in HTML 4 for embedding arbitrary content types into documents (replaces inline frames under XHTML 1.1)
* The Document Object Model (DOM) Level 3 Load and Save Specification[5]

No comments: