Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Hypermedia Primer

Hypermedia Primer

The quickest hypermedia primer

C01828b92e05aea326a6e2dbeb59f373?s=128

Stephen Mizell

February 09, 2015
Tweet

Transcript

  1. Quickest Primer Ever For Hypermedia

  2. REST stands for...?

  3. Representational State Transfer

  4. First, what REST is not

  5. What REST Isn't 1. CRUD 2. Pretty URLs 3. JSON

    4. HTTP Verbs
  6. It is not about exposing your database

  7. But we design apps this way

  8. None
  9. None
  10. If we use a state machine, then how do we

    transfer state from server to client?
  11. Instead of transfering state, we transfer representations of state

  12. Hence, Representational State Transfer

  13. But what about state transitions?

  14. Hypermedia

  15. HATEOAS Hypermedia as the the engine of application state

  16. The client relies on the server to tell it what

    it can do
  17. Affordances

  18. Example: Beer glass

  19. Beer Glass: Empty State 1. Drink? No 2. Add beer?

    Yes 3. Complain of lack of beer? Yes
  20. Beer Glass: Half Full State 1. Drink? Yes 2. Add

    beer? Yes 3. Complain of lack of beer? Yes
  21. Beer Glass: Full State 1. Drink? Yes 2. Add beer?

    No 3. Complain of lack of beer? No
  22. Code time