What does using RESTful URLs buy me?

Posted by Spike Williams on Stack Overflow See other posts from Stack Overflow or by Spike Williams
Published on 2010-04-09T21:07:58Z Indexed on 2010/04/09 21:13 UTC
Read the original article Hit count: 546

Filed under:
|
|

I've been reading up on REST, and I'm trying to figure out what the advantages to using it are. Specifically, what is the advantage to REST-style URLs that make them worth implementing over a more typical GET request with a query string?

Why is this URL:

    http://www.parts-depot.com/parts/getPart?id=00345

Considered inferior to this?

    http://www.parts-depot.com/parts/00345

In the above examples (taken from here) the second URL is indeed more elegant looking and concise. But it comes at a cost... the first URL is pretty easy to implement in any web language, out of the box. The second requires additional code and/or server configuration to parse out values, as well as additional documentation and time spent explaining the system to junior programmers and justifying it to peers.

So, my question is, aside from the pleasure of having URLs that look cool, what advantages do RESTful URLs gain for me that would make using them worth the cost of implementation?

© Stack Overflow or respective owner

Related posts about rest

Related posts about url