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.

Design-first API Development using Swagger and Node

1,304 views

Published on

Design-first API Development using Swagger and Node at I Love APIs 2015

Published in: Software
  • Be the first to comment

Design-first API Development using Swagger and Node

  1. 1. 1 Design-First API Development Using Swagger & Node Scott Ganyo, Apigee Prabhat Jha, Apigee @theganyo @prabhatjha
  2. 2. Agenda 2 1. APIs - What and Why 2. What is Design-First API development? 3. Some Apigee internal use cases 4. Customer Reference 5. Tools & demo 6. Q&A ©2015 Apigee. All Rights Reserved.
  3. 3. APIS 3
  4. 4. An API… Defines an HTTP service Serves its client apps Drives service adoption APIs 4©2015 Apigee. All Rights Reserved.
  5. 5. APIs are for… Developers Apps : • External • Internal Microservices Devices 5©2015 Apigee. All Rights Reserved.
  6. 6. What APIs are not ? SOA++ ESB 6©2015 Apigee. All Rights Reserved.
  7. 7. Design-First API Development 7
  8. 8. The Zen of API Development The code defines the API The API generates the code The code is the API API-driven code 8©2015 Apigee. All Rights Reserved.
  9. 9. The code defines the API 9©2015 Apigee. All Rights Reserved. Annotation-driven Maintained in code API is generated
  10. 10. The API generates the code Interface Definition Language (IDL) defines the API Client and serverside code stubs are generated Examples: SOAP, CORBA, and similar RPC systems 10©2015 Apigee. All Rights Reserved.
  11. 11. The code is the API 11©2015 Apigee. All Rights Reserved. Interpreted No formal specification
  12. 12. API-driven philosophy 12©2015 Apigee. All Rights Reserved. The API must be designed first.
  13. 13. API-driven philosophy 13©2015 Apigee. All Rights Reserved. API design, documentation, and code must remain in sync.
  14. 14. API-driven philosophy 14©2015 Apigee. All Rights Reserved. The system must adhere to the "DRY Principle."
  15. 15. API-driven philosophy 15©2015 Apigee. All Rights Reserved. The API must directly drive runtime and documentation.
  16. 16. Swagger-Node 16
  17. 17. Swagger-Node: Flow Diagram 17©2015 Apigee. All Rights Reserved.
  18. 18. Swagger-Node 18©2015 Apigee. All Rights Reserved. The API is written in Swagger, optionally using API Studio (apistudio.io) The Swagger API document is parsed when server starts Incoming calls are classified, validated, and routed in real time Integrates with Connect, Express, Hapi, Restify, Sails... Incorporates a plugin model for Swagger (or non-Swagger) extensions
  19. 19. Apigee Use Cases 19
  20. 20. Use case: Recommendation API (Apigee Insights) • To personalize an app experience, developers need to quickly create APIs that mashup results from big fata machine learning and real-time events. Swagger-node enables quick creation of those APIs via Swagger, and create the business-logic necessary in node.js. 20©2015 Apigee. All Rights Reserved.
  21. 21. Use case: API Studio • Authoring • Collaboration • Response simulation 21©2015 Apigee. All Rights Reserved.
  22. 22. Use case: Test Coverage • Historical test coverage analysis • APIs for CI to update • UI for test teams 22©2015 Apigee. All Rights Reserved.
  23. 23. Customer Reference 23
  24. 24. Burberry 24©2015 Apigee. All Rights Reserved.
  25. 25. Tools & Demo 25
  26. 26. API Lifecycle management tools • Write & Collaborate: – API Studio (http://apistudio.io) • Develop : – Swagger-Node (npm install -g swagger) • Deploy • Apigee Edge • Your PaaS • Publish • Apigee Dev Portal • API Studio 26©2015 Apigee. All Rights Reserved.
  27. 27. Demo 27©2015 Apigee. All Rights Reserved.
  28. 28. Where to get help? https://community.apigee.com 28©2015 Apigee. All Rights Reserved.
  29. 29. Q&A 29
  30. 30. Thank You 30

×