-
Notifications
You must be signed in to change notification settings - Fork 0
Expressing a Resource's Available State Transitions
James Pozenel (@lectrotext)
Kevin Swiber (@kevinswiber), Steve Klabnik (@steveklabnik), Jim Nardecchia, (many more)
Round table on how you are expressing available state transitions for your resources.
-
Add available state transitions as part of a resource AKA Forms. This is an increasingly popular way to serve actions to the client and doesn't require additional service requests to discover actions that can taken.
-
Using a state machine resource. Sending requests to a state engine that can reply as to the state of the resource in question. Requires additional requests to find state. Off loads the available states data payload to another resource.
-
Steve Klabnik shared the concept of "Verb Exercises" to explore all the state transitions for a resource. During architecture phase describe all the functions of a resource as a paragraph. Underline the verbs and these verbs become a guide to explaining all the state transitions available.
-
Resources can be bound by context as well. Example of a Pizza was used. A pizza can have varied contexts (creation, cooking, consuming, etc). Resource context can completely change the kinds of actions available for that resource.
No one has yet figured out the best way. Everyone is encouraged to keep experimenting with hypermedia API's. The more examples produced the better we as a community can develop best practices for expressing resource state in a discoverable API.