Ajax
Asynchronous JavaScript and XML is a technology that changes the way web pages work by achieving asynchronously exchanges with the server. Web applications, running on a browser, are all subject to call XMLHttpRequest to communicate with the server as well as making use of dynamic HTML, technologies that are the core of Ajax.
The name Ajax was coined by Jesse James Garrett in an article published on the Adaptive Path site in 2005. (Ref).
What's Ajax?
The technique became popular as soon as the article was published and that has improved greatly
the quality of some websites by allowing smooth and innovative applications.
Ajax is a combination of existing technologies to create dynamic Web sites operating just as desktop software:
- XMLHttpRequest. Object of the browser used by JavaScript, it performs GET or POST requests to the server to read a file or send parameters.
- JavaScript. Scripting language running client side.
- DOM. The Document Object Model is a representation of the structure of an HTML or XML document and allows to access elements in the document.
- CSS. Cascading Style Sheets, define the presentation of a page.
- XML or other data format. Although the term XML is in the definition of Ajax, the XHR object allows both to read text files or JSON.
More details in the article Introducing Ajax.
The XHR object as defined in the standard specification allow to use two different attributes used when the file is loaded in XML format
or not, knowing that a file JSON is seen as a text file. There are responseXML and responseTxt.
To choose between these formats, the article Comparison of JSON and XML should help to the decision.
Successors of Ajax
New modernized standard ways to access the server.
- XMLHttpRequest vs. WebSocket. With WebSocket we obtain a two-way access to the server which can send notifications.
- WebRTC vs. WebSocket. With WebRTC the application get real-time access to data on the server.
As well as WebRTC WebSocket have a JavaScript interface for standardized by the W3C which will facilitate their widespread use in browsers.
The successors of Ajax will not be before long available to all sites.
Ajax frameworks
Using a framework avoids to the
programmer to rewrite common functions of Web applications, they
are all available and tested on major browsers.
An Ajax framework when it is pure JavaScript can run on any system, it runs client side. Or it may also have a part running server side, in different programming languages: PHP, Java, ASP.
The main JavaScript frameworks are JQuery, Mootools, Yahoo UI. The Google Web Toolkit allows for building Java programs that are compiled in JavaScript to work client side.
- List of Ajax and PHP frameworks.
A comparison of the main PHP frameworks. - Ajax and Gears
Working offline with the Gears library.
See also XMLHttpRequest in Gears.
Tutorials and tools
- The Ajax
tutorial.
Complete tutorial with GET and POST examples. - Firebug.
Firefox Extension to facilitate debugging Ajax applications. - Anaa
A lightweight and easy to use library to make Ajax pages without to load a full framework. - Rich Ajax Platform
Eclipse-based development interface with Java on server side. - Google Gears
A plug-in to run Web apps offline. Now replaced by HTML 5 but still usable. - Ajax crawlable: Understanding the specification from Google
Google made a proposal for a standard to dynamic content indexed by search engine.
Documents
- Which interface for a modern application?
Comparison of all solutions: Ajax, XAML, JavaFX, and also the new standards of the Web. The evolutions of these technologies are studied, as they can modify definitively the decision. - RIA
Which tools to build a Rich Internet Application
| Tweet |
|