In his post on the states and transitions of a resource he claims that REST has no way to let a client know what state transitions are available for a given resource....
Um, what is hypermedia?
Distributed hypermedia provides a uniform means of accessing services through the embedding of action controls within the presentation of information retrieved from remote sites.This quote is just the introduction to hypermedia and REST, but we already have an answer.
Action controls are embedded. Action controls are embedded.
Embedding the action controls means
- The client doesn't need to have generated (and hard-coded) client stubs.
- The server can change it's rules and expand available states as needed.
- The client does need to process a generically extensible content type.
Perhaps more directly on point is this quote from 5.3.3 Data View:
The model application is therefore an engine that moves from one state to the next by examining and choosing from among the alternative state transitions in the current set of representations.Jean-Jacques' answer to how to share types, constraints, correct states, and transitions is not suprisingly: a schema and a business interface. Let's take those four goals one at a time:
- Types: definitely covered by IDL (until the systems changes then you need to tell everyone to re-compile...)
- Constraints: Not even covered a little by todays SOA technologies. Until there is an OCL or Catalyis (or Z or ...) model that get's compiled with WSDL the best a schema and business interface will have for constraints is a few lines of prose... (in <!-- XML comments no less!! -->)
- States: WSDL is not much help, maybe you can infer the states from the operation names? SSDL I think actually does cover this...
- Transitions: Same as states; how do we deduce which operations are transitions?
Static class diagrams (WSDL) and code-generation are so much more in my control and experience. If only they worked for distributed systems without so many negatives...
The complete ignorance of hypermedia and FUD in the blog posting compelled me to respond and put my $.02 in.