Musings from Mars Banner Image
For Software Addicts: Yes!MaybeNah!
Mars Report:

Ajax: Home Was Never Like This!

Published February 9th, 2006

Netscape PhoenixWhen I first read about Ajax last summer, it sounded too good to be true. After all, I was a web geek who was raised on Netscape Navigator, and for whom Javascript had always been the holy grail of great web applications. I had delighted with each new release of Navigator, excitedly diving into the new objects, methods, and properties as they were unveiled by Netscape. Indeed, Javascript was one of the major reasons to use Netscape in the mid-1990’s, since no other browser could touch it for providing rich client-side interactivity to web pages and applications.

Then, around the time that Communicator (Netscape 4) was released in June 1997, the storm clouds that had been forming from Microsoft’s threatening posture against Netscape began to be really troubling. When IE 4 was released that fall, it finally caught up to Netscape in Javascript support. Indeed, until then Microsoft had simply been copying Javascript in order to provide Netscape compatibility, as part of their strategy to win the market. But IE 4 was different. Microsoft took Javascript in a different, and incompatible direction. Thus began the great cross-browser incompatibility nightmare for Javascript lovers like me–a dark, stormy decade that lasted until the clouds began to part in 2005 with the emergence of Ajax.

Some Timelines:

I don’t have time tonight to write the complete history, but I hope to get back and do that soon. In brief, the company I was working for at the time, Citibank, stayed firmly in the Netscape Communicator camp. At Citibank expense, I went to the Netscape Developer Conference in 1997 to hear firsthand about the latest client-side technologies, only to find Microsoft employees picketing the event, trying to crash the party. You couldn’t walk out of the complex without some Microsoft hiree trying to stuff leaflets in my jacket, explaining how wonderful Microsoft IE was going to be. It was really sick, and that behavior was symptomatic of Microsoft’s no-holds-barred, anything-goes war against Netscape. A war that unfortunately they ultimately won.

But I learned a huge amount about Communicator and Javascript 1.2 at that conference, and I returned all fired up to redesign our corporate Intranet using the wonderful new layers tag, CSS, events, and all the other shiny new toys that became available. Since we were a Netscape 4.0-only shop, I was free to program the site with abandon using the layer tag, glancing nervously over my shoulder at this new totally incompatible DOM that Microsoft had foisted on the world.

Microsoft’s idea was to use something called document.all, which would rely on getting the ID of the page element you wanted to reference. This concept was similar to the getElementById that ultimately won acceptance by the w3c, which was still in the process of developing its version of the DOM. getElementById was not only a horrible mouthful compared with the elegance of layer, it was also much more complicated to learn and employ. For awhile, I couldn’t imagine it actually gaining traction. But of course, by 2000, Microsoft had crushed Netscape, the w3c’s DOM was the accepted standard, and Microsoft went on to smother the web with everything Windows they could think of.

I’m not doing the story justice, because I’m in a rush this evening, but bear with me as I reminisce for a few more moments.

Ajax is great because it returns rich interactivity to the web client, and the winners will be not only web developers who “get it” and do great, exciting new things with it, but more importantly, customers and visitors, who will finally see that websites don’t have to be boring scrolling, clicking, waiting, clicking, scrolling, loading, reloading labyrinths in which you try not to get lost. Persistence is again within grasp, and web applications are going to finally live up to their potential. Google maps was just the beginning, and the Ajax steamroller is picking up steam.

We’ll soon be free of consultants who advise clients that Javascript should be avoided, and that all interactivity should spring from server processes, citing this reason or that. That attitude has kept us stuck in 1994, when perl and CGI scripts were all the rage. Remember when imagemaps were new? Yes, that’s right, they were originally server-based maps until Netscape introduced client-side imagemaps in Netscape 2.0.

