top | item 276793

(no title)

gunderson | 17 years ago

This is a fun question. I don't, but I'm curious what you think are the most persuasive examples of services that don't fit.

One that comes to mind is a service with semantics that require a preview step. Sure you can use create/read/update via the REST verbs, but I think a lot of the confusion on this issue comes from wanting to embed the concept of events, so a read may be for the purpose of previewing an item, but it feels more natural to fire a "confirm" event than to do a post with a field called state=cofirmed.

At least that's my personal opinion. I agree that any service can be mapped given sufficient creativity, but it often seems like extra work in the context I described.

discuss

order

gaika|17 years ago

You can think of RESTful approach as an extreme case of object oriented programming when your methods are limited to CRUD.

Obviously there are cases when there's more than one way to change the state of the object that are only relevant to that object type. In the web world usually the full object state is already on the client so it is not a big deal. You can have your special methods in the client side library and still expose only CRUD methods in the service API.