In the early 1990s when the Web was first introduced, the initial excitement was all about linking together information to make it much easier for folks to move around and find documents referenced by the author of the document they were currently reading. When Netscape emerged in the mid 1990s, the company promoted a new vision for software that would make desktop software from companies like Microsoft obsolete.
Netscape obviously didn’t survive long enough to see that happen. A big part of the problem was that Microsoft didn’t exactly like the idea of their products being made obsolete. And Microsoft had the resources and position to undermine Netscape’s value proposition and revenue stream/business model. Whether legally or illegally, Microsoft took actions that led to Netscape’s demise.
However, another big part of the problem with Netscape’s vision was that it just didn’t work. The web was originally designed as a document model. Your web browser asked for a document from a server, and then displayed it for you. Smart people added lots of functionality over the years including the ability to run programs that run “through” the web browser, but the model remained that each time the user wanted something to change, they had to request a new document, or at least an updated version of the current document. That’s not how good desktop software works.
AJAX changes all of that. The name of the technology explains the ways in which this happens, so let’s take it apart.
The first A in AJAX stands for Asynchronous. That means that the web browser and the web server no longer have to wait on each other to take action. Specifically, the web browser can send a request to the server and then immediately go back to doing whatever the user wants and not sit “spinning” waiting for the server to respond. When the server does respond, the browser can decide what to do with the response.
XML stands for eXtensible Markup Language. The web was originally written to run using HTML or HyperText Markup Language. Tags within an HTML document tell the browser how to display a document – what to bold, what colors to display, where to place a picture, etc. The tags are well defined so that any web browser can display any web document, as long as they both use the HTML tags to mean the same things.
XML allows anyone to define any tag to basically mean anything (I’m sure this is a gross overstatement, but you get the picture). A standard web browser generally won’t know what to do with XML tags because they are no longer a standard set that everyone follows. Instead XML allows a server to send XML “documents” (it may be easier to think of them as messages) to a program that has been written to understand the specific XML tags that the server is using. There are generic ways to do this, but it’s much more interesting when a program has been written for a specific purpose to understand specific data with specific tags from a specific type of server. In a simple way, this is exactly what HTML is – web browsers are programs written for a specific purpose (to display web documents) by understanding the specific HTML tags used by web servers when sending web documents.
XML has become most interesting, because most XML is NOT being used to format documents for humans to read, but rather for computers to communicate with each other and make sense of the data that is being sent back and forth.
As with many technologies, this is easier to show than to explain. Here’s a demonstration of an AJAX application.
As with many Internet-based technologies, Google is probably the most aggressive user of AJAX in providing new applications for users. Gmail, Google Maps, and Google’s customized homepage are all real-world examples of AJAX in action.