-
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), Dave Goldberg (@davidgoldberg), Jim Nardecchia, (many more)
Round table on how we are expressing available state transitions for 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 be 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. For example, 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 to make state transitions discoverable. Everyone is encouraged to keep experimenting with hypermedia API's. The more examples produced, the better we, as a community, can refine best practices for expressing resource state in a discoverable API.