Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

APIdays Paris 2018 - Putting the Kit back in SDKs Darrel Miller, Senior Software Engineer, Microsoft

98 views

Published on

Putting the Kit back in SDKs
Darrel Miller, Senior Software Engineer, Microsoft

Apply to be a speaker here - https://apidays.typeform.com/to/J1snsg

Published in: Technology
  • Be the first to comment

  • Be the first to like this

APIdays Paris 2018 - Putting the Kit back in SDKs Darrel Miller, Senior Software Engineer, Microsoft

  1. 1. Putting Kit back in SDK @Darrel_Miller
  2. 2. How do you feel about SDKs for APIs? This Photo by Unknown Author is licensed under CC BY-SA-NC
  3. 3. Do they make you feel like this? This Photo by Unknown Author is licensed under CC BY-NC-ND
  4. 4. TTFC This Photo by Unknown Author is licensed under CC BY-SA
  5. 5. Made by a machine This Photo by Unknown Author is licensed under CC BY-SA
  6. 6. This is what we need
  7. 7. Kit Components Client Factory Request Builder Response Handler HTTP Interface Request Response Middleware HTTP Handler Service Client Core Library Native Library API Models Common Content Generated Library Tasks Workflow Support for scenarios where a coordinated set of HTTP requests achieve a common goal Services types for simplified payload handling Handling standard responsecodes and deserialization of payloads Components for applying cross cutting concerns Common container models for collections, paging, batch, Multi-part Provide discovery mechanism for resources and parameters Provide simple, language native, interface for common use cases Create native client library with desired configuration and middleware
  8. 8. Middleware magic This Photo by Unknown Author is licensed under CC BY
  9. 9. Http Client Service Auth Handler Request Application Response Retry Handler Redirect Handler Caching Handler … OAuth Provider StorageProvider Request Context User Middleware Controls Request Queue
  10. 10. Request vs Content This Photo by Unknown Author is licensed under CC BY-NC-ND
  11. 11. Http Client Fluent Request Builder Status Monitor Content Webhook Content Request Response Templated Request Builder Domain Types Body Multipart Content Entity Content Collection Content Error Content GraphQL Request Content GraphQL Response Content Subscribe Content
  12. 12. Content is composable This Photo by Unknown Author is licensed under CC BY
  13. 13. Signed/Encrypted Content Signed/Encrypted Content Compressed Content Multipart Content Streaming Content Collection Content Content Headers Trailer Headers
  14. 14. Tasks – Higher order functions This Photo by Unknown Author is licensed under CC BY-NC-ND
  15. 15. SomeTask Current State Http Client API Request Response Input Parameters State Change Event Action
  16. 16. PageIterator Task let somePagedCollection: PageCollection = await client.api("/me/messages").get(); let callback: PageIteratorCallback = (data) => { console.log(data); return true; }; let pageIterator = new PageIterator(client, somePagedCollection, callback); await pageIterator.iterate();
  17. 17. Response Handler This Photo by Unknown Author is licensed under CC BY-NC
  18. 18. Response Machine Application State DispatcherAPI Response Response Callback Response Callback Response CallbackResponse Callback Status, Content-Type, Link Relation
  19. 19. • Generated code is only a small part of SDKs • SDKs can and should add value to all developers • Don’t hide the HTTP model This Photo by Unknown Author is licensed under CC BY-NC-ND

×