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

Future of APIs

Z
December 13, 2016

Future of APIs

The deck I've used during my talk at API Days Paris 2016.

Z

December 13, 2016
Tweet

More Decks by Z

Other Decks in Programming

Transcript

  1. FUTURE OF APIs On API Design and the future of

    API Description formats Z (@zdne) goodapi.co GOOD API
  2. Memorandum For Members and Affiliates of the Intergalactic Computer Network

    Consider the situation in which several different centers are netted together, each center being highly individualistic and having its own special language and its own special way of doing things. Is it not desirable, or even necessary for all the centers to agree upon some language or, at least, upon some conventions for asking such questions as “What language do you speak?” At this extreme, the problem is essentially the one discussed by science fiction writers: “how do you get communications started among totally uncorrelated 'sapient' beings?.” GOOD API
  3. WHAT WE THINK API IS GOOD API MACHINE EXPOSES INTERFACE

    ANOTHER MACHINE LEARNS & USES INTERFACE MACHINES MEET OVER THE NETWORK discovery machine to machine
  4. REALITY GOOD API MACHINE EXPOSES INTERFACE ANOTHER HUMAN READS DOCUMENTATION

    HUMAN WRITES DOCUMENTATION ANOTHER MACHINE IS TAUGHT TO USE INTERFACE HUMANS MEET discovery
  5. API TURK GOOD API MACHINE EXPOSES INTERFACE ANOTHER HUMAN READS

    DOCUMENTATION HUMAN WRITES DOCUMENTATION ANOTHER MACHINE IS TAUGHT TO USE INTERFACE HUMANS MEET % %
  6. SYNCHRONICITY GOOD API INTERFACE ACTUALLY EXPOSED INTERFACE DOCUMENTED INTERFACED USED

    are they the same? are they the same? are they the same?
  7. HUMANS INVOLVED • Error-prone • Opportunity for missed understanding •

    Doesn’t scale GOOD API speed and resources humans do errors is “title” the same as “heading”?
  8. POPULAR SOLUTIONS • Processes • Generate documentation • Generate code

    • Complex Tests • Hire more people • API Portals, catalogues GOOD API
  9. HUMANS IN API TURK GOOD API MACHINE EXPOSES INTERFACE ANOTHER

    HUMAN READS DOCUMENTATION HUMAN WRITES DOCUMENTATION ANOTHER MACHINE IS TAUGHT TO USE INTERFACE HUMANS MEET % %
  10. HUMANS IN API TURK GOOD API MACHINE EXPOSES INTERFACE ANOTHER

    MACHINE IS TAUGHT TO USE INTERFACE % % API DISCOVERY Understanding WHAT & HOW
  11. HUMANS IN API TURK • API DISCOVERY • Understanding WHAT

    • Understanding HOW • Programming Is there a service… …that gives me weather in Paris… …and I know how to call? Great! Let’s hook it up with my program! GOOD API
  12. AUTONOMOUS APIs GOOD API MACHINE EXPOSES INTERFACE & PROFILE AND

    REGISTER ITSELF AT DISCOVERY SERVICE ANOTHER MACHINE IS TRAINED TO USE A VOCABULARY & DISCOVERY SERVICE API DISCOVERY SERVICE
  13. • Share understanding at RUNTIME • Affordances • Data •

    Programming for a VOCABULARY not data structure • AUTONOMOUS service discovery GOOD API AUTONOMOUS APIs
  14. DECLARATIVE CLIENT PROGRAMMING // Using a terms from schema.org dictionary,

    // find services that offers WeatherForecast. services = apiRegistry.find(WeatherForecast, { vocabulary: http:// schema.org}) // Query a service for WeatherForecast at GeoCoordinates. forecast = service.retrieve(WeatherForecast, { GeoCoordinates: … }) // Display Temperature print forecast(Temperature) GOOD API
  15. • Sharing understanding at RUNTIME • Working with VOCABULARIES •

    AUTONOMOUS service discovery GOOD API FUTURE APIs will be
  16. • Reduce costs • Reduce errors • Reduce time to

    market • Enable scaling • Enable API changes, evolution, resilience • Enable reuse GOOD API FUTURE APIs Instagram client used for FB, Twitter, LinkedIn etc.
  17. WSDL – 2000 WADL – 2009 SWAGGER – 2010 API

    BLUEPRINT – 2012 RAML – 2013 1999 – REST 2020 – Autonomous APIs QraphQL – 2016 GOOD API ALPS – 2015 Web API Design Maturity OBJECT CENTRIC RESOURCE CENTRIC AFFORDANCE CENTRIC – 2020 Hindsight (?) Crichton (?)
  18. • Shared at runtime • Affordance-centric • Carry or enable

    semantic information GOOD API FUTURE API description formats
  19. REFERENCE • https://twitter.com/mamund/status/794203466998644736 • http://smizell.com/weblog/2016/hypermedia-design • https://onedrive.live.com/view.aspx?resid=E73792DC59D3EF31!567871&ithint=file%2cpptx&app=PowerPoint&authkey=! AFO4p5VTwD6WtRQ • http://raml.org/blogs/looking-back-raml-10

    • https://vimeo.com/67076984 • http://visual.ly/api-infographic • http://www.slideshare.net/programmableweb/web-api-growthsince2005 • http://smizell.com/weblog/2016/hypermedia-design • http://amundsen.com/talks/2016-11-apistrat-wadm/2016-11-apistrat-wadm.pdf • https://github.com/apiaryio/api-blueprint/wiki/Roadmap • http://apiary.io • http://goodapi.co • https://github.com/smizell/hindsight
  20. interactions: viewTodoCollection: description: | The `item` link is only available

    when there are items found in the lookup. scenarios: noTodos: when: storage: getTodos: [] then: links: - self actions: - create-todo status: success withTodo: when: storage: getTodos: - id: 1 body: Get milk completed: false then: links: - self - item actions: - create-todo status: success source: http://smizell.com/weblog/2016/hypermedia-design