Restful Web Services

Leonard Richardson and Sam Ruby book on ReST-ful Web Services ISBN:0596529260 . ROA = Resource Oriented Architecture.

Interesting how they prefer using XHTML as a format instead of XML. Partially because it's more of a HyperMedia format, which makes it easier for them to provide links from resource to resource (HATEOAS: Hypermedia as the engine of Application State), and even use Web Forms as a way of documenting search param formats, etc.

Leonard Richardson blog entry on using suffixes to denote representation format varieties (Atom Standards vs HTML, different languages, etc.)

Ah, around p252 I see the piece I want. I want to have as similar a structure between a ReST interface and the Web Browser-targeted interface as possible. There's the model:

  • design your whole system as a WorldOfResources, and turn operations/functions/transactions into CRUD operations on Resources

  • when you can't or don't-want-to use HttpPut and HttpDelete (LoRest), use HttpPost but passing '_method=delete' as a param in either the URI arguments or header/hidden params.

Helpful reference appendices giving opinions on usefulness of various HTTP Responses and Headers.


Edited: |

blog comments powered by Disqus