Intuitive API design is a critical success factor for APIs. API-First propagates a collaborative approach, where API development starts with the design and brings various stakeholders together, which dramatically increases efficiency and consistency while defining APIs. Questions that that come up in this area are about quality requirements APIs have to meet nowadays, in order to deliver the desired business value. In this session we want to present an approach how APIs can be defined and implemented consistently using tools like Apiary and Apimatic and the design artifacts can be incorporated in existing CI/CD pipelines, using tools like Dredd, since APIs are a first-class citizen which need to be maintained appropriately.
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Â
API-first design - Basis for an consistent API-Management approach
1. Š OPITZ CONSULTING 2018
s
¢¢¢ ßberraschend mehr MÜglichkeiten!
Š OPITZ CONSULTING 2018
Basis for an consistent API-Management
approach
Sven Bernhardt, Danilo Schmiedel
API-First-Design
2. Š OPITZ CONSULTING 2018 Seite 2
Agenda
1
2
3
5
API Management - Why?
API-First
Design Considerations
Summary
API-First-Design
4 API-First tools support
3. Š OPITZ CONSULTING 2018 API-First-Design Seite 3
OPITZ CONSULTING - A success story since 1990
¢ Our Mission: Help organizations to leverage the possibilities of
digitalization to be different, better and faster than their competitors
¢ Owner-led company with
¢ 400+ consultants
¢ 11 locations in Germany and Poland
Danilo Schmiedel
¢
¢ Senior Managing Consultant
¢ Business Development and Innovation
¢ Lead for Competence Center Cloud
About us
Sven Bernhardt
¢ Solution Architect
¢ Technical Lead for API Management
5. Š OPITZ CONSULTING 2018 API-First-Design Seite 5
This is why APIs do really matter today!
¢ Today there are more than 12.000 APIs offered by companies
Generate 90% of its revenue
through APIs
APIs allow people to use third-
party websites to tap Expedias
functionality in order to book
flights, cars, and hotels
Generate 60% of its revenue with
APIs
APIs allow eBay to list its auctions
on other websites, get bidder
information about sold items,
collect feedback on transactions,
and list new items for sale
Generate 50% of its revenue with
APIs
Salesforce.com has a
marketplace (AppExchange) for
apps created by its partners that
work on its platform; they now
number more than 300
Source: https://hbr.org/2015/01/the-strategic-value-of-apis
6. Š OPITZ CONSULTING 2018 Seite 6
APIs are the doors of the digital tomorrow
¢ Providing access to an enterprises services and data
¢ Support Key Business Goals
¢ Revenue Growth
¢ Customer Satisfaction & Engagement
¢ Operational Efficiency
¢ Partner Contribution & Ecosystem
Source: Pinterest
APIs are used to discover new business models
and to evolve new digital economies!
IMPORTANT
API-First-Design
Source: www.programmableweb.com
7. Š OPITZ CONSULTING 2018 API-First-Design Seite 7
Unleash the power of APIs with consistent
API Management
¢ Avoid uncontrolled usage
¢ Improve agility & quickly meet customer
demand with innovative services
¢ Ensure security of digital assets
¢ Gain visibility & define the right metrics to
meet business goals
¢ Dimensions of API Management
¢ Community Management
¢ API Lifecycle Management
¢ API Operations
¢ API Security
Planning
Design
Implementation
Publication
Operation
Consumption
Maintenance
Retirement
API
Lifecycle
API-First supports
especially those
lifecycle phases!
9. Š OPITZ CONSULTING 2018 API-First-Design Seite 9
Is API-First not just simply Contract-First?
¢ No, because API-First is a methodology and kind of a culture
¢ API-First means:
¢ Define the APIs before you start coding
¢ What are the business goals resp. capabilities your API supports?
¢ Who are your API consumers and how will they use the API (API UX)?
¢ Create the APIs collaborativelly
¢ Bring different API stakeholders together
¢ Shared responsibility for API definitions
¢ Decouple development
¢ Frontend from backend
¢ API from backend
¢ API from from frontend
¢ Rapid development result and short feedback cycles
Significant mindset change:
Technical API focus to
Business focus!
Significant cultural change:
Individual responsibility to
collabrative approach
11. Š OPITZ CONSULTING 2018 API-First-Design Seite 11
Questions before you start to design your API
¢ How can we
¢ discover and explore APIs?
¢ access APIs?
¢ build software on top of APIs?
¢ test APIs?
¢ monitor APIs (SLAs)?
¢ switch to a new version of an API?
Consumer Provider
¢ What is the purpose / value add?
¢ single-purpose vs. multi-purpose
¢ backend or frontend
¢ pass-through or new facade
¢ Who is our consumer (today and in
the future)?
¢ How can we
¢ document and describe APIs?
¢ make sure that consistent style guides
are considered and applied?
¢ publish & expose APIs?
¢ implement APIs?
¢ operate APIs?
¢ provide new versions of an API?
12. Š OPITZ CONSULTING 2018
Strategies for Efficient Delivery with APIs, Containers,
Microservices, DevOps
Seite 12
OPITZ CONSULTING - A success story since 1990
¢ Mission: Help organizations leverage the possibilities of digitalization to be
different, better and faster than their competitors
¢ Owner-Managed company with
¢ 400+ consultants at 11 locations in DE and PL
¢ Revenue 2016: 47 Mill. âŹ
Danilo Schmiedel
¢
¢ Managing Consultant
¢ Lead for Competence Center Cloud
About us
Sven Bernhardt
¢ Solution Architect
¢ Technical Lead for API Management
13. Š OPITZ CONSULTING 2018 API-First-Design Seite 13
Use Case 1:
API-First Design allows rapid development results
Phase 1 Phase 2
Ăź Finalized definition of the single-purpose APIs on day two in a
collaborative way with Apiary
Ăź Independent development of Mobile app, Mobile Backend, Backend
Service and API
Ăź Problem: Connectivity to the backend system, because Firewall
changes took too long (4 weeks project duration, connectivity was
available in week 3)
Ăź Development team was not blocked because implementation of the
mobile app was done against the Mock Server functionality in Apiary
Integration
CS
Mobile CS
14. Š OPITZ CONSULTING 2018 API-First-Design Seite 14
Use Case 2:
API-First Design decouples frontend and backend dev
15. Š OPITZ CONSULTING 2018 API-First-Design Seite 15
Use Case 3: API-First and Microservices Persistence
(PVS)
Service Implementation
(fully-decoupled)
APIs
Service
Implementation
(semi-decoupled)
CRM
Project
Managem
ent
HR
Financials
Controllin
g
Validation
Authentication
Throttling
Routing
Transform
Orchestrate
{json}
{json}
{json}
<<Microservice>>
Time
Management
Filtering
{json}
<<Microservice>>
Canteen
Management Connect
{json}
{json}
{jdbc}
Security
API
PlatformCS
17. Š OPITZ CONSULTING 2018 API-First-Design Seite 17
No APIs without an API-First Design approach
¢ How will consumers use the API?
¢ Business APIs need to be easily understandable and appropriate for the
respective use case, e.g. donât use SOAP interfaces for Mobile
¢ API Design rules allow the creation of consistent APIs, which improves
Developer Experience (DX) and results
¢ Build early, lightweight prototypes to verify your API
¢ Design assumptions can be validated based on the target persona
¢ Changes can be made easily, because the API is not bound to real data
¢ Short Feedback cycles
¢ From App Developers to API Designers
¢ From API Owners to App Developers
18. Š OPITZ CONSULTING 2018 API-First-Design Seite 18
No APIs without an API-First Design approach (2)
Ăź Keep it short: Start with a very short spec (One-Pager)
Ăź Names matter: Good Names drive Development
Ăź Agility before completeness: send spec to as many people as possible get the
feedback and learn
Ăź Many APIs are over-constrained: API should do one thing and do it well
Ăź Start coding as early as possible use mockups and establish a continuous
testing approach (before you implement the API completely)
Ăź Improve and finalize as soon as you are confident
Ăź Implementation should not impact the API (e.g. Exception details should be on
the same level of abstraction as the rest of the API)
Ăź Consider performance impact (bad decisions can limit performance)
19. Š OPITZ CONSULTING 2018 API-First-Design Seite 19
API Style Guides
¢ APIs should beâŚ
Ăź easy to use (even without documentation)
Ăź hard to misuse (force to do the right thing)
Ăź easy to use and maintain code that uses it
Ăź satisfy the requirements (common is good, avoid over-engineering)
Ăź easy to evolve
Ăź appropriate to the consumers
Ăź designed consistently
20. Š OPITZ CONSULTING 2018 API-First-Design Seite 20
API Style Guides * Documentation matters
¢ Learn from others: https://www.gitbook.com/book/adidas-group/api-
guidelines/details
¢ Define your API Guidelines
¢ Core Principles
¢ Protocol (protocol-level semantics and guidelines)
¢ Message (message format governance)
¢ Application (Data Model & Types)
¢ Evolution (testability, maintainability, extensibility, and scalability)
¢ Execution (security and usability, which are observable at run time)
¢ Clients (practices for API consumersâclients)
¢ Examples
21. Š OPITZ CONSULTING 2018 API-First-Design Seite 21
API description dialects
¢ WADL
¢ RAML
¢ Swagger
¢ Open API
¢ API Blueprint
22. Š OPITZ CONSULTING 2018 Seite 22
API-First tools support
4
API-First-Design
23. Š OPITZ CONSULTING 2018 API-First-Design Seite 23
API Tools & Platforms (just an extractâŚ)
Source: https://techcrunch.com/2016/05/21/the-rise-of-apis/
24. Š OPITZ CONSULTING 2018 API-First-Design Seite 24
Classes of tools that support API-First
¢ API Catalog (or Developer Portal)
¢ Central place for all APIs
¢ Consolidated Authentication / Authorization Handling hiding your internal complexity
¢ Central Traffic Management
¢ Monitoring, Alerts and Insights into API Consumption
¢ a consolidated way to register and onboard Consumers
¢ API Versioning Strategys
¢ Support, Helpdesk for Consumers
¢ API Design Platform
¢ ....
27. Š OPITZ CONSULTING 2018 API-First-Design Seite 27
API Design Platforms: Apiary
¢ Apiary supports Design First approach
¢ Github integration
¢ Supported different API description dialects:
¢ API Blueprint
¢ Swagger
API as a by-
product of
building apps
API
documentation
generated
from code
Design-first
API
Development
API Design
Consistency
28. Š OPITZ CONSULTING 2018 API-First-Design Seite 28
API Design Platforms: Apiary
29. Š OPITZ CONSULTING 2018 API-First-Design Seite 29
API Design Platforms: SwaggerHub
¢ Online platform, but can also be hosted locally
¢ Supports different Swagger versions (Swagger 2.0, Open API (Swagger 3.0)
¢ Direct API mocking
¢ Generator for Client and Server Code, supporting different programming
languages
30. Š OPITZ CONSULTING 2018 API-First-Design Seite 30
API Design Platforms: SwaggerHub
32. Š OPITZ CONSULTING 2018 API-First-Design Seite 32
Closing remarks
¢ API management is important because
¢ it is crucial to the success of the digital transformation
¢ it enables new digital business models
¢ it helps to develop the new digital economy
¢ No APIs without
¢ proper API Management
¢ proper Business Alignment
¢ proper API-first design approach
¢ API Management does not replace an integration platform
¢ Provide your API implementations using the most appropriate
technologies
¢ So, the question shouldnât be if, but when to start!
33. Š OPITZ CONSULTING 2018 API-First-Design Seite 33
API Management is essential for modern IT architectures
¢ Accelerating innovation by building up next-gen apps based on modern
concepts like Mircoservices, DevOps, Cloud and APIs
¢ Thrive new digital economies and enable new business models
Future-oriented Architectures
for Human-Machine-Interaction
Holistic End2End Integration
Architectures
Analytical Applications &
Business Insights
Reactive, hybrid Infrastructure
Architectures
34. Š OPITZ CONSULTING 2018 API-First-Design Seite 34
Download: http://tinyurl.com/ydfdyqq9