Return to Jive Software

Currently Being Moderated
6

Clearspace and Meaningful URLs

Posted by Aaron Johnson on Dec 21, 2006 9:53:32 AM

Early on, during one of our Clearspace product development meetings, we (the Clearspace development team) discussed the importance of 'hackable' or 'meaningful' URL's. In other words, if someone sent you a link to a Clearspace blog via IM or email[1|#urls-1], you should be able to figure out a lot about the blog post without viewing it in your browser. So, for example, if my boss Bill sent me an IM that looked like this:

Hey Aaron, check out this blog entry:
http://mysite.com/do/entry?publicid=4B4C0B46DC743154ECB68300531D6A04&token=

I'd probably click on it, but I sure as heck wouldn't know what Bill was sending me too. Is he sending me another link to a blog that discusses the virtues of living in Iowa[2|#urls-2] or is it something work related? I can't tell. If however, he blogged about the link in Clearspace, his IM would look like this:

Hey Aaron, check out this blog entry:
http://mysite.com/blogs/bill/2006/12/19/iowa-jokes/

With only a cursory glance, it should be immediately obvious what this blog post is about (another Iowa joke), when it was posted (December 19th, 2006) and who posted it (Bill).  We can all agree this is 'a good thing', right? Hold on though to your corn husks though, it gets better.

 

Most blog software products in the wild give up at this point: they answer the question of who, what and why by looking at the URL of a single blog post and that's it. Clearspace, on the other hand, goes the extra mile for you.  Wouldn't it be nice to see a list of all of Bill's posts on the 19th of December?

http://mysite.com/blogs/bill/2006/12/19/

or how about all the posts in December?

http://mysite.com/blogs/bill/2006/12/

or 2006[3|#urls-3]?

http://mysite.com/blogs/bill/2006/

What about all his posts that are tagged with 'iowa'?

http://mysite.com/blogs/bill/tags/iowa

Bill's a smart guy, I should subscribe to his blog, I wonder what feeds he has available?

http://mysite.com/blogs/bill/feeds

Great, I can subscribe to all of his posts:

http://mysite.com/blogs/bill/feeds/posts

and a feed of all of his posts that are tagged with 'iowa':

http://mysite.com/blogs/bill/feeds/tags/iowa

but I'd really like those in Atom format rather than the default[4|#urls-4] RSS 2.0 format:

http://mysite.com/blogs/bill/feeds/posts/atom

and it would be nice to easily be able to include a list of his posts on the homepage of our intranet:

http://mysite.com/blogs/bill/feeds/posts/json

So there you have it: hackable and meaningful URL's galore.  If you're interested in learning about how we did it, you can read about the gory details over on my blog.

Now if I could just get Bill to stop sending me links about Iowa.

 

1You're not using still using email are you?

 

2If you consider it a sport to gather your food by drilling through 18 inches of ice and sitting there all day hoping that the food will swim by, you might live in Iowa. (source)

 

3Hat tip to Tim Bray for nice way he implemented URL's on his blog.

 

4Yes, you can switch the default to be Atom.

 

1,620 Views Tags: clearspace, communities


Add a comment Leave a comment on this blog post.
Aug 14, 2007 5:52 PM Guest Pornsak  says:

One word: wow.

 

Aug 14, 2007 5:52 PM Guest Jay  says:

Hey Aaron,

 

Great work on the URLs.  I didn't appreciate how much bloggers wanted hackable URLs until I started working with blogs, you really nailed it.

 

Now, about Iowa.  We have lots of jokes about Iowa here in Minnesota.  However, all of my good friends here in Rochester are from Iowa so it's alright.  They're all Bears fans too.

 

Jay

 

Aug 14, 2007 5:52 PM Guest bill  says:

I will have you know that the whole ice fishing scene is a Minnesota thing only. Iowa is actually sunny and tropical in the winter and Minnesota is a cold and frozen snow field.

 

Go Bears.

 

--Bill

 

Aug 14, 2007 5:52 PM Guest John Nilsson  says:

http://mysite.com/blogs/bill/feeds/posts/atom

 

I think this one could be improbed, while bill feeds and posts all clearly refers to some data items or listings, atom doesn't. atom just happens to be the format.

 

I think it'd be better with this:

http://mysite.com/blogs/bill/feeds/posts?format=atom

 

It makes it more clear what (semantic) element is referenced, and seperate the non-semantic differece from the URI.

 

(Using HTTP it's even possible to let the "format" bit be worked out using content negotiation instad).

 

Aug 14, 2007 5:52 PM Guest John Nilsson  says:

Thinking another minute about this I realize that another allternative that might be a kind of 'middle ground' is

 

http://mysite.com/blogs/bill/feeds/posts.atom

 

Thus leverage the common mapping of formats to file endings.

 

Aug 14, 2007 5:52 PM Guest aaron  says:

hey John,

 

Good point, file extensions are nice.  Course, then we would have to go and add .html extensions to all the pages (when they're really WebWork actions backed by Freemarker) and I'm not even sure .atom is a standard file extension. Is there a standard file suffix for JSON?

 

AJ