REST and URLs
REST and URLs
Join the DZone community and get the full member experience.Join For Free
The problem with that is that this has very little to do with REST. Now, I’ll be the first that will tell you that discussions about architectural purity bore me, and I really like the concept of nice URLs. But nice URLs are totally different from REST.
These slides do a really good work of describing what REST is and how to work with it.
It wasn’t until I actually was called to do a code review on an application written by Rob Eisenberg that I really got it. That application was a pretty simple UI (well, the UI logic was simple, the UI itself was pretty complex, but that was mostly because of the visualizations). The interesting thing is that most of the UI was completely driven by the response from the server.
What I mean by that is that when you loaded an entity, it would load the appropriate view, and use information like this:
<link method="DELETE" title="Cancel" rel="rels/cancelOrder" href="/orders/1234"/><link method="GET" title="Shipping Details" rel="rels/viewShipping" href="/orders/1234/shipping"/>
To generate much of the actual behavior on the client side.
The client was fairly stable, but modifying the server meant that you could get a lot more from the system.
Human readable and hackable urls are nice, sure. But they have very little to do with REST.
Published at DZone with permission of Oren Eini, CEO RavenDB , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.