March 25th, 2005

I've been hearing quite a bit about Ajax, the new wonder technology lately, and finally decided to take some time to check it out.

I followed the link to the Adaptive Path essay on Ajax, and started reading through the writing until I came to the diagram showing an "Ajax Engine", as part of the new innovation. Being a geek like most other geeks, I then stopped reading and starting looking around for the download button for this new Ajax Engine. Not having found anything I could download, I returned to the essay and continued reading.

What I found is something that sounded strangely familiar. In fact, this 'new' technology sounded just like DHTML–Dynamic HTML–except that there was a reliance on a non-browser safe object called the XMLHttpRequest: an object to manage asynchronous XML access from the server from within web pages. An object invented by Microsoft for IE and implemented in Firefox and Safari, but not an objects that's guaranteed to be cross-browser safe to use.

I admit, I was very confused by this time. I wrote on DHTML in 1998, in fact wrote the book whose cover you see in this post. I have hundreds of examples of DHTML, most several years old. I've even used the request object a time or two, but wasn't necessarily overjoyed by it: I really didn't like using proprietary objects when I couldn't find the same functionality in other browsers.

In the FAQ attached to the essay, I did receive some clarification:

Q. Did Adaptive Path invent Ajax? Did Google? Did Adaptive Path help build Google’s Ajax applications?

A. Neither Adaptive Path nor Google invented Ajax. Google’s recent products are simply the highest-profile examples of Ajax applications. Adaptive Path was not involved in the development of Google’s Ajax applications, but we have been doing Ajax work for some of our other clients.

Q. Is Adaptive Path selling Ajax components or trademarking the name? Where can I download it?

A. Ajax isn’t something you can download. It’s an approach — a way of thinking about the architecture of web applications using certain technologies. Neither the Ajax name nor the approach are proprietary to Adaptive Path.

Q. Is Ajax just another name for XMLHttpRequest?

A. No. XMLHttpRequest is only part of the Ajax equation. XMLHttpRequest is the technical component that makes the asynchronous server communication possible; Ajax is our name for the overall approach described in the article, which relies not only on XMLHttpRequest, but on CSS, DOM, and other technologies.

I then read Dare Obasanjo's excellent tap-tap that yes, the emperor is naked, and that Ajax really is Dynamic HTML with the use of the proprietary XMLHttpRequest object.

(Of course, I've used the term DHTML and Dynamic HTML, and in Dare's write-up, even this is a renaming of an existing concept, so mea culpa in that regard.)

Wow, I didn't know that I was ahead of the times when it comes to technology. I feel so super cool right now. To celebrate, I decided that I would go through all my burned CDs and recover my old DHTML applications in addition to old write-ups. As I find them, I'll post them into posts labeled "Ajax" so that you know you're supposed to jump up and down. (The old Well, if Google uses it then it must be OK thing.)

Starting with one of my favorites: The DHTML Menu Button from Hell, used to demonstrate the benefits of using DHTML to build menus. But if you don't like that one, then how about Pick-A-Pair–a favorite script of porn sites the world over. Betcha can't win the triple game.

Of course, this isn't really Ajax, which requires the use of XMLHttpRequest. Let's call it "Aja", instead. Or perhaps "web safe Ajax". But I'll see if I can dig up something proprietary for you to see — back when these samples were built, years ago, I tended to focus on standards-based objects and cross-browser compatibility. I now kick myself for seeing that this wasn't the way of the future.

You know, that's why we women in technology never get ahead. We just don't understand the right way of doing things.

Ooops, pointed to the wrong DHTML button example. I've updated the page to the right one.

Comments
1
Bud Gibson - 3:17 pm 3/25/2005

I guess my cut is that the xml part is important. You're now looking at a world of web-based applications where you are not having to be resent a whole screen of material to refresh the browser.

I think the main issue, as you point out, is that security model has not been thought through. Were you doing something like this in an applet, there are constraints on what you can go request, etc.

Another issue here is that you have wandered into the realm of highly interactive web applications with no real design paradigm. For instance, it is unclear how any design patterns are implemented let alone enforced. All of this stuff becomes important when you start to develop complex, distributed apps.

2

This could use clarification. You use all sorts of technologies that don't perform equally well across all browsers: CSS, JavaScript, and … well … everything breaks in some browser. The difference with "ajax" isn't that it's not cross-browser (or "proprietary," which doesn't mean much in the context of Mozilla) - it's that it (generally) moves content behind a new interface. I doubt you'd have the same issues with "ajax" if it were just used to supplement content, as CSS and JavaScript were first used.

3
Shelley - 4:10 pm 3/25/2005

Good point, Scott. It's the same with my absolute dislike of DHTML menus, hence my example.

As an anciliary device to a page, great, bring it on. But for critical functionality and navigation, being dependent on "in-place" modification is always going to filter out the handicapped, as well as those using non-compliant browsers.

I've seen how google is using some of this, as well as flickr. For the most part, the use is fairly innocuous, or even helpful (but usually not forcing a dependence on it). But then, I've seen others run with this and talk about 'in-page' editing of entries in weblogs, and I can't see the purpose for it. What is is about the use of the technology that provides something more traditional uses of technology don't provide?

Using tech, just to use tech — leaves me cold.

Inventing new names for old uses, leaves me even more cold.

Bud, your point is good, but I don't think the issue of design paradigms will be a biggy — I can see designers and front end and back end coders all managing to speak a common language. And design patterns are also staging a comeback.

But any time there's a dependence on JavaScript (or ECMAScript if you will) in a page, you create a filter. Most companies, don't want to filter. Heck, most of us don't want to filter.

For instance, I have a live preview, which is dependent on script. But you having JS turned off doesn't stop you from leaving a comment. It's a nice feature, but you can accomplish your task without it.

There's tradeoffs with the use of this "new" approach. I just hope the folks caught up in the buzz think on this.

4
Gabriel - 5:48 am 3/26/2005

The next big thing must therefore be frames, right?

5
Aristotle - 1:28 pm 3/26/2005

I think the place for Ajax is in web applications which, according to precedent in the C language, one might refer to as having “volatile� session state. The distinction is that the server-side state of a session is not dependent solely on the requests sent by the session client, and you want to keep the user’s screen up to date without interrupting their interaction with it.

Chatrooms are the best example: the chat backlog must be periodically refreshed while the user may have entered an incomplete message. A full refresh would cleared that partial message and therefore is unacceptable. Traditionally there is no sane model for doing them on the web other than to use a frame for the chat backlog or for the text input. But you can use XMLHttpRequest to insert new chat in-place. Users without the benefit of Javascript can just refresh the page manually.

Webmail fits that defition as well: mail may arrive at any time while the user is looking at a previously rendered listing of his inbox. (GMail does not set a good example, according to what I know; I have not tried the service myself.)

This is right in line with your comment on how using of such techniques should compound the user experience, rather than constitute it.

6
Frenzie - 1:29 pm 3/26/2005

For XMLHTTPRequest XML isn't required to be well-formed or anything, as far as I'm aware. Besides, what can it do which couldn't be done by a hidden iframe? *sighs* And besides, isn't an iframe more widely supported than XMLHTTPRequest?

7
Aristotle - 2:18 pm 3/26/2005

I refined the above comment and wrote a longer piece at Chlorine hazard: do not mix cleaning agents, where I argue that Ajax can help both usability and accessibility at the same time and improve everyone’s situation.

Take a look if you want to.

Thanks to all those who have contributed to the discussion. Comments are now closed, but you can contact the author of the post directly.