« Predictions for 2003 | Main | New Year Resolutions »

ISBN linking: architecturally challenged?

Loosely Coupled weblog - on-demand web services

Very cool. Or is it?

The experiment began with the discovery that the ISBN numbers used to identify books in Amazon's URLs can be linked to the same information in the online catalogues of US public libraries.

Ah, hold on a moment. Amazon does not use ISBN numbers to identify its books (at least not publicly). It uses http: URLs- if you look in those http: URLs, if you parse them according to Amazon design (not the grammar of the http: URL, note), you'll find an ISBN. One thing me strikes about this. The opacity axiom of Web architecture mandates that URIs are opaque. This means we don't look inside them for information, we just use them as unique, blank identifers, or as is the case on the web, as unique, blank locators.

I've said before, on a few lists, that this opacity isn't tenable as an axiom, if we believe 'axiom' here is meant as axiom, ie a self-evident truth of the web and not just a good idea (Jeff Bone has been saying it isn't tenable for a lot longer than I have). Sure, opacity of keys is a best practice in systems design; putting semantics in identifiers, or using a key with semantics in one system as identifiers or keys in another, has always been a bogus idea. But an axiom? Hardly.

So, what Jon Udell is doing is cool and has been blogged extensively as being cool, but architecturally it's a bust? Mmm... but even assuming that the opacity axiom is merely a best practice, does that mean Jon's hacked an antipattern together, despite the utility? Jeez, I'm being a pedant, but consider what's Jon Udell's done against the wording of the axiom itself:

The only thing you can use an identifier for is to refer to an object. When you are not derefencing you should not look at the contents of the URI string to gain other information.

Craig Johnson has described this work as an exemplar of RESTful design:

So, given a creative soul (Jon Udell) and some common sense (that URL looks like it has the ISBN embedded, wonder if I can use that to see what's in a library), and some readily available tools of the web (bookmarklets), it is possible to use sources of information in an interesting new way with wonderful interesting effect. Is this the best possible end-all and be-all solution to linking repositories of books (libraries in this case but could just as easily be used book sellers for example) with book information repositories (Amazon reviews, BN reviews, could be my own personal reviews as well). No, and that is the point. That is where REST and agility come together in this case. Particularly that part about "Working software over comprehensive documentation".

I'm not at all sure about the RESTfulness of this app, then again, I don't recall Fielding's thesis saying anything contra burying information like this in identifiers. I'm too lazy right now, post christmas to go checking, but I will ;)

I am sure of this: what Jon's done is usually called screenscraping. But does it matter if it's useful? I think not.

January 1, 2003 08:31 PM


Trackback Pings

TrackBack URL for this entry: