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

A Shift of Mind

Z
July 28, 2014

A Shift of Mind

HTTP is legacy. Let's focus on architecture instead. API Craft 2014

Z

July 28, 2014
Tweet

More Decks by Z

Other Decks in Programming

Transcript

  1. • Web API description language • Pure Markdown • Designed

    for humans • Understandable by machines • Open & Free API BLUEPRINT
  2. TOASTER AUTOMATON Waiting Holding Bread Cooking Finite State Machine Insert

    Eject Cook Eject Set Cook Time Set Cook Time Set Cook Time
  3. RESOURCE BLUEPRINT # Toaster Automaton API ! ## Resource Toaster

    ### Attributes - cook_time (number) - Cook time in seconds - toast - Toast inserted in the toaster, if any
  4. RESOURCE BLUEPRINT # Toaster Automaton API ! ## Resource Toaster

    ### Attributes - cook_time (number) - Cook time in seconds - toast - Toast inserted in the toaster, if any ! ### Affordances - insert - eject - cook - set_cook_time
  5. RESOURCE BLUEPRINT ### States - waiting - Affordances - insert

    -> holding_bread - set_cook_time -> waiting ! - holding_bread - Affordances - eject -> waiting - cook -> cooking - set_cook_time -> holding_bread ! - cooking - Affordances - eject -> waiting - set_cook_time -> cooking
  6. • Resource Blueprint – https://github.com/apiaryio/api-blueprint/tree/ resource-blueprint • API Blueprint –

    http://apiblueprint.org • Apiary – http://apiary.io • API Craft – http://apicraft.org • Issue #13 – https://github.com/apiaryio/api-blueprint/issues/13 REFERENCE
  7. TOASTER EVOLUTION Cooking Set Cook Time • Server stops offering

    set cook time in the cooking state • Client not following available affordances from server will break • Client following available affordances from server will stop showing the set cook time UI controls
  8. TOASTER EVOLUTION Waiting Cooking Insert = Cook Eject Set Cook

    Time Set Cook Time • Toaster now immediately cooks after bread is inserted • Client not following available affordances from server will break • Client following available affordances from server will still be able to make a crispy toast
  9. TOOLS PROLIFERATION • generate Blueprint from: JSON, YAML, cURL trace,

    RSpec ! • generate from Blueprint into: API reference, Postman collection, acceptance tests, client code, API mock, SDKs