5 ms·
I agree. A lot of the more pedantic REST advocates seem to use this kind of thinking, such as implying that we shouldn't use descriptive URIs because the client
by tlack 17y ago
I agree. A lot of the more pedantic REST advocates seem to use this kind of thinking, such as implying that we shouldn't use descriptive URIs because the client or programmer shouldn't need to understand how the URIs are structured. If that's the case, surely we could break REST convention as much as we want and just make the programmer or client go along with it.
I think when most normal people say REST, they simply mean some sort of vague messages-over-HTTP metaformat that doesn't necessarily enforce odd restrictions about POST vs. PUT, is somewhat self-documenting and easy to work with due to the limited scope of the medium, etc.
- derefr 17y agoI don't think it was implied that we shouldn't use descriptive URIs—just that descriptive URIs should be treated in roughly the way we treat comments—they're for humans to work with, not computers, unless there is an established microformat (like the various -Doc formats used in comments) that the service can be guaranteed to obey. That microformat would, obviously, be linked to in place of the index XML file—as it would be able to be used to procedurally generate same.
- ratsbane 17y agoI agree too. Roy Fielding's dissertation on REST does say that URIs should not contain information about the identity of the user nor the details of the implementation of the resource on the server (no .php, .cgi, .aspx) but in a section on URIs (6.2.1) he does say "...REST accomplishes this by defining a resource to be the semantics of what the author intends to identify..." I read that as a requirement for descriptive URLs. And I think of Fielding's dissertation, together with a few RFCs like 2616, as the founding documents of REST.
- algermissen 17y agotlack, when you write 'A lot of the more pedantic REST advocates' you make it seem as if there was a choice to be 'strict REST' or 'less pedantic REST'. The problem with that is as follows: REST is an architectural style, which means that it consists of a set of constraints it imposes on an architecture. The benefit is that such constraints induce a set of system properties (e.g. cacheability, scalability). Usually, the choice for an architecture means that you are interested in your system having these properties. Now, if you drop constraints at will, you modify the style and do not get the desired system properties. The notion of 'non pedantic REST' (or 'Low REST') is missing the point.