Chat with us, powered by LiveChat
Asynchronous JavaScript and XML – Part 1

Asynchronous JavaScript and XML – Part 1

AJAX – Asynchronous JavaScript and XML

AJAX is an acronym meaning Asynchronous JavaScript and XML (Asynchronous JavaScript and XML) and designating a free IT solution for developing Web applications. Like DHTML, or LAMP, AJAX is not a technology in itself but a term that refers to the joint use of a set of open technologies commonly used on the Web:

* HTML (or XHTML) structure for semantic information;
* CSS for presenting information;
* DOM and JavaScript to display and interact dynamically with the information presented;
* The XMLHttpRequest object to exchange and manipulate data asynchronously with the web server.
* Replace XML data format informative (JSON) and visual (HTML).

As an alternative to XML, AJAX applications can use text files or JSON.

AJAX applications can be used in Web browsers that support the technologies described above. Among them, there are Mozilla Firefox, Internet Explorer, Google Chrome, Safari and Opera.

History of AJAX

The term AJAX was introduced by Jesse James Garrett (American computer scientist), February 18, 2005, in an article on the Adaptive Path Web site. Since then he has quickly gained popularity.

The elements that compose AJAX (Javascript, DOM, XML, etc.) and use to generate asynchronous interactions are far predating the term. In 2001, the XMLHTTP object, which appeared with the MSXML library, starting point of this technique was originally developed by Microsoft for Internet Explorer 5 as an ActiveX object, and then integrated as a native browser object named Mozilla XMLHttpRequest, allowing other browsers to integrate because ActiveX is used by Internet Explorer.

AJAX compared to traditional Web applications

The traditional web applications allow users to make choices (follow a link, fill and submit a form). A query is then sent to the HTTP server, which acts according to the action and data received, and returns a new page (in Web jargon, these requests are called “synchronous”). This operation consumes unnecessary part of the bandwidth, a large part of the code (X) HTML are common to different pages in the application. And because a request to the HTTP server must be performed at each interaction with the application, the response time of the application depends greatly on the response time of the HTTP server. This leads to user interfaces slower than their native equivalent. Current browsers are common elements in cache, then loading new pages does not require the server to give the same items each time.

Applications using Ajax techniques, in turn, can send requests to the HTTP server to retrieve only the necessary data using the XMLHttpRequest HTTP request and these requests are called “asynchronous.” Style sheets (CSS) are used for the presentation of information in Web pages. The client-side JavaScript is used to interpret the response from the HTTP server and perform treatments (views drop-down menus, attachments etc.). The applications are then more reactive, the amount of data exchanged between the browser and the HTTP server is greatly reduced. The processing time of the application server side is also reduced some of the processing being done on the computer from which the request.

Conversely, loading the first page may be penalized if the application uses a large AJAX library (some libraries weigh more than 500 kb, but this is rare).

Continued…

Santosh

Santosh is an experienced content writer with good search engine optimisation skills. Santosh works with our marketing department in the creation of articles and how-to guides for our company blog and knowledgebase.

Sharing

Leave your comment