2 ms·
does not having more than one URL, and not using the different HTTP methods really make a difference in terms of programmer usability? Yes. You can use librar
by jrockway 16y ago
does not having more than one URL, and not using the different HTTP methods really make a difference in terms of programmer usability?
Yes. You can use libraries when the service you're trying to interact with works according to some standard.
An example: I have an app I wrote at work that is a JavaScript frontend powered by a REST API backend. The REST API tries to be a good REST citizen: proper HTTP implementation (201 + Location when something is created, 202 for "I will get to that eventually", etc.), consistent URL conventions, and a consistent data format.
The end result is an API that is easy for humans to understand, but also easy for computers to understand: the simple CRUD code was about 10 lines of backbone.js, because my API doesn't break any conventions. This means that the code to interact with it already exists, and all I had to do was make the web page look pretty.
This is a good use of programmer resources, now and in the future. In the present, I didn't have to do any work to make a pretty GUI. In the future, someone that wants to pull data from my API will not have to swear at me -- everything you can do is easily discoverable by starting from the root resource.
- Hixie 16y agoYou can have a well-defined spec that's easy to understand without having to shoe-horn your API into HTTP's document-orientated semantics.
- stanleydrew 16y agoSure, just don't call it REST.