January 09, 2006

What's New Here is that Nothing is New Here

What's new here is that nothing is new here.

I used this phrase nine years ago to open an obscure spasm of pomposity that opened the Pattern Languages of Program Design 3 book to describe the patterns movement itself. But, in the spirit of that piece, I'm going to shamelessly recycle it here, because it fits Ajax, that trendy, breakout postmodern school of web application design, to a tee.

The fascinating thing about Ajax is that it is an amalgam of existing technologies that all date back to the twentieth century. It's what the Web 2.0 crowd might call a mash-up. Only the name is new.

Jesse James Garrett

"Ajax" is short for "Asynchronous JavaScript + XML". This moniker (not the technology itself) is the brainchild of a meme-slinger who calls himself Jesse James Garrett, a handle more redolent of saddle soap than household cleaner. Garrett rides for a high-end Bay Area Buzz Boutique calling itself Adaptive Path. Garrett makes no intellectual paternity claims for the ideas proper, only for the name and the description. His web essay, Ajax: A New Approach to Web Applications cites several know uses for Ajax, and lists some defining characteristic of this style of architecture. In short, his essay is really quite pattern-like, though I don't think he claims as much. He'd certainly be entitled to do so. In any event, Garrett's essay, by conferring a name on this otherwise ineffable architectural notion, has put both Ajax and "Ajax" (to say nothing of Garrett himself) on the map.

Sun, for its part, is cautious about embracing the Ajax handle, but is not coy about this school of design itself.

Indeed, it's not clear that anyone claims to have actually invented Ajax. Instead, ad hoc designs using these technologies, such as Google Maps, Flickr, and the like, have appeared and incrementally grown more elaborate, and more refined right under everyone's noses for the last couple of years. Such is the face of innovation in the 21st century.

Now, Michael Mahemoff has exhibited no compunction in calling a pattern a pattern. Ralph Johnson pointed out this website a few weeks ago for a forthcoming book on Ajax Patterns. It is tastefully rendered, and quite engaging. I commend it to the reader's attention.

if nothing else, Mahemoff's site has encouraged me to take a harder look at MediaWiki as a pattern cultivation tool (though I've yet to do so.)

A few thoughts on Ajax:

It should go without saying that like so much of "architecture" in the web services realm, Ajax is a Worse-is-Better poster child.

Ajax applications typically shift control of an application back from the serve to the client side using a client side "engine" written in Java script. This engine communicates asynchronously with the server using XML. The server side could be written using nearly anything, but typically is written in a scripting language like PHP, Python, Perl, or Ruby.

Ajax, it would appear, has as it basis the groundbreaking architectural premise that a local rendering engine that buffer's communication with remote servers can provide a more satisfying, more responsive interactive experience to the user than can websites without one. (There I go with that tone that may strike readers as a touch sarcastic. I assure you that I don't have a sarcastic bone in my body.)

Under the hood, Ajax is an unspoken triumph for object-technology. JavaScript, PHP, Python, even Perl: all OO.

Why XML? For one thing, as always, XML can effortlessly traverse that semi-permeable membrane, that blood-brain barrier, Port 80, and hence walk through firewalls that would impede other vectors for virtual matter.

Why Javascript? Why did applets fail, and JavaScript win? Why now? It would seem that Ajax is (also) a poster-child for Moore's Law, and rolling obsolescence. Sometime around the turn of the century, 1GHz machines were all the rage, and now, the trailing edge of this Moore's Law curve has reached this point. The Ajax phenomenon is driven by the trailing edge of Moore's Law. That is to say, one can pretty much assume everyone has at least a 1GHz machine, and Windows XP or equivalent OS. Furthermore, the browser wars have essentially assured us that the vast majority of users have Javascript on the client side.

Code that would have performed unacceptably under scripting languages like JavaScript, or PHP, or Python for that matter three years ago, will run just fine now. Finally, we are spending some of our Moore's Law dividend fruitfully on something other than GUI eyewash.

In 2006, we can assume that script code that would have taken a DLL ten years ago, or a JIT'er five years ago, will run fine as-is. We can assume that the typical user buys in at broadband, and that bloated XML packets will not clog his or her plumbing. We can assume that a browser that runs JavaScript is at least in the user's back pocket. We can assume graphics horsepower that would have dropped jaws during the Clinton administration. We can assume that a 60Mb IE RAM footprint will draw only yawns. We can presume that machines that run at mere Megahertz clock rates are headed back into the closet.

Of course, the same reasoning applies more or less to just about any "LAMP-based" design.

James Governor concurs that Garrett's is a pattern naming coup here. [Michael's Ajax Patterns Tag]

Posted by foote at January 9, 2006 01:43 PM