What is the benefit of referencing resources using globally-unique URIs (as REST does) versus using a proprietary id format?
For example:
In the first approach the entire URL is the ID. In the second approach only the 5 is the ID. What is the practical benefit of the first approach over the second?
Why does REST (seem to) go out of its way to advocate the first approach?
— EDIT:
My question was confusing because it really asked two separate questions:
- What is the benefit of addressibility?
- What is the difference between the two URI forms seen above.
I’ve answered both questions below using my own post.
I will answer my own question:
1) Why are URIs important?
I’ll quote from RESTful Web Services by Leonard Richardson and Sam Ruby (ISBN: 978-0-596-52926-0):
2) What is the benefit of addressibility?
3) What is the benefit of URIs over custom IDs?