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

APIs on the Scale of Decades

APIs on the Scale of Decades

"APIs are hard. They are pretty much ship now, regret later." -- Chet Haase.

What do Greek philosophy, early video games, and Japanese bullet trains tell us about how we should design our APIs?

Writing any old API is easy. Writing an API that can evolve to meet your needs over the coming months, years, and even decades; now that's hard. We'll look at some common practices and try to see where they go wrong, some misunderstood techniques and how to use them better, and some less common practices that might be useful.

Let me give you some good advice that'll help you evolve your APIs, and some big ideas that might provoke some interesting thoughts.

garyfleming

August 07, 2018
Tweet

More Decks by garyfleming

Other Decks in Technology

Transcript

  1. WHY ARE THEY REGRETTABLE? > Hard to see how to

    use, > Assumptions that turn out to be wrong, > Poorly explained domain concepts.
  2. > Machine and human readable > Changeable > Easy to

    Navigate > Easy to Update Data > Lightweight Structures > Optional Types > Existing tooling
  3. > You don't necessarily save to a disk. > If

    you did, it wouldn't be a floppy.
  4. > You don't necessarily save to a disk. > If

    you did, it wouldn't be a floppy. > If it was a floppy disk, it wouldn't just be a drawing.
  5. BACK TO REST "What needs to be done to make

    the REST architectural style clear on the notion that hypertext is a constraint?"
  6. HYPERTEXT IS... "... the simultaneous presentation of information and controls

    such that the information becomes the affordance through which the user [...] obtains choices and selects actions."
  7. ACTION CONTEXTUALISES INFORMATION CONTEXTUALISES ACTION > $100. Want to transfer

    (up to $100)? > $70 > $30. Want to transfer (up to $30)?
  8. ACTION CONTEXTUALISES INFORMATION CONTEXTUALISES ACTION > $100. Want to transfer

    (up to $100)? > $70 > $30. Want to transfer (up to $30)? > 30
  9. ACTION CONTEXTUALISES INFORMATION CONTEXTUALISES ACTION > $100. Want to transfer

    (up to $100)? > $70 > $30. Want to transfer (up to $30)? > 30 > $0. Nothing left to transfer
  10. COLLECTION (NAVIGATE 2) /cats?page=2 !"#$%&'()!" > Self > Start or

    End > Prev or Next > [non-paging controls]
  11. > Affordances > The Forms of Things > Rest being

    about controls > Versioning > Testing (if I had time)
  12. WHAT ELSE DO WE WANT? > Easy to Navigate >

    Easy to Update Data > Lightweight Structures > Optional Types > Existing tooling
  13. XML WAS PROBLEMATIC > Verbose > No real structures >

    Arbitrarily complex and extensible
  14. XML WAS PROBLEMATIC > Verbose > No real structures >

    Arbitrarily complex and extensible > etc