This is a single archived entry from Stefan Tilkov’s blog. For more up-to-date content, check out my author page at INNOQ, which has more information about me and also contains a list of published talks, podcasts, and articles. Or you can check out the full archive.

Moving Beyond Methods in REST

Stefan Tilkov,

Mark Nottingham:

While there’s a nice internal logic to mapping HTTP methods to object methods, it doesn’t realise the power of having generic semantics.

While I agree there's a lot to be improved in existing HTTP APIs, I'm not sure this is the most pressing problem. I'd rather somebody bring up some ideas on how to exploit the hypermedia aspects ...

On March 20, 2008 11:26 AM, Mark Nottingham said:

Low-hanging fruit first… :)

On March 20, 2008 11:28 AM, Stefan Tilkov Author Profile Page said:

Fair enough :-)

On March 20, 2008 1:13 PM, Bruno Luiz Pereira da Silva Author Profile Page said:

Something I’d like to see more discussions is Resource Transformations. When you’re developing RESTFul services that go somewhat beyond CRUD, you might have several resource transformations.

When a given resouce changes to or from some state, there might be transformations on other resources. For example, let’s think of some Amazon sales process where you have Item and Order resources and several related resources like billing and logistics stuff. When the user pays for the Order, some transformation in billing resources would apply a transformation to the Order resource, changing its state to “paid”

When the Order resource has its state changed to “paid”, we could have transformations applied to logistics resources, telling the delivery system to deliver the order.

This kind of resource transformations appear a lot when you’re developing RESTFul services that are more than CRUD. I think a very good approach to solve this is using finite state machines, defining what resource states we have and what happens in every meaningful state transition.

I’d like to see more discussion about this kind of things, because resource transformations might be very tricky, and complex RESTFul services definitely need them.