The State of Web APILanguages in 2016
Jerome Louvel, Chief Geek@jlouvel
© Restlet 2016
x
© Restlet 2016
Jérôme LOUVELAbout Jérôme LOUVEL
• Founder, CTO & VP of Products at Restlet
• Restlet Framework creator,first REST framework for Java (2004)
• Contributor to “RESTful Web Services” (O’Reilly, 2007)
• Member of JAX-RS 1.0 expert group (2007 - 2009)
• Co-author of “Restlet in Action” (Manning, 2012)
• InfoQ editor covering Web APIs (since 2014)
• Board member of Open API Initiative
@jlouvel
© Restlet 2016
x
© Restlet 2016
• New API Use Cases
• Continuous API Delivery
• API Team Collaboration
Why API Languages?
© Restlet 2016
API Use Cases
API centric
software
Mobile app
backend
IoTbackend
Micro service
Web app backend
Social bot
backend
Partner API
gateway
PublicAPI
gateway
Automated
workflow
© Restlet 2016
Continuous API Delivery
DEV
API centric
softwareQA
OPS
BIZ
Develop
QualifyEngage
Operate
© Restlet 2016
1 | Code-first & Provider driven
Providerteam
Consumer teams
API
Impl
SDK
ClientA
SDK
ClientB
...
...3
1
2
© Restlet 2016
2 | Contract-first & Provider driven
Providerteam
Consumerteams
Impl
SDK
ClientA
SDK
ClientB
...
...2
1Mock
2
API
© Restlet 2016
3 | Collaborative Contract-first
Providerteam
Consumer teams
Impl
SDK
ClientA
SDK
ClientB
...
...2
1Mock
2
API
© Restlet 2016
4 | Contract-first & Consumer Driven
Providerteam
Consumerteams
Impl
SDK
ClientA
SDK
ClientB
...
...2
1Mock
2
APIMockAPI
Impl
MockAPI
Impl
ServicesData
© Restlet 2016
5 | Contract-first & Consumer Owned
Providerteam
Consumer teams
Impl
SDK
ClientA
SDK
ClientB
...
...2
1Mock
2
APIMockAPI
Impl
MockAPI
Impl
Data Services
© Restlet 2016
API Team Collaboration
Owne
r
Developer
Writer
Tester Oper
ator
APITeam
Manager
© Restlet 2016
Impact on API development
• New types of APIs- internal & external APIs- mini & micro APIs- experience APIs
• Number of APIs increases- channels growth- history of versions- microservices pattern- quality of service
• → Industrialization needed- automated workflows- better tooling- importance of API languages
API Platform
Micro APIs(domain data & logic)
Mini APIs(domain services)
Experience APIs(backends)
User Interfaces(frontends)
Public APIs(gateways)
End-users
Micro APIs(external SaaS)
Partner devs
© Restlet 2016
x
© Restlet 2016
• OAS
• RAML
• API Blueprint
• Alternatives
Which API Language?
© Restlet 2016
Current state• Version 2.0 widely adopted with strong tooling support (fka Swagger Spec)• Basis of contribution to the OpenAPI Initiative (OAI)• Strongest market traction
Upcoming 3.0 version• Structural improvements• Request Parameters• Protocol and Payload• Documentation, Security, Path definitions• Release planned for first half of 2017
Learn more• https://www.openapis.org/blog• https://www.openapis.org/specification/repo• https://www.infoq.com/news/2016/01/tony-tam-oai-initiative-swagger• https://www.infoq.com/articles/open-api-initiative-update
OpenAPI Specification (OAS)
© Restlet 2016
Content, Callbacks, Links, etc.
Overview of changes in OAS 3.0
© Restlet 2016
Evolution of Swagger
2015
Specificationdonated
Open sourceframework
Commercialcloud tool
© Restlet 2016
Current state• Version 0.8 adopted with good tooling support• Good market traction, especially in larger enterprises• Strong support by MuleSoft, a well established software vendor
Latest 1.0 version• Built-in data typing, examples, libraries, annotations, overlays and extensions• Stronger design and reusability capabilities than OAS• Tooling partially available but progressing
Learn more• http://www.raml.org/• https://github.com/raml-org/raml-spec/• https://www.infoq.com/news/2016/08/raml-1.0-mulesoft
RESTful API Modeling Language (RAML)
© Restlet 2016
Current state• Version 1A9 adopted with good tooling support• Good market traction, especially during by API design teams• Support by Apiary, an API startup
Latest version• Built-in data typing based on Markdown → MSON• Still young compared to more mature schema languages such as JSON Schema• ABP creator, Zdenek Nemec, recently left Apiary → see his talk at APIdays on what’s next• Apiary is a member of OAI and also supports OAS in its tooling
Learn more• https://apiblueprint.org/• https://github.com/apiaryio/api-blueprint/• https://www.infoq.com/news/2015/05/api-blueprint-progress
API Blueprint
© Restlet 2016
• RAPID-ML- Created by RepreZen- Data/Domain-Driven API Modeling- RepreZen API Studio
• Google API Discovery format- Supports Google Discovery Service- Not used elsewhere much- Google is a founding member of OAI and supports OAS
• WADL- The pioneer, created by Sun Microsystems in 2005- XML based alternative to WSDL- Still used in Apigee products for example
Alternatives
© Restlet 2016
Languages are Abstraction Layers
Hardware
Assembly languages
System languages
Application languages
Web API languages
software level, driversNASM / TASM
OS level, high performanceC / C++ / C# / Go
productivity, portability, business logicJava / PHP / Visual Basic
web scale, interoperability, integration, DSLsOAS / RAML / API Blueprint
lowest level, machine codex86 / CISC / RISC / etc.1st generation
2nd generation
3rd generation
4th generation
3rd generation
© Restlet 2016
Maturity levels of API Languages
• 1) Describe API contract- endpoints, resources, operations, representations- enable the generation of:
• client SDKs & server skeletons• documentation• test scenarios• mock servers
• 2) Implement API- wrap regular applications written with classic languages- compose lower-level APIs into higher-level APIs- integration purpose at web scale
• 3) Operate API- provide the infrastructure to deliver the API- access to data and services
Lower levellanguages
API delivery network
© Restlet 2016
x
© Restlet 2016
• For Design
• For Testing
• Maturity levels
API Language IDEs
© Restlet 2016
Design IDE - SmartBear SwaggerHub
© Restlet 2016
Design IDE - MuleSoft API Designer
© Restlet 2016
Design IDE - Apiary Editor
© Restlet 2016
Design IDE - Restlet Studio
© Restlet 2016
Design IDE - Restlet Studio
© Restlet 2016
Test IDE - Postman
© Restlet 2016
Test IDE - Paw
© Restlet 2016
Test IDE - Restlet Client (DHC)
© Restlet 2016
API Centric Software - Maturity Levels
Level 4Behavior
driven
Level 3 - Test driven
(replace UI testing, blue green deployment)
Level 2 - Contract driven
(provider driven, collaborative, consumer driven)
Level 1 - Implementation driven
(code driven, data driven, service driven)
API centric software is software
© Restlet 2016
Our API challenges
● 1 | Converge API languages○ OpenAPI Initiative as standardization body○ extend OAS with specialized languages (design, testing, operation)○ move innovation to upper levels○ accelerate tooling ecosystem
● 2 | Better API workflows○ integrate API & DevOps tools
○ integrate Design & Test
○ integrate Design & Operate
○ Integrate Test & Operate
→ A whole new API Stack is emerging!
Thank youQ&A