Calendar

June 2005
M T W T F S S
    Jul »
 12345
6789101112
13141516171819
20212223242526
27282930  

June 24, 2005

Web page as contract

Filed under: integration — Mark Baker @ 12:22 pm

It’s these kinds of integration tensions that remind me why I love the Web so much.

So, apparently, Google went and updated its GMail site, which caused a bunch of Greasemonkey scripts to fail. Conspiracy theories ensued.

Dare Obasanjo takes an extreme position on the issue;

Repeat after me, a web page is not an API or a platform.

It might be extreme, but I think it’s also a reasonable position, as I expect practically all Web developers would laugh out loud at hearing that somehow the form of the HTML they write is supposed to be, in some manner, “consistent” between versions. But I feel it important to note that HTML pages do, in practice, have some important “platform” qualities.

Consider CSS style sheets, and how they bind to HTML pages through the use of selectors and the cascade, both of which use information in the HTML; change the HTML in an “inappropriate” way – changing something that the CSS was depending upon – and whammo, broken Web site.

I hear you saying, “That’s different!”. Yes, it is, to a large extent. The HTML and CSS are authored by the same person (or at least are under the control of a single entity), so the interface between them does not constitute a public platform, just a private one, providing value in the form of a separation of concerns – and the resulting improvement in reusability – to site authors.

But then again, not all style sheets are created equal! Consider user style sheets, created by the end user for their own benefit, and applied by the browser on their behalf without any involvement of the server. For example, a visually impaired user could use them to increase the size of all fonts. As can be seen by some examples though, they’re typically very generic, and so commonly use type selectors, since they are generic to the HTML language, not specific to any site. And that’s certainly a best practice that I think is worth calling out;

For maximum reuse, depend only on the language, not on the form of any particular instance of that language

So, as I see it, this is all part of the ongoing battle between the Gods of Literature; the writer, and the reader. That relationship is incredibly dynamic, at least on a Web-historic time scale, with each side constantly pushing for more control. While I doubt there’s any balance to be found there, in either the short or long term, I would say that it’s interesting to observe that recent initiatives such as Greasemonkey, Google Autolink, and even microformats (by virtue of the information they add to a page making it more reusable for readers) are finally giving the reader their due after years of largely appeasing the writer.

Update; here’s yet another example of this same tension.

• • •
Powered by: WordPress • Template by: Priss