Datasheet

Ajax: The Acronym
If you read the Adaptive Path article, then you’ll already know that Ajax the acronym stands for
Asynchronous JavaScript and XML. Here’s a curveball: Ajax doesn’t have to use XML, and neither does it
have to be asynchronous. Ajax applications can use XML, and they can be updated asynchronously.
These are quite common tricks and techniques used to update the page, but they are not tied to these
technologies.
To reiterate an earlier point, Ajax is “a set of programming techniques,” “a particular approach to web
programming.” It isn’t rigid; it isn’t like a members-only club, if you don’t use one technique then it isn’t
Ajax; it’s an overall guiding philosophy. How you achieve these objectives on the client is up to you. The
objectives, though, prove a good starting point. Jesse James Garrett mentioned in the article “several
technologies... coming together in powerful new ways.” Here are the technologies he specifically
mentioned:
XHTML and CSS
The Document Object Model (DOM)
JavaScript
XML and XSLT
The
XMLHttpRequest object
In reality, to create an application using Ajax techniques you need only three of these: XHTML, the
DOM, and JavaScript. If you do any amount of development with Ajax techniques, though, you will
almost certainly need to use all of the technologies at some point.
You’ll also probably need a server-side language to handle any interaction with the server. This is most
typically one of the following three:
PHP
ASP.NET (Visual Basic.Net/C#)
Java
When building a web page, you’ll probably have encountered many or most of these technologies, but
perhaps not all, so it’s worth having a quick reminder of what each one is and does, its role in web
development, and how it pertains to Ajax.
XHTML and CSS
You will be familiar with HyperText Markup Language (HTML), the lingua franca of the Web, but per-
haps not so familiar with its successor, eXtensible HyperText Markup Language (XHTML). XHTML is
the more exacting version of HTML. In fact, it is the HTML standard specified as an XML document. The
main difference with this is that whereas HTML has been fairly easygoing and the browser will make a
reasonable attempt to display anything you place in tags, XHTML now follows XML’s rules. For exam-
ple, XML documents must be well formed (tags are correctly opened and closed, and nested), and so
must XHTML pages. For example, the following is correct nesting:
<div>
<h1>
9
Chapter 1: Introducing Ajax
04_106754 ch01.qxp 2/9/07 6:15 PM Page 9