build apis in node.js and swagger 2.0 with apigee-127

26
Jeff West / Marsh Gardiner 16 October 2014 Build APIs in Node.js & Swagger 2.0 with Apigee-127

Upload: apigee

Post on 01-Dec-2014

897 views

Category:

Software


3 download

DESCRIPTION

Why is Node.js a good choice for building APIs? What is Swagger 2.0 and how can you use it to create your API documentation?  Join Jeff West and Marsh Gardiner for a code and demo-filled session, in which we’ll design an API with Swagger 2.0 and then implement and deploy the API in Node.js on both Apigee and AWS.   We will 'show the code’ to: • Build production-grade APIs in Node.js with Apigee-127 • Create API documentation with Swagger 2.0 • Add enterprise capabilities like OAuth, quota, caching, and analytics using NPMs (Node Package Manager) • Deploy to any PaaS, including Apigee, Amazon AWS, and Heroku View video: http://youtu.be/Fw43z14Y1Xw View podcast: https://soundcloud.com/apigee/build-apis-in-nodejs-and-swagger-20-with-apigee-127

TRANSCRIPT

Page 1: Build APIs in Node.js and Swagger 2.0 with Apigee-127

Jeff West / Marsh Gardiner

16 October 2014

Build APIs in Node.js & Swagger 2.0 with Apigee-127

Page 2: Build APIs in Node.js and Swagger 2.0 with Apigee-127

Today’s speakers

Jeff West@jeffreyawest

Marsh Gardiner@earth2marsh

Page 3: Build APIs in Node.js and Swagger 2.0 with Apigee-127

© 2014 Apigee – For Public display

Apigee social channels

3

YouTubehttp://youtube.com/apigee

Slideshare

http://slideshare.com/apigee

Page 4: Build APIs in Node.js and Swagger 2.0 with Apigee-127

© 2014 Apigee – For Public display

Agenda

• JavaScript & APIs• Apigee and Swagger 2.0• Apigee-127 Overview• Apigee-127 Demo• Q&A

Page 5: Build APIs in Node.js and Swagger 2.0 with Apigee-127

© 2014 Apigee – For Public display 5

Who is this webcast for

• API Developers & Designers building new APIs

• Node.js Developers interested in APIs – from n00b to expert

• API Developers & Designers Interested in using/learning about Swagger 2.0

Page 6: Build APIs in Node.js and Swagger 2.0 with Apigee-127

JavaScript & APIs

6

Page 7: Build APIs in Node.js and Swagger 2.0 with Apigee-127

© 2014 Apigee – For Public display

JavaScript For APIs

• On Apigee:

– 67% of developers use JavaScript

– 30% of developers use Node.js

Page 8: Build APIs in Node.js and Swagger 2.0 with Apigee-127

© 2014 Apigee – For Public display 8

Who Uses Node.js ?

Page 9: Build APIs in Node.js and Swagger 2.0 with Apigee-127

Swagger & Apigee

9

Page 10: Build APIs in Node.js and Swagger 2.0 with Apigee-127

© 2014 Apigee – For Public display

The Swagger Ecosystem

• 10,000+ production instances

• 2,000+ downloads/day of Java version

• 10,000+ developers using

• Thousands of devs contributing

• 500+ people in the Working Group

Page 11: Build APIs in Node.js and Swagger 2.0 with Apigee-127

© 2014 Apigee – For Public display

Swagger 2.0

• JSON and YAML formats– Enable top-down and bottom-up workflows

• Code & documentation generation– Programming language agnostic

• Vendor extensions

• Cross-industry participation– Apigee, Getty Images, Intuit, Kaplan,

LivingSocial, McKesson, Microsoft, Morningstar, PayPal, and many more

Page 12: Build APIs in Node.js and Swagger 2.0 with Apigee-127

12

Page 13: Build APIs in Node.js and Swagger 2.0 with Apigee-127

Apigee-127 Overview

13

Page 14: Build APIs in Node.js and Swagger 2.0 with Apigee-127

