RESTful URL design… and stuff

I have a question about RESTful URLs which is going to sound pretty trivial and boring unless you’re a RESTafarian… apparently they exist.

Say I have a resource with the URL http://widgets.com/widget/1 to which I can GET, POST, PUT and DELETE. If I want the user to have an overview of widget 1 they can GET this URL, similarly for DELETE. But if I want to point them to a form where they can edit the widget (which I don’t necessarily want to display by default), what would a RESTful URL be?

http://widget.com/widget/1/edit ?
http://widget.com/widget/1?action=edit ?
http://widget.com/widget/edit/1 ?

What if I have a page which lists all my widgets, should that be
http://widget.com/widgets
or
http://widget.com/widget ?

There’s an article on URI design by Timbl which contains lots of “don’t”s but not many “do”s.

In other news…

I am furious with PlusNet for losing two years worth of emails I had stored on their IMAP server (along with everyone else’s). I had “backup email” on my to do list for about a year, shame I relied on an ISP to back up my data. There were a lot of important emails in that inbox. I’m going to start looking into running my own mail server so at least if I lose data I know it’s only my own fault. I’ve been meaning to play with Hula for ages but I’ve been waiting for their first stable release for over a year! They gave a talk at LugRadio Live and it sounds like the stable release is coming, but it’s still going to be a while (I can’t help but feel they’ve missed the boat a bit). I also have a book on Postfix which I might dig out.

Continuing in the theme of storing my own data, I’ve started on a new Drupal version of my now 5 year old homepage, which I plan to migrate my LiveJournal blog to if and when I figure out how to do it.

I found out that I didn’t win the IET Write Around the World Competition again this year, no suprises there really. The judges’ feedback boiled down to: well written, technically sound but boring as hell! I admit they have a point, I didn’t like it myself once it was finished.

Leave a Reply

Your email address will not be published. Required fields are marked *