Re:REST isn't what you think it is, and that's OK
by bmason on Thursday April 29, 2010 @06:40PM
(#1306361)
The only thing I'd do differently here is put the comments and author links as <link rel/> tags as well. No reason not to standardize the representation of links. Optionally you could list inline the entire contents of the sub-resources. Doc types should allow composition in this way and it allows you as a designer to reduce unnecessary traffic and latency.
Re:REST isn't what you think it is, and that's OK
by nuclear_eclipse on Thursday April 29, 2010 @03:53PM
(#1305778)
I really like that idea. Good thing I haven't started implementing my API yet. :)
Re:REST isn't what you think it is, and that's OK
by moeffju on Thursday April 29, 2010 @10:17PM
(#1306929)
This is pretty much how the Qype API works: http://apidocs.qype.com/
These "RESTful" implementations should really look like is the following:
Given such a format, I don't have to guess what the endpoints are for associated resources; I just look at the href and grab the resource if I want it.A collection could include dataset navigation information, such as:
Now I can implement a less breakable client that doesn't need to munge URL endpoints with database foreign keys. Furthermore, I can navigate through datasets by following the <link rel/> tags.