Which is a better long term URL design?

language-agnostic

Solution

I prefer pattern 2 for the simple reason is that the URL reads better. Compare:

- "I want to access the USERS EDIT resource, for this ID" versus

- "I want to access the POSTS resource, with this ID and EDIT it"

If you forget the last part of each URL, then in the second URL you have a nice recovery plan.

- Hi, get /users/edit... what? what do you want to edit? Error!

- Hi, get /posts/id... oh you want the post with this ID hmm? Cool.

My 2 pennies!

Problem

I like Stack Overflow's URLs - specifically the forms: - /questions/{Id}/{Title} - /users/{Id}/{Name} It's great because as the title of the question changes, the search engines will key in to the new URL but all the old URLs will still work. Jeff mentioned in one of the podcasts - at the time the Flair feature was being announced - that he regretted some design decisions he had made when it came to these forms. Specifically, he was troubled by his pseudo-verbs, as in: - /users/edit/{Id} - /posts/{Id}/edit It was a bit unclear which of these verb forms he ended up preferring. Which pattern do you prefer (1 or 2) and why?

Original source