BYTE.com > Mr. Computer Language Person > 2005
AJAX: Making Web Pages Responsive
By Martin Heller
September 12, 2005
(AJAX: Making Web Pages Responsive
: Page 1 of 1 )
In my July column, I touched briefly on AJAX, in the context of Ruby on Rails and the Microsoft Atlas announcement. I'd like to expand on that a bit.
As I said in July, AJAX (Asynchronous JavaScript and XML) is built on Dynamic HTML and client-side scripting, and gives you lightweight client-side code that lets you update a page without a server round-trip. What's added in AJAX over DHTML is the use of the Microsoft XMLHttpRequest object to interchange and manipulate data asynchronously with the Web server.
I have since learned that the XMLHttpRequest object was introduced by the Microsoft Outlook team to make Outlook Web Access (OWA) more usable. It's more usual for journalists to talk about Gmail and Flickr when they discuss AJAX, but let's give credit where credit is due: it was a Microsoft innovation at its core, and it's several years old.
AJAX has been popularized by, among others, Jesse James Garrett of Adaptive Path, who coined the term in a February 18, 2005 article, which gives a pretty good overview of the technology. I also recommend the Wikipedia article on AJAX programming, which not only explains the model but also has a good list of external links for AJAX articles, portals, scripts, and libraries.
The XMLHTTP interface is a helper API for MSXML, goes back to MSXML 2.0, and is supported in Microsoft Internet Explorer (IE) 5.0 or later. In the following simple JScript example (from Microsoft's documentation), a client script creates an XMLHTTP object and asks a server for an XML document. The server sends back the XML document, which is then displayed in a message box.
var xmlHttpReq = new ActiveXObject("MSXML2.XMLHTTP.3.0");
xmlHttpReq.open("GET", "http://localhost/books.xml", false);
xmlHttpReq.send();
WScript.Echo(xmlHttpReq.responseText);
So, the XMLHttpRequest object provides a client-side protocol support for communication with HTTP servers.
Page 1 of 1
BYTE.com > Mr. Computer Language Person > 2005
|