Ajax… Or how an old idea needs new marketing.

PPK talks about Ajax, and there’s some talk of exactly the history of the concepts, but even in the comments they’re far from going back far enough.

Ajax itself is nothing new, Everything was in place to do it in IE in 1999 once IE5 shipped (or before you installed MSXML) - 2001 brought us it in Mozilla, when XML HTTP Request arrived. The dynamic HTML etc. needed had been there for years. Of course in reality, you don’t need the xml http request object, iframe/ilayer based systems are fine, and Brent Ashley had a nicely packaged version of this in 2000 with JSRS, but the general techniques were in use before that.

In 1998, Microsoft had offered us a Java based Remote Scripting solution.

In fact even before DHTML, Frames and basic forms had given us the possibility to update pages without the user seeing the refresh - see for example a usenet post from March 1996 discussing it.

So the concepts have existed since the beginning of scripted webpages, well since Netscape 3 anyway. The idea isn’t new.

So what took so long?

The obvious first question is why if it’s been around over 9 years, are we only just seeing prominent sites taking up the concept - I think there’s a number of reasons for this:

  • There’s not many good scripters about, and they’re not always in the right places in the company, most projects stick with what they know, it’s sensible, it’s safe - if you don’t know how easy partial page updating is, why would you bother?
  • Server side knowledge have dominated web development projects, with their experience of server side scripting - it’s simply taken many years for client-side scripting to be seen as a seperate discipline, needing seperate skills, and something to specialise on.
  • The monoculture didn’t exist when there was budget. In the last boom of web-development we didn’t have a single browser that dominated the web, we had a much riskier landscape that made development harder. The testing resources, the development resources, all of this needed to be much higher in that environment. Then during the rise of the IE monoculture, the budgets were constrained, even more reason to stick with what you know and what’s safe.
  • The dominant player who didn’t have a browser, Google had the market dominance to create GMail, and rather than having to write and test on the 4 browsers they wanted to support, (to get coverage on non win32 platforms and avoid the bad PR), all they’ve had to do is use their market position to force Safari and Opera to follow the IE specifications, that of course wouldn’t've been possible if Hotmail went for the partial update version.
Will it revolutionise the world, or is it just hype?

Ajax is hype, there’s nothing wrong with that though, the product managers and marketing people need a word they can understand, “partialling updating webpages using xmlhttprequest for the server communication giving the user more responsive UI’s” simply isn’t an understandable pitch. So it needs a name, it’s a poor name, seen as verry few developers will use the XML or XHTML standard in it - XML simply because it’s too slow, and too complicated - JSON is simply simpler and faster, and XHTML simply because no-one ever uses it other than in a cargo-cult way, they certainly won’t care if it’s valid.

Even then though, I don’t think it’ll revolutionise the world, a lot of companies will blow an awful lot of cash attempting it, the current problem is still the woeful lack of competent scripters who can write such interfaces and have them degrade to an accessible, or even usable system if people change a single setting. Many of these companies will of course be putting their server guys on it, and a very out of date copy of DHTML Bible will generate atrocious, unmaintainable sites. Some might get lucky and have a competent scripter on board - there are some of us out there, but there won’t be enough to make it some great new age of web-development. Mostly we’ll see more complicated systems that don’t need the features, people are happy to move to a new page to get their flight search results, they’re only doing it briefly.

Now is certainly not a good time, we’re about to see the monoculture break down, IE7 will arrive and have a whole new set of bugs and opportunities - that’s fine for Google of course, they’re in the compatibility tests I’m sure. That’s not fine for new projects starting now, they’ve just got an open ended risk that all their work will need debugging and re-writing just as IE7 arrives. MS have traditionally done a pretty good job with backwards compatibility, but the more intensive you use javascript, the higher the chance that you’ll get hit by a bug.

Ajax is certainly hype, but the ideas are not new, and will always have their place, they just aren’t quite the all encompassing space that most people seem to think they are, it’s only in niche areas where people are spending a lot of time on a page, with only parts of it updating - email, auctions etc. The majority of sites simply won’t need it, validate a form with Ajax - you’re crazy, you’re wasting your resources…

Comments

  1. Dean Edwards Says:

    I agree that XML is usually too verbose for most web apps. JSON is certainly worthy of more attention (except that “Ajaj” doesn’t sound as good as “Ajax” ;-)). YAML is also worth looking at as alternative to XML.

  2. Dysfunksional.Monkey Says:

    As long as developers build a stable, server-side app, and then only *enhance* the UI with Ajax/Ajaj/JSRS/meh, I can’t foresee a big problem with it. I mean, I’ve been developing that way for years: build stable base, test, fix, repeat, add pretty stuff, test, fix, repeat… You’ll really only get problems when some inexperienced/wannabe developer sees what [whatever] can do and thinks “wow! I’ll build a full site/app like that!” and then only tests it in IE6. Which puts me in mind of many, many developers, who work the same way when implementing *everything*, who feel sure of their understanding that “people only use IE6, I mean, it has 98% of the market share, and users who don’t use it switch to it when the site doesn’t work in their current browser”.

  3. Ruturaj K. Vartak Says:

    Hmm….
    Ajax seems to be very interesting… I’m using it currently but the downfall is that it still lacks a request to another domain, which ideally a SOAP call would require, If you can find some thing good (make calls across domains… without a security bug..) Then it would be great