Flickr and Good URI Design

I noticed that Flickr had some pretty sweet URIs, but I wanted to find out exactly what it was that made them good. To brush up on URI design, I scoured this great list of resources compiled by Tanya Rabourn:

The essence of what I found is that well designed URIs:

  • don’t change
  • are human guessable
  • are logical (no need to mirror a filesystem)
  • help visualize the site structure
  • are short
  • use lowercase
  • don’t use unexpected punctuation
  • lack query parameters
  • allow public linking
  • are stateless
  • dont expose technology

Next, I catalog the URIs used by Flickr to see how they hold up to the above criteria. It turns out, most of their URIs are quite well designed. Except for the last few in this list, Flickr URIs satisfy all the above criteria.

URIs of publicly accesible features (You can try all of these)

My photos:
One photo of my photos:
My sets:
One of my sets:
One of my sets as slide-show:
My profile:
My photos (archive view):
My photos (calendar view):
My contacts:
My favorites:
My tags:
One Group:
One Group’s Photo Pool:
One Group’s tags:
One Group’s Photos as slide-show:
Global Tags:

URIs that have private access:

My reverse contacts:
My most viewed photos:
My most favorited photos:
My most commented photos:

URIs where the user is implied from server-state

My contacts’ photos:
Comments on my photos:
Comments I’ve made:
My groups:

Those last four URIs in the list don’t quite measure up to the others. They expose technology choices, use query parameters, and are not stateless. The user that is acted upon in the feature comes from server state, not from the URI, and so do not conform to RESTian web architecture design principles. Except for those, however, Flickr has done a great job with URI design.

One Response to “Flickr and Good URI Design”

  1. Mark Baker says:

    Nicely done, especially the last four, some of which I’d run into problems with. The inability to get an RSS feed for photos of my contacts in particular, is a major pain in the butt for me. Shame too, since it need only be /photos/eakes/friends or some-such.

Leave a Reply