reduced coupling via hypermedia

2008-06-10 @ 14:07#

saw a great post on the [rest-discuss] list today regarding the importance of the hypermedia constraint when building REST-ful apps. here's the good part:

Justmake sure that this is coded in via a resource which is GETtable. That is you don't hard code using a PUT on a named resource into your code. Rather you do a GET and first find out the allowed methods and then decide what you want to do. The key is reduced coupling via HATEOAS.

in other words, use GETs to 'discover' links that handle additional tasks such as POST, PUT, DELETE, etc. *do not* hard code addresses for these things in the client code!