Sunday, April 27, 2008

Non-intrusion and the web

In responding to a comment on a previous post, I mentioned that there are ways to refer precisely to a piece of something on the web, even if that something isn't specifically set up for it. It's easier and more robust if the document you're linking to has fine-grained markup, but it's not impossible to say "so many characters into document X" or "right after the words 'Chapter II'" or something similar. At worst, with a little scripting (I wave my hands here) you could pull up the right passage more or less automagically on a browser and no one need know the difference.

There is a general principle at work here. Changes to any given system may be intrusive or non-intrusive. An intrusive change requires changes to what's already there. A non-intrusive one doesn't.

If I wanted to compile an annotated list of terms people use for colors, I could use an approach like the one above and get a list that might get out of sync if someone updates a document I'm pointing at, but which should work well enough in practice. If I tire of having to keep my hand-crafted links in sync, I could try to get some particualr tag inserted at any mention of a color. That would make my job a lot easier, and the people maintaining documents in my list could edit to their hearts' content so long as the tags got maintained properly.

This is the basic tradeoff. An intrusive change requires cooperation from all involved, but can result in a more cohesive system. A non-intrusive change expects less, but possibly at the cost of cohesion. The architectural sweet spot is a resource that can provide convenient handles for anything useful it provides, without knowing or caring who's using it or what it's being used for. This is often easier said than done.

The web is a big place. The chances of convincing everyone else to change for the sake of your change diminish sharply the more people you have to convince. If it's more than just a few close friends, you generally need a really good reason. "You want me to re-do my page so you can track color terms I use in it? Um, no."

That's not to say you can't offer a good reason for making a change, while still offering something of lesser value in case the change doesn't happen. People do that all the time, and it often works. There's a big difference between offering and demanding.

It's not surprising that non-intrusion is a fundamental part of what makes the web work, and what makes the web the web. Off the top of my head:
  • Once you've given something a URL, anyone can reference it in any way they want. You don't have to give out a new URL, or do anything at all, whenever someone wants to reference your resource.
  • Search engines index huge masses of documents by content without those documents having to do anything special at all (if you want to, you can add "meta" tags to help this along, but you don't have to).
  • More fundamentally, there's no requirement that a resource even exist for a given URL. Obviously a page with lots of broken links for no reason is not a very useful page, but you don't have to have to finish everything before publishing anything. And a good thing, else nothing would ever get published. Wikis are a famous example of this principle in action.
  • Tagging services like del.icio.us attach metadata to pages without changing the pages themselves.
  • Mashups are all about re-using resources in new and unanticipated ways.
It's interesting that a system built on the idea of everyone being able to communicate with everyone relies fundamentally on the idea of not having to.


Lexicographical note: Backward-compatible is more specific than non-intrusive, but otherwise very closely related. A backward-compatible change is generally within a given system: The new one will do everything the old one will and more. Non-intrusion is more about being able to add an entirely new piece without anyone else even having to know about it. I'll generally know that I've moved up from version 6.1 to version 6.2, backward compatibly, but I may not know that, say, my web page is being mashed up with someone else's in ways I never anticipated, non-intrusively.

No comments: