Page:Aaron Swartz s A Programmable Web An Unfinished Work.pdf/27

2. BUILDING FOR USERS: DESIGNING URLS 15 are typically three other types of pages: subpages (which drill down into some aspect of the nouns), site pages (like about and help and so on), and verbs (which let you do things with the nouns).

Subpages are some of the easiest, and some of the most difﬁcult. In the easy cases, you just indicate the subpage by adding a slash and a slug for the subpage. So, if your page for Nancy Pelosi is at:

http://watchdog.net/p/nancy_pelosi

it seems pretty obvious that your page on her ﬁnances should be at:

http://watchdog.net/p/nancy_pelosi/finances

Sometimes the majority of your site is subpages. So with Twitter, a user’s page is at:

http://twitter.com/aaronsw

while their status messages get URLs like:

http://twitter.com/aaronsw/statuses/918239758

(Notes: The “statuses” bit is redundant and the number way too long.)

But things get more complicated when your nouns have more complex relationships. Take Delicious, where users post links under various tags. How should things be structured? user/link/tag? tag/user/link?

Delicious, which for a long time used its URL scheme as a primary navigation interface, is so brilliant at its URL choices that it should be carefully studied. They decided that users were the primary object and gave them the whole space in ‘/‘ (like Twitter). And underneath each user, you could ﬁlter by tags, so you have:

http://delicious.com/aaronsw (links from me) http://delicious.com/aaronsw/video (links from me tagged “video”) http://delicious.com/aaronsw/video+tech (links from me tagged “video” and “tech”)

And then they created a special pseudo-user called tag that lets you see all links with a tag:

http://delicious.com/tag/tech (all links tagged “tech”)