Netscape's Layer TagMy sharp point today is that as delighted I am to see Ajax returning, part of me is sad and angry when I think about the wasted years we spent wandering in the wilderness deliberately created by Microsoft with IE 4.0. If Netscape had kept their lead with Javascript, we would have had rich Ajax applications back in the late 1990’s. Think I’m nuts? Well, consider this: The layer tag already had the capability of loading server content onto existing pages back in 1997. No, you couldn’t do this with DIV’s and the DOM at that time, and you couldn’t get there with Microsoft’s iframe, try as you might. But I was able to do Ajax-style code in 1997 for Citibank’s Intranet. Take a fresh look at what the layer tag gave us, and it might make you a bit nostalgic, too. (Note: The attached PDF file (280kb) is an excerpt from the Javascript 1.3 documentation of layer, including the layers property of document, 1998. Here is a link to the layer specification for Javascript 1.2 from the Sun website.)

Besides its amazingly elegant implementation of events, CSS style manipulations, and DOM properties, layer had the lovely, convenient, and logical src attribute:

A string specifying the URL of the layer’s content.

To my way of thinking, layer was a logical extension of HTML and together with the new CSS capabilities, had everything an interface designer could want. But it was not to be.

Having long ago resigned myself to DIV and getElementById, I hadn’t given layer any thought for many years until Ajax came around. When I heard what it was, my mind immediately flew back to that src attribute. Of course, to read that Microsoft was being credited with creating HTTPRequest only made my head ache a little. Well, let me just say very clearly that Microsoft did not originate the idea of allowing asynchronous calls to a server to retrieve content in the background. Even when they added it to IE, they didn’t exploit it. Why? *sigh* You’re not paying attention!

The web is not the way Microsoft wants to win. Yes, they want to win the web, and they almost did. (I think we’re through with that now, aren’t we? Firefox is on the rise, and so is Mac OS X and Safari.) But what Microsoft really wants is to maintain control of the personal computer, and to make sure developers write applications that work only in Windows. That’s a hard thing to do when you’re dealing with open standards like XML, CSS, HTML, and Javascript. Much easier to do when you get people to write Windows applications. So why would they push rich HTML/Javascript applications when that could backfire by showing developers and customers how great a web browser can really be?

And as sour as I sound about what’s happened since 1997, I want to emphasize how thrilled I am to see Javascript returning to a place of respect in the developer’s toolbox. For too many years, I had to hide my enthusiasm for Javascript. It was considered “evil”, like cookies. Or it was considered uncool, or it was a weak, unstructured, unsophisticated language unworthy of brainpower.

Imagine my delight to wake up in 2005 and discover prototype, Rico,, dojo, and the rest? The nightmare of Netscape 4 (for that’s how it ended up appearing to everyone) is now over. IE 5 on the Mac is dead. IE 6 will soon be dead (thank god), and developers have the pleasure of working with mature, sophisticated, powerful Javascript/CSS libraries and frameworks. We’ve finally got stable, amazing, Javascript widgets! We’ve got cool, elegant effects! We’ve got Ajax!

To celebrate, I started redesigning my WordPress blog a few weeks ago. I settled on using prototype and the library, though there are many other very good ones. The more I studied prototype, the more impressed I became. And is simply too beautiful and amazing to ignore. I’ve still got some polishing to do on some of these widgets, but I’ve got Ajax in the “newsbox” that displays links from my library, Ajax in the “newsarticle” free-floating box that displays individual items, Ajax in the new tabbed navigation panes in the sidebar, and effects putting a gleam on everything. I’ve even fooled around with drag and drop in the sidebar (yeah, you can rearrange the tabbed panes if you like), and I have big plans for using that next on my e-commerce site, Classic 45’s.

Yes, there are still a few wrinkles in building rich web interfaces… both in the toolbox and on developer’s foreheads. But nearly all of them stem from IE 6.0’s dreadful support for CSS, and hopefully that will soon fade.

In 1996, Javascript was well on its way to winning the desktop for the web browser. In 2006, I predict, it finally will. Long live Netscape Navigator!

  • Google
  • Slashdot
  • Technorati
  • blogmarks
  • Tumblr
  • Digg
  • Facebook
  • Mixx

Show Comments
Just Say No To Flash