April 12, 2005

The Ajax Reality Distortion Field

Ajax, Ajax, Ajax -- the buzzword has taken the Web world by storm. As it's been presented, Ajax ("Asynchronous JavaScript + XML") is a new way of creating rich Internet applications by means of "standard, mature, and well-understood technologies" -- i.e., DHTML. This is the big draw of Ajax, and is the core of the hype.

It is indeed possible (and sometimes even desirable!) to create rich Internet applications using DHTML; I've been talking about this for some time. But the idea that DHTML technology is standard, mature and well-understood is accurate in only a theoretical way.

Until very recently, it was commonplace knowledge that DHTML doesn't work consistently across browsers, isn't maintainable, requires code forking, delivers limited fidelity and so on. And while perhaps this is still common knowledge among level-headed developers, somehow the introduction of the "Ajax" buzzword has induced Web-wide amnesia, and people are now under the illusion that creating full-scale applications in JavaScript is a simple proposition -- just throw in a little script here and there, and you have an app suitable for Web deployment. No new learning required, just a few clever hacks.

Welcome to the Ajax reality distrortion field.

This one post about replacing Flickr's Flash UI with a DHTML UI seems to sum up these contradictions rather concisely:

First, the developer, Neil Kandalgaonkar, writes that this DHTML version of the Flickr UI will work in more places that the Flash UI that Flickr uses:

"So what's wrong with Flickr's perfectly good Flash interface? Nothing. But maybe...you often use operating systems where Flash doesn't work, or doesn't work well."

But later in the post, Neil goes on to write:

"This is a hack that works in just one browser, Firefox. Developing cross-platform DHTML is much harder and more painful. Flash has a lot of advantages over DHTML; it's truly cross-platform, and can do much more special effects. If that works for Flickr, more power to them."

Well, that sounds rather different! Finally, when explaining why someone might be interested in what he's done, Neil writes:

"...you're a web developer and you are interested in this bleeding-edge Ajax stuff."

I'm confused. Isn't Ajax/DHTML "standard, mature, and well-understood"?

Just to be clear: I think what Neil has done is cool. But cool, bleeding edge, difficult and incompatible isn't what Ajax is supposed to be all about.

I sometimes think of how developers look at DHTML apps in terms of grading on a curve. A Laszlo-, Flash-, or Java-based RIA will typically receive all sorts of complaints from Web standards vigilantes about non-standard UI, accessibility issues, problems with bookmarking and deep linking, and incomptibility with search engine crawlers. But a similar app built using DHTML -- excuse me, "Ajax" -- elicits enthusiastic responses from the very same crowd like "Wow! Look at how cool this DHTML site is! Isn't that UI great?"

Of course a full Ajax/DHTML app has nearly identical issues with UI, accessibility, bookmarking, and search engines that other RIA technologies do; but they have the veneer of being "standard". And just to state the obvious, lest we forget: HTML as a standard for Web applications is in a precarious position, with the leading browser vendor actively working to define its own all-new markup language for networked applications, and other browser vendors creating a splinter group that diverges from the W3C to promote their own standards for Web applications.

Theoretically, DHTML is a standard. But to quote Yogi Berra: "In theory, there is no difference between theory and practice. But, in practice, there is."

Posted by temkin at April 12, 2005 11:10 AM

' "...you're a web developer and you are interested in this bleeding-edge Ajax stuff."

I'm confused. Isn't Ajax/DHTML "standard, mature, and well-understood" '

Where are you getting that Ajax/DHTML is standard, mature, and well-understood? You seem to be fighting that postulate, yet you don't really say where you got it from. Did Neil say that? It seems like you're putting a lot of words into Ajax's mouth or, at the very least, not mentioning your sources.

Posted by: Chris at April 13, 2005 06:08 AM


The final paragraph of the Jesse James Garrett (Adaptive Path) essay that introduces Ajax is:

"The biggest challenges in creating Ajax applications are not technical. The core Ajax technologies are mature, stable, and well understood. Instead, the challenges are for the designers of these applications: to forget what we think we know about the limitations of the Web, and begin to imagine a wider, richer range of possibilities."


From what I've seen and heard, this claim is not only representative of how people write/think about Ajax today; it's the core of the hype surrounding it.

Posted by: David Temkin at April 13, 2005 08:19 AM

I couldn't agree with you more, but I think theory/practice quote is actually attributable to Yogi Berra:

Posted by: Victor Laszlo at April 13, 2005 09:58 AM

OK. I did a quick search, and found that there's some controversy on who actually came up with this. But I like the idea that it's Yogi Berra's, so I'll take the liberty of editing my original post. :-)

Posted by: David Temkin at April 13, 2005 11:32 AM

Maybe part of the problem is that some focus on "What's the best technology?", rather than "Which technology is the best fit for this particular job?"

That's one way for the criteria to shift around like that, with accessibility important one day and unimportant the next.

(Me, I think it's great that many browsers can now handle JavaScript apps which get fresh data without refreshing the page. But developers comfortable in multiple technologies still have more flexibility than those who pre-select only one technology.)


Posted by: John Dowdell at April 14, 2005 03:50 PM

I must have misunderstood. I thought AJAX <> DHTML and that most AJAX implementations so far don't use DHTML. So why the FUD that confuses the two?

As for me I hate Javascript. It's awkward, pernickety, badly documented and hard to debug. And there are too mnay differences in implementation, not of the core language but the DOM, between browsers.

Posted by: Julian Bond at April 14, 2005 10:33 PM

Or are you actualy talking about dhtml (lower case), the style of programming as opposed to DHTML (upper case), that thing that's built into IE.

Posted by: Julian Bond at April 14, 2005 10:36 PM

I don't think there's a contradiction here. Ajax is based on old technology, but the concept is new, at least to most web developers.

Posted by: Neil Kandalgaonkar at April 15, 2005 10:31 AM

Neil -- thanks for coming by, and I hope you're OK with being quoted here. :-)

Julian -- Ajax implies Javascript (that's the "J" in "Ajax"). So everything you know about Javascript applies here. Ajax is not a new technology; it's a new *buzzword* which describes a particular way of using a set of old technologies that includes JS/DOM.

Posted by: David Temkin at April 15, 2005 06:23 PM

I did something of an AJAX like hack with this solution:


But, I really like the idea of communicating back to the browser with JS. It's flexible and Javascript Object Notation is really easy to use.

But, I have not tried to go overboard with it. I have not used it for "dhtml", whatever that really means anyway. I remember the Dynamic Duo DHTML libraries years ago that had all kinds of interesting ways to create interfaces in both browsers.

But, the novelty faded, and Flash grew. HTML is still a presentation formatting language, not an application language.

I still will use "ajax" style approaches in the future, but I'm looking forward to learning more about serverless Laszlo.

Posted by: Josh Gough at April 18, 2005 02:28 PM

Thanks for providing your source. By the way, I've already started receiving spam from my post above.

Posted by: Chris at April 20, 2005 04:29 PM