Asynchronous JavaScript and XML
lastmod 2018-08-17created 2015-07-153 edits
Ajax (Asynchronous JavaScript and XML) is a web development technique that uses the following combination to build interactive web applications.
- HTML (or XHTML) and CSS for presentation
- DOM and JavaScript for dynamic display and interaction with the displayed information
- XML, XSLT, and XMLHttpRequest for exchanging and manipulating data asynchronously with the web server (Ajax applications can use predefined HTML, plain text, JSON, or JSON-RPC instead of XML/XSLT).
Like DHTML or LAMP, Ajax does not refer to one specific technology in itself; it is a term for a bundle of technologies used together. In fact, similar or composite technologies effectively based on Ajax, such as AFLAX, keep appearing.
Ajax applications use a web browser that supports the technologies listed above as the platform for execution. Browsers that support it include Mozilla Firefox, Internet Explorer, Opera, Safari, and Google Chrome. However, Opera currently does not support XSL formatting objects and XSLT transformations.
What is AJAX?
AJAX stands for asynchronous JavaScript and XML. Simply put, it is the use of the XMLHttpRequest object to communicate with server-side scripts. It can send and receive information in various formats (JSON, XML, HTML, plain text, etc.) to and from the server. The powerful feature of AJAX is its "asynchronous" nature, which works without refreshing the whole page. This asynchrony lets you update only part of the page, not the whole page, in response to user events.
In other words, it comes down to two things:
- Request information from the server to update part of a page.
- Work with the data received from the server.
Asynchronous JavaScript and XML (AJAX) is not a (specific) technology in itself. But it can be described as a "new" approach that uses several existing technologies, including HTML or XHTML, Cascading Style Sheets, JavaScript, The Document Object Model, XML, XSLT, and the XMLHttpRequest object. Combining these technologies through the AJAX model lets you build web applications quickly and update their user interface (and page content) incrementally and partially without reloading the whole web page. With this, you can build applications that are faster and respond better to user actions and requests (for example, typing a search term, scrolling a map, selecting a new location, adjusting the scale).
XMLHttpRequest
- Ajax course: Lesson 2. Ajax basics with Prototype 1
- Ajax: Using the XMLHttpRequest object (responseText)
- MDN: XMLHttpRequest
Favorite site
- Wikipedia (en) article on AJAX
- Passing data with asynchronous ajax communication in JSP
- Web-based chat room (things to consider for it)
- AJAX basics: asynchronous calls via XMLHttpRequest
- jQuery: Ajax flow and examples
- What Ajax is, and simple implementation examples with plain Ajax functions
- Getting started with Ajax
Sample Program
Guide
- Ajax in action (Onlin E-Book) 1
- Ajax basics 2
- Asynchronous JavaScript programming. The power of $.Deferred for HTML5 applications - HTML5 Rocks