Javascript in vogue

Thursday 23 February 2006 at 23:37

A little gratuitous tooting of my own horn. One of the benefits of blogging is that I can point to myself when I want to say "I told you so." Tim Bray had this to say about the real upside of AJAX

Pretty well all Web-publishing software does lots of templating and dynamic page generation, and pretty well all of it is piggish, stressing out servers (and, to be fair, representing a pretty good business opportunity for my employer).

I suspect there’s a huge system-wide optimization waiting out there for us to grab, by pushing as much of the templating and page generation work out there onto the clients.

That sounded remarkably familiar... I wrote something along those lines in June of 2004: JavaScript form vs content. But, Tim, I think it's more than just a performance play. It's a search engine force multiplier:

How about stripping all of the navigation clutter out of a web page and using JavaScript to insert it for web browsers. Instead of just extracting a pullquote or adding paragraph anchors, add all but the most essential navigation via JavaScript. It would be a more extreme separation of form from content. Give the Googlebot and its colleagues only the relevant content in the page and none of the tangential navigation.

I'd also want to make use of tags to store the "related items" or "see also" kinds of info. Some navigation links don't belong inline with the post itself but are sufficiently related to the content that they would do well to be included in the page -- the stuff that would help the search engines connect the dots.

The JavaScript code could extract data from the link tags to produce content-related navigation in addition to the common header and sidebar.

....

[There was another source] of inspiration. I'm tired of landing on sights because they happen to mention one of my search terms in their side bar but nothing in their content is related to my search. There's just enough in the Google snippet to lure me to click, but only disappointment to be found when I get there.

But I can't just toot my own horn. The fact is that I posted this in 2004, two years or more after I'd first seen the light with regard to Javascript. Like most people I used to turn my nose up at Javascript 'cos I thought image rollovers and flashy HTML was mainly tacky eye candy. Then we hired Scott Shattuck at PlanetCAD in 2001 or 2002. At that time TIBET was already an in-browser Javascript IDE and development platform! I pretty much concluded from the demo Scott gave me that he and Bill Edney were insane. But in retrospect you have to give them some credit for noticing that Javascript was even then the most widely deployed programming language in the world. Scott also gets credit for introducing me to Jython -- the python starter drug. So as long as I'm being a blogsphere pilot fish [1], I'll point Scott's way too, 'cos he and Bill deserve a lot of praise for some crazy foresight about why you should care about Javascript. For a little more about where TIBET fits into the picture, have a look at Two kinds of AJAX: HTML++ vs Client / SOA

[1] This may be an obscure metaphor. Wikipedia entry on Pilot Fish "The pilot fish is known for following large vessels and sharks, where it apparently feeds on parasites and leftovers." I think the first time I saw anything about pilot fish was on a segment about whale sharks. So in this context, the big fish is Tim Bray and I'm really just drafting :-)