14

npm install -g apigee-127

http://github.com/apigee-127

Page 15: Build APIs in Node.js and Swagger 2.0 with Apigee-127

© 2014 Apigee – For Public display

Dynamic Server Generation

No static files generated: Apigee-127 works directly from the Swagger spec!

Apigee Extensions

Page 16: Build APIs in Node.js and Swagger 2.0 with Apigee-127

© 2014 Apigee – For Public display

We Handle These:• Swagger Tools (OSS, from Apigee):

• Message validation & routing

• Authorization (OAuth 2.0)

• Node.js Policies (OSS, from Apigee):

• Caching (Apigee Swagger 2.0 Extension)

• Quota (Apigee Swagger 2.0 Extension)

• Analytics (Apigee Swagger 2.0 Extension)

You Handle This:• Business logic

Enterprise-Class APIs, Really Fast

ControllerController.js

Page 17: Build APIs in Node.js and Swagger 2.0 with Apigee-127

© 2014 Apigee – For Public display 17

Apigee-127 Development Environment

• Swagger Editor:

https://github.com/wordnik/swagger-editor

• Swagger Tools:

https://github.com/apigee-127/swagger-tools

• Volos.js:

https://github.com/apigee-127/volos/

• Apache Usergrid (downloaded

separately, using a127):

https://github.com/apache/incubator-usergrid/

Page 18: Build APIs in Node.js and Swagger 2.0 with Apigee-127

Apigee-127 Demo

18

Page 19: Build APIs in Node.js and Swagger 2.0 with Apigee-127

© 2014 Apigee – For Public display

Open Source, Extensible API Services

• Node.js solution for developing and deploying production-level APIs

• npm install volos-{service}-{provider}

• Services:– Caching– OAuth 2.0– Quota– Analytics– Vault

• Providers:– Memory– Redis– Apigee (on Apigee or Remote)

Page 20: Build APIs in Node.js and Swagger 2.0 with Apigee-127

© 2014 Apigee – For Public display 20

Execution Environment Options

Anywhere / PaaS

127 On-Premises / PaaS

127 On Edge

127

Anywhere / PaaS

127 On-Premises / PaaS + Edge

127 127

Page 21: Build APIs in Node.js and Swagger 2.0 with Apigee-127

© 2014 Apigee – For Public display 21

Execution Environment Options

• Apigee Edge provides a robust production-grade execution environment with the following services:– Highly Available Distributed Caching

– Highly Available Distributed Quota

– Highly Available Distributed OAuth

– Highly Available API BaaS

– Highly Available Configuration Management (Key-Value Store)

– Policy Execution Engine

• If you want to run a Node.js API somewhere other than Apigee Edge they will need to implement these services

Page 22: Build APIs in Node.js and Swagger 2.0 with Apigee-127

© 2014 Apigee – For Public display 22

Upcoming FREE Training Sessions

The ABCs of APIs on Node.js and Swagger with Apigee’s Greg Rewis

Coming to a city near you and online on Apigee Academy!

Page 23: Build APIs in Node.js and Swagger 2.0 with Apigee-127

© 2014 Apigee – For Public display 23

Apigee-127 Resources

• Wiki: https://github.com/apigee-127/a127-documentation/wiki

• Help: https://github.com/apigee-127/a127-documentation/wiki/help

• Sign up for announcements with the a127 Google Group: https://groups.google.com/forum/#!forum/a127

• Community Support: http://community.apigee.com

Page 24: Build APIs in Node.js and Swagger 2.0 with Apigee-127

© 2014 Apigee – For Public display 24

Apigee Community Site

http://community.apigee.com

Page 25: Build APIs in Node.js and Swagger 2.0 with Apigee-127

Questions?

Jeff West@jeffreyawest

Marsh Gardiner@earth2marsh

Page 26: Build APIs in Node.js and Swagger 2.0 with Apigee-127

© 2014 Apigee – For Public display

Thank you