from a Yahoo! and XML geek

Quick Links: Consulting | Book info | Brain Attic | Home

Push Button Paradise

Micah Dubinko

Fri, 17 Feb 2006

Box Yourself In

This is somewhat an addition to Tom Coates's posting, specifically his list "Native to a Web of Data". His points 4 and 5 are the topic here, "Identify your first order objects and make them addressable" and "Use readable, reliable, and hackable URLs".

Part of effective design is boxing yourself in to the appropriate degree. Some designers resist any kind of constraints on what they can do, but this is a serious mistake; it ignores The Power of No. The tradeoff here is present usability versus future expandability. Focusing on the future too much takes a toll on the present.

As a positive example, look at del.icio.us URLs. It's easy to browse http://del.icio.us/mdubinko for all items under a given user, or http://del.icio.us/tag/mead for all items with a certain tag, or even http://del.icio.us/mdubinko/mead for all items under a given user and tag. With this beautiful simplicity comes limits: no user can be named 'tag', and everything in the URL space past the username is pretty much spoken for.

Many misguided designers would go to extremes to avoid this, with the worst cases giving all URLs GUIDs components (typically as parameters). Such URLs are neither readable nor hackable.

I run into a negative example frequently in the XML world. It's bad enough that XML namespaces use three-part names, but on top of that, the design bakes in an extreme aversion to "hard-coding" any prefixes. Where is the benenfit in allowing prefixes like jasdfklewrsdfnrrrrrrf to map to the XHTML namespace? Or redefining prefixes? What tiny fraction of people actually need this complexity? Think how many programmer and designer-hours would have been saved in the html:prefix and maybe 4 or 5 more had been hard coded, the way the lone xml:prefix is. One small bit of boxing-in could have probably short-circuited a huge namespace war (the three-namespaces-or-one debates) and prevented premature baldness of countless XML-heads.

I'm starting to think that the "use-http-URIs-for-everything" camp is heading in a similar unfortunate direction. I need to think a bit more on that one, though. Comments welcome as always. -m

posted at: 22:30 | under: 2006-02 | 1 comment(s)



Joshua Schachter admitted that his biggest mistake in retrospect was putting user names at the root of the uri hierarchy. The Flickr folk also admitted to some poor initial uri design that restricted the flexibility of their designs for scalability. The problem is that you have to support uris forever since good uris never break. This only accentuates the importance of thinking upfront about your resource modeling.

I'd point to Erik Benson's allconsuming as an example of uri space design that is cleaner and similarly simple (albeit slightly longer uris).

http://www.allconsuming.net/person/amaah
user tags
http://www.allconsuming.net/person/amaah/tag/drama
global tags
http://www.allconsuming.net/tag/fiction etc.

In any case, I'd be happy if every important resource has a uri - which is very far from the case in many applications. What we're ultimately talking about is the amount of glue that needs to be deployed to write client apps on the one hand, and the number of mod_rewrite rules that one uses on the server side on the other.

In the former it's inertia that counts, programmers are lazy on the whole and won't build on top of your service if there's too much impedance. In the latter case, it's a case of minimizing complexity...
Posted by Koranteng Ofosu-Amaah at Sat Feb 18 07:32:37 2006


Syndicate: RSS feed

What am I reading?
Don Quixote
Self-Editing for Fiction Writers
The Complete Joy of Homebrewing
Analog magazine
Compilers
TAOCP


What am I browsing?
BlogFour
Blake Ross
Brianstorms
Caveat Lector
Claus Wahlers
Copia
Cringely
David Temkin
Dave Hyatt
Groklaw
Mark Birbeck
M.David
Miguel de Icaza
Mitch Kapor
Norm Walsh
Omar Tazi
Sean McGrath
Sjoerd Visscher
Ted Leung
Tom Bradford
Wil Wheaton


Archives:
Link

Powered by PyBlosxom