Saturday, February 25, 2006

The Slow Demise of the Page

The world wide web was designed with a powerful metaphor: pages. It's powerful because anyone can grasp the idea in an instant, and at the same time its scope encompasses no less than the entirety of accumulated human knowledge. Of course, we already had pages for centuries on paper. The web's contribution is not its concept, but its scale; I estimate that it has already expanded the publishing privilege by three orders of magnitude, and I believe it's got at least another two up its serpentine fiber optic sleeve.

Ok, so the web is breathtaking, no argument there. The page metaphor has been wildly successful by any measure, except maybe one.

I saw my first cgi script in the spring of 1995. It was a page (there's that word again) that displayed the current date and time whenever it was requested. Some alpha geeks were huddled around a mac on the showroom floor of the campus computer store where I worked part-time. I was not yet an alpha geek, so the significance of this demonstration was lost on me. Of course the true ramifications of this development are so great that we'll have to wait a generation or so for the historians to sort it out. The browser had become a medium for delivering software instantaneously anywhere in the world.

Web applications are amazing. I owe my career to them. Incidentally, I also owe my blog and the editor I'm writing this in to them. The trouble is it's just so darn hard to shoehorn a software application into the page metaphor. Those of us who develop web applications are so used to taking this paradigm for granted that we forget how weird it is until we have to explain it to someone else.

At long last, change is in the air. With the advent of AJAX, the idea of a web application as interconnected pages is going to become rather antiquated. The correct way to think of a web application is as a DOM that can be updated in whole or in part by events from both the client and the server. In this brave new world, a URL is no longer a “location,” but a message from the client to the server.

Yes, the interface of the application is still a document (that's what the “D” in DOM is for), but the document is just an abstraction that permits you to describe a user interface in plain ol' text. Ok, maybe it's still a little strange, but it's a breath of fresh air for developers and a sea change for the world wide web.

No comments: