To continue the discussion a bit further, I would like to recommend Steve Klabnick upcoming book "Designing Hypermedia API"
http://www.designinghypermediaapis.com/In Chap 13, Steve says:
"Since your process is what your users want, just give that to them! This is the essence of hypermedia: use the links, forms, and other affordances to guide your users through your business processes and workflows.
This is also why we design state machines as part of the design process: they model these workflows, and that’s what we want to expose.
By exposing your workflow rather than your data model, you’re free to change data models at a later time. Your clients don’t have to duplicate your business logic, they can just follow the hypermedia and let it guide them through. This also means that your clients will be more resilient to change, due to this decreased coupling. If you offer a new workflow, a well-made client will be able to automatically present it to your users, with no code updates."
Users really want to output of the process (not the process itself but this is a minor detail). Users want to reach a goal that can be achieved by following what Steve calls a workflow. Workflows are really implementation specific… so I would rather call these behaviors to stay at the user level. But this is the same concept at play.
The servers need to publish the goals that can be achieved.
Consumers can query for goals and find matches… then download the "behaviors" for execution on the client side.
"This idea is what Fielding calls the ’mobile object’ style: your object travels over the network to do some processing."
"I think that developers also tend to make their APIs too low level. That’s sort of what I’m saying already with ”don’t expose your tables“, but this is really at the root of it: that’s too low of a level to be appropriate. Exposing your data model forces your clients to recreate your business logic to copy your business processes, which is probably why they use your service in the first place."
I would rephrase this by saying that the users do not care about your data nor your processes but the product that meet their needs that can be generated by your services (user goal).
Thanks Steve. Great book… [I still have problems reading it on my IPAD… I hope you will resolve the formatting problems soon]
Pat.