Applying Domain Driven Design to
APIs and Microservices
James Higginbotham
@launchany
Your API tells a story about your
company and your vision
Designing APIs and Microservices Using Domain-Driven Design
Designing APIs and Microservices Using Domain-Driven Design
Designing APIs and Microservices Using Domain-Driven Design
A great API design strategy is
critical for API product adoption
and sustainable application
development
Designing APIs and Microservices Using Domain-Driven Design
Your APIs may not be considered
“mission critical” like Stripe. But
your API design is a contract with
your API consumers.
Designing APIs and Microservices Using Domain-Driven Design
Your API design is composed of
the capabilities (or “skills”)
you offer to developers
API Skills == “I want to…”
What skills do your
APIs need to offer?
Outside-In API Design Approach
Web
Application
API Design – “The Contract”
Internal
Application
API Consumer
Mobile
Application
API Design is an architectural
concern that combines business,
product design, and software
engineering
Designing APIs and Microservices Using Domain-Driven Design
Lack of Modularization = Regret
VS
Function-Based Module-Based
High cohesion
internally for common
functionality
Loose coupling
externally across
modules
High Cohesion + Loose Coupling
Public APIs
encourage
loose coupling
between modules
API
Scoping rules
restrict access
outside of modules
X
API-Centric Software Design
Systems Design
System
Subsystem Subsystem
Module Module
Module Module
Subsystem Subsystem
Module Module
LEGO as Modular System Design
System
Sub-systems
Modules
API
API
API
System/Solution
Subsystem Subsystem
Subsystem
Module Module
Module Module
Module Module
Module Module
Module Module
Module Module
Module Module
Module Module
Domain-Driven Design helps
with identifying context
boundaries for complex APIs
Domain Driven Design (DDD)
 Maps domain concepts into software
 Heavy domain expert involvement
 Common vocabulary (“Ubiquitous Language”)
 Boundary-driven (“Bounded Context”)
 Applies learning over time
“I need to multiply two numbers
together. So, I am building
a microservice architecture.”
- almost everyone today
Microservice Architecture
 Loosely-coupled, service-oriented architecture
 Apply bounded context to limit cognitive load
 Independently deployable via automation
 Enable replaceability and experimentation
 Encourage composability of the business
 Best for larger teams
Applying Systems Design
and Domain-Driven Design
to find API boundaries
and resources
Designing APIs and Microservices Using Domain-Driven Design
List Avail
Inventory
Distributor
Add Product
to Order
Complete
Order
Cancel
Booking
Add Product
to Inventory
Update
Product Qty
Locate
Booking
Redeem
Booking
Point
Of Sale
Remove
Product
Customer
Operator
Operator
Order Mgmt
List Avail
Inventory
Distributor
Add Product
to Order
Complete
Order
Cancel
Booking
Add Product
to Inventory
Update
Product Qty
Locate
Booking
Redeem
Booking
Operator
Point
Of Sale
Remove
Product
Customer
Operator
Inventory Mgmt
Fulfillment
Each subsystem has an API that
exposes one or more endpoints
Order API
List Avail
Inventory
Distributor
Add Product
to Order
Complete
Order
Cancel
Booking
Add Product
to Inventory
Update
Product Qty
Locate
Booking
Redeem
Booking
Point
Of Sale
Remove
Product
Customer
Operator
Inventory API
Fulfillment API
Operator
Identifying product opportunities
becomes easier when we have
boundaries around the APIs
Order API
List Avail
Inventory
Distributor
Add Product
to Order
Complete
Order
Cancel
Booking
Add Product
to Inventory
Update
Product Qty
Locate
Booking
Redeem
Booking
Operator
Remove
Product
Inventory API
Fulfillment API
#1 #2
`
Point
Of Sale
For every API, ask:
“What resources will it offer?”
Use domain-driven design to
find business entities, relations,
state transitions, and events
Order API
List Avail
Inventory
Add Product
to Order
Complete
Order
Cancel
Booking
Add Product
to Inventory
Update
Product Qty
Locate
Booking
Redeem
Booking
Remove
Product
Inventory API
Fulfillment API
Order API
Product
Availabilities
Orders
Product
Inventory
Bookings
Inventory API
Fulfillment API
Same entity (Products),
Conceptually different to
the API context!
Availabilities
- product
- date(s) avail
- qty avail
Orders
- bookings
- order total
Products
- name
- avail schedule
Bookings
- product
- date(s)
- status
Availabilities
- product
- date(s) avail
- qty avail
availabilityChanged()
Orders
- bookings
- order total
created()
updated()
Products
- name
- avail schedule
created()
removed()
updated()
Bookings
- product
- date(s)
- Status
redeemed()
cancelled()
Availabilities
- product
- date(s) avail
- qty avail
availabilityChanged()
Orders
- bookings
- order total
created()
updated()
Products
- name
- avail schedule
created()
removed()
updated()
Bookings
- product
- date(s)
- status
redeemed()
cancelled()
Order API Inventory API
Fulfillment API
Map Resources to the API
API composability using
microservices
Public APIs target durability
through external contracts.
Microservice APIs target evolution through
learning and experimentation
Availabilities Service Orders Service
Products Service
Bookings Service
Orders HTTP API
Inventory HTTP API
Fulfillment HTTP API
Availabilities Service Orders Service
Products Service
Bookings Service
Orders HTTP API
Inventory HTTP API
Fulfillment HTTP API
Payment Service Refund Service
Alexa
VoiceSkill
API
Gateway
API
Gateway
Messaging
…
Microservice
…
API
…
Microservice
…
API
…
Microservice
…
API
…
Microservice
…
API
Slack
Chatbot
Web+
MobileApp
API
Gateway
Microservice Architecture
The Composable World of APIs
Offers API
Inventory
API
Bookings
API
Identity API
Accounts
API
Rewards
API
Partners
Internal
Developers
Public App
Developers
Consumers
Third-party
Approved Apps
Thank you
James Higginbotham
@launchany
http://bit.ly/api-skills

More Related Content

PPTX
Microsoft power platform
PDF
Getting Started & Driving Success With Power Platform At Scale
PDF
Architecting an Enterprise API Management Strategy
PDF
The Architecture of an API Platform
PPTX
Power Platform Governance Webinar
PPTX
Power Apps - Data governance, compliance and security
PPTX
Microsoft power platform
PPTX
Power Platform Governance
Microsoft power platform
Getting Started & Driving Success With Power Platform At Scale
Architecting an Enterprise API Management Strategy
The Architecture of an API Platform
Power Platform Governance Webinar
Power Apps - Data governance, compliance and security
Microsoft power platform
Power Platform Governance

What's hot (20)

DOCX
High level design document template
PPTX
How to Execute a Successful API Strategy
PDF
Agile Integration eBook from 2018
PPTX
Best Practices in Implementing a Center for Enablement (C4E) within Your Orga...
PDF
Open API and API Management - Introduction and Comparison of Products: TIBCO ...
PPTX
Exposing services with Azure API Management
PPTX
NashTech - Azure Application Insights
PDF
APIsecure 2023 - Approaching Multicloud API Security USing Metacloud, David L...
PDF
MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63
PDF
Architecting Multi-Org Solutions
PPTX
API as-a-Product with Azure API Management (APIM)
PDF
Microsoft Power Platform: Power BI, PowerApps & Flow
PPTX
App Modernization with Microsoft Azure
PPTX
API Strategy Introduction
PPTX
CQRS and Event Sourcing
PPTX
Mulesoft Connections to different companies, and different services
PDF
Azure Monitoring Overview
PPTX
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
PPTX
Intelligent automation with Microsoft Power Automate
PDF
Azure DevOps Presentation
High level design document template
How to Execute a Successful API Strategy
Agile Integration eBook from 2018
Best Practices in Implementing a Center for Enablement (C4E) within Your Orga...
Open API and API Management - Introduction and Comparison of Products: TIBCO ...
Exposing services with Azure API Management
NashTech - Azure Application Insights
APIsecure 2023 - Approaching Multicloud API Security USing Metacloud, David L...
MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63
Architecting Multi-Org Solutions
API as-a-Product with Azure API Management (APIM)
Microsoft Power Platform: Power BI, PowerApps & Flow
App Modernization with Microsoft Azure
API Strategy Introduction
CQRS and Event Sourcing
Mulesoft Connections to different companies, and different services
Azure Monitoring Overview
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
Intelligent automation with Microsoft Power Automate
Azure DevOps Presentation
Ad

Viewers also liked (9)

KEY
Pragmatic RESTful API Design: Apigee Webinar
PDF
Domain Driven Design
PDF
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
PPTX
Onion Architecture
PPTX
Domain Driven Design Through Onion Architecture
PPTX
Applying Domain-Driven Design to APIs and Microservices - Austin API Meetup
PDF
Api architectures for the modern enterprise
PPTX
Domain Driven Design using Laravel
PDF
Software Design Patterns in Laravel by Phill Sparks
Pragmatic RESTful API Design: Apigee Webinar
Domain Driven Design
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
Onion Architecture
Domain Driven Design Through Onion Architecture
Applying Domain-Driven Design to APIs and Microservices - Austin API Meetup
Api architectures for the modern enterprise
Domain Driven Design using Laravel
Software Design Patterns in Laravel by Phill Sparks
Ad

Similar to Designing APIs and Microservices Using Domain-Driven Design (20)

PDF
API:World 2016 - Applying Domain Driven Design to APIs and Microservices
PPTX
Transformation through the API
PDF
IBM API management Philip Little
PDF
apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...
PPT
Api management introduction and product overview v1.0 2014.08.28
PDF
apidays Singapore 2025 - From API Intelligence to API Governance by Harsha Ch...
PPTX
Webcast: Apigee Edge Product Demo
PPTX
API Frenzy: API Strategy 101
PPTX
API Best Practices
PDF
apidays LIVE Jakarta - What will the next generation of API Portals look like...
PDF
CA API Developer Portal
PPTX
Apigee Edge Product Demo
PPSX
APIs as a Product Strategy
PDF
Manage your ap is securely and easily ibm apim 4.0
PDF
Meetup 2022 - API Gateway landscape.pdf
PPTX
Webinar: How API Lifecycle Management can help to Accelerate Growth
PPTX
Innovation at scale - Key drivers and pitfalls to building API driven agile b...
PPTX
API Product Management - Driving Success through the Value Chain
PDF
apidays Australia 2023 - API Strategy In The Era Of Generative AI,Shreshta Sh...
PDF
Securely expose protected resources as ap is with app42 api gateway
API:World 2016 - Applying Domain Driven Design to APIs and Microservices
Transformation through the API
IBM API management Philip Little
apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...
Api management introduction and product overview v1.0 2014.08.28
apidays Singapore 2025 - From API Intelligence to API Governance by Harsha Ch...
Webcast: Apigee Edge Product Demo
API Frenzy: API Strategy 101
API Best Practices
apidays LIVE Jakarta - What will the next generation of API Portals look like...
CA API Developer Portal
Apigee Edge Product Demo
APIs as a Product Strategy
Manage your ap is securely and easily ibm apim 4.0
Meetup 2022 - API Gateway landscape.pdf
Webinar: How API Lifecycle Management can help to Accelerate Growth
Innovation at scale - Key drivers and pitfalls to building API driven agile b...
API Product Management - Driving Success through the Value Chain
apidays Australia 2023 - API Strategy In The Era Of Generative AI,Shreshta Sh...
Securely expose protected resources as ap is with app42 api gateway

More from LaunchAny (20)

PPTX
Refining Your API Design - Architecture and Modeling Learning Event
PPTX
Event-Based API Patterns and Practices
PDF
Event-based API Patterns and Practices - AsyncAPI Online Conference
PDF
GlueCon 2019: Beyond REST - Moving to Event-Based APIs and Streaming
PDF
Austin API Summit 2019 - APIs, Microservices, and Serverless: The Shape of Th...
PDF
APIStrat Keynote: Lessons in Transforming the Enterprise to an API Platform
PPTX
Austin API Summit 2018: Are REST APIs Still Relevant Today?
PDF
GlueCon 2018: Are REST APIs Still Relevant Today?
PPTX
Lessons in Transforming the Enterprise to an API Platform
PPTX
APIStrat 2017: API Design in the Age of Bots, IoT, and Voice
PDF
API Design in the Age of Bots, IoT, and Voice
PDF
APIStrat 2016: Moving Toward a Modular Enterprise
PPTX
Moving Toward a Modular Enterprise - All About the API Conference 2016
PDF
APIs Are Forever - How to Design Long-Lasting APIs
PDF
API Thinking - How to Design APIs Through Systems Design
PDF
Swagger 2.0: Latest and Greatest
PDF
Gluecon 2015 Recap
PDF
Using Sinatra to Build REST APIs in Ruby
PPTX
Microservices on the Edge
PPTX
How to Design and Build a Great Web API
Refining Your API Design - Architecture and Modeling Learning Event
Event-Based API Patterns and Practices
Event-based API Patterns and Practices - AsyncAPI Online Conference
GlueCon 2019: Beyond REST - Moving to Event-Based APIs and Streaming
Austin API Summit 2019 - APIs, Microservices, and Serverless: The Shape of Th...
APIStrat Keynote: Lessons in Transforming the Enterprise to an API Platform
Austin API Summit 2018: Are REST APIs Still Relevant Today?
GlueCon 2018: Are REST APIs Still Relevant Today?
Lessons in Transforming the Enterprise to an API Platform
APIStrat 2017: API Design in the Age of Bots, IoT, and Voice
API Design in the Age of Bots, IoT, and Voice
APIStrat 2016: Moving Toward a Modular Enterprise
Moving Toward a Modular Enterprise - All About the API Conference 2016
APIs Are Forever - How to Design Long-Lasting APIs
API Thinking - How to Design APIs Through Systems Design
Swagger 2.0: Latest and Greatest
Gluecon 2015 Recap
Using Sinatra to Build REST APIs in Ruby
Microservices on the Edge
How to Design and Build a Great Web API

Recently uploaded (20)

PPTX
Lecture 5 Software Requirement Engineering
PDF
Crypto Loss And Recovery Guide By Expert Recovery Agency.
PDF
What Makes a Great Data Visualization Consulting Service.pdf
PDF
infoteam HELLAS company profile 2025 presentation
PPTX
Viber For Windows 25.7.1 Crack + Serial Keygen
PDF
IDM Crack 6.42 Build 42 Patch Serial Key 2025 Free New Version
PDF
Top 10 Project Management Software for Small Teams in 2025.pdf
PDF
MAGIX Sound Forge Pro CrackSerial Key Keygen
PPTX
ROI Analysis for Newspaper Industry with Odoo ERP
PPTX
ROI from Efficient Content & Campaign Management in the Digital Media Industry
PDF
MiniTool Power Data Recovery 12.6 Crack + Portable (Latest Version 2025)
PDF
Workplace Software and Skills - OpenStax
PPTX
Plex Media Server 1.28.2.6151 With Crac5 2022 Free .
PDF
IT Consulting Services to Secure Future Growth
PPTX
Folder Lock 10.1.9 Crack With Serial Key
PDF
Practical Indispensable Project Management Tips for Delivering Successful Exp...
PDF
AI-Powered Fuzz Testing: The Future of QA
PPTX
DevOpsDays Halifax 2025 - Building 10x Organizations Using Modern Productivit...
PPTX
HackYourBrain__UtrechtJUG__11092025.pptx
PPTX
DevOpsDays Halifax 2025 - Building 10x Organizations Using Modern Productivit...
Lecture 5 Software Requirement Engineering
Crypto Loss And Recovery Guide By Expert Recovery Agency.
What Makes a Great Data Visualization Consulting Service.pdf
infoteam HELLAS company profile 2025 presentation
Viber For Windows 25.7.1 Crack + Serial Keygen
IDM Crack 6.42 Build 42 Patch Serial Key 2025 Free New Version
Top 10 Project Management Software for Small Teams in 2025.pdf
MAGIX Sound Forge Pro CrackSerial Key Keygen
ROI Analysis for Newspaper Industry with Odoo ERP
ROI from Efficient Content & Campaign Management in the Digital Media Industry
MiniTool Power Data Recovery 12.6 Crack + Portable (Latest Version 2025)
Workplace Software and Skills - OpenStax
Plex Media Server 1.28.2.6151 With Crac5 2022 Free .
IT Consulting Services to Secure Future Growth
Folder Lock 10.1.9 Crack With Serial Key
Practical Indispensable Project Management Tips for Delivering Successful Exp...
AI-Powered Fuzz Testing: The Future of QA
DevOpsDays Halifax 2025 - Building 10x Organizations Using Modern Productivit...
HackYourBrain__UtrechtJUG__11092025.pptx
DevOpsDays Halifax 2025 - Building 10x Organizations Using Modern Productivit...

Designing APIs and Microservices Using Domain-Driven Design

Editor's Notes

  • #2: We’re going to talk about how to design LONG-LASTING APIs. The goal is to avoid a redesign not long after your API is deployed. API TRAINING to help coach teams on how to think in APIs and apply the techniques I’ll show you today Across every team and company, I reiterate one common theme…
  • #5: Capital One is changing the way we interact with banking and bank-level security Released 3 APIs during SXSW in March
  • #6: Watson is changing the way we UNDERSTAND DATA LANGUAGE, SPEECH, VISION, and DATA INSIGHTS
  • #7: Marvel is changing the way we INTERACT with the ENTERTAINMENT MEDIA and their storytelling Characters, stories, comics, creators, and events
  • #8: At their core, APIs are contracts for software component interaction. How we design our APIs will drive the level of short and long-term success. As an example, STRIPE…
  • #9: Stripe is well known because they focus on great API design and documentation. But it extends beyond that. They tell a story with their API: “we power commerce for businesses of all sizes” Everything is built around that…
  • #10: You may not be at Stripe’s scale or mission critical for customers How you version your API design over time is important, however – IT IS A CONTRACT
  • #11: Medhi recently tweeted that Stripe maintains 50 (actually now closer to 65) different versions of their API. They OWN VERSIONING, rather than pushing it to the CONSUMER. Even when we, as designers, MISS THE MARK, we should OWN IT
  • #14: Kin Lane has been conducting API workshops at universities by showing how to ACCOMPLISH THINGS Zapier/IFTTT is his model for teaching the use of APIs
  • #16: Our DATABASES are not our API Our CODE (classes, functions) are not our API Our API is a contract that is implemented by our code and databases We must put ourselves IN THE PLACE OF THE CONSUMER, NOT THE DEVELOPER
  • #17: Web APIs are an architectural concern, but MORE THAN THAT – PRODUCT AND BUSINESS TODAY IS HTTP, TOMORROW may be something else Use architectural design techniques to drive your API design What is it we are trying to solve and how are we planning to solve it? THAT IS THE PRODUCT SIDE and WHAT IS MOST EXCITING TO ME
  • #19: <<ADV…>>There are several popular web frameworks that make building a monolithic application easy – almost trivial. These frameworks commonly offer: accelerated development, but left off modular design This leads to a lack of proper modularization, impacting our API designs
  • #20: 10 years, new frameworks, but they assume a single subsystem – the webapp or “site” They missed the mark for larger applications, trying to avoid SOA This is leading to “MONOLITHIC REGRET” and a lack of modular applications Microservices is becoming a common way to deal with this problem at LARGER SCALES
  • #21: High Cohension – common functionality that is related BELONG TOGETHER Loose coupling – reduced dependencies across modules - minimize cohesion across modules
  • #22: Public APIs define the contract that the top module is offering to other modules around it. If the API contract changes, either through a change in the inputs, outputs, or overall behavior, it can break the integration between these modules. To prevent other modules from interacting with the internal components of itself, we apply scoping rules to restrict access
  • #23: Systems: This is a completely independent system that provides a solution to one or more problems Subsystems: Bounded concerns that help to compose the system itself. Subsystems do not offer a solution on their own, but contribute a bounded portion of it. finally, Modules: These are the building blocks for composing subsystems. Modules may contain one or more components, where components are classes in object-oriented programming languages or functions in functional programming languages.
  • #24: Demonstration of LEGO of how to BREAK a big KIT (problem) into smaller, manageable modules ALIGN OURSELVES based on core competencies
  • #25: APIs provide the opportunity to connect subsystems, with internal APIs that connect modules together. We should ONLY KNOW what the subsystem APIs are, NOT THE MODULE APIs
  • #27: Approach on software development for complex needs Based on Eric Evans' book "Domain Driven Design”
  • #29: Adrian Cockcroft’s definition
  • #30: I want to SHARE what METHODS I have USED to HELP TEAMS DESIGN APIs Product development = opportunity + need + solution Systems design defines how your product is architected API Systems design tells 2 stories: about how your API is architected (internal-facing), and how your API works within other solutions (external-facing)
  • #31: Ecommerce example – what does it take to place an order? These are the skills that our API must offer Essential step #1
  • #32: First step – list, understand what the business requirements were, how different parties were to interact with the system
  • #33: Group related activities participant(s) need to perform into subsystems Use the boundaries to determine: - what has already been built in-house - what needs to be built in-house - what can be replaced by COTS, third-party APIs
  • #37: We found 2 stories: a distributor story and an operator story = 2 PRODUCTS Operators vs Distributors drove API DESIGN, DOCS, MARKETING Different vocabularies for distributors and operators
  • #38: Not “what are your endpoints” or “what are your URLs”
  • #39: Discuss aggregates, entities, and value objects. Aggregates become resources, named after the root entity within Goal: Consistent naming that reflects the API’s intended use
  • #41: PRODUCT INVENTORY PRODUCT AVAIL + ORDERS BOOKINGS
  • #43: EVENTS – often the MOST MISSED OPPORTUNITY Callbacks change the way developers interact with you API, from POLLING to automatic NOTIFICATION when things change. Allows them to be more reactive to change in your own subsystems Github callbacks expanded the development pipeline beyond a single tool vendor
  • #44: [recall early in the talk: when is my product ready to launch?] Our architecture shows us not only what we need to build, but what each party needs to accomplish their goals/solution. This helps us with product roadmaps, scheduling, and other internal aspects of product management.
  • #47: Durability == LONG LASTING Replaceability == AGILITY, EXPERIMENTATION, EVOLUTION
  • #48: Start with services for each root-level domain entity Use SERVICE OBJECTS or MICROSERVICES
  • #49: Starting with the simplest services, we can break services out as we dig into the implementation details. In this case, PAYMENT and REFUND can be broken out and assigned to a different team
  • #50: API Gateways offer public contracts, integrate with microservices
  • #51: We live in a world with a growing number of APIs Many APIs represented in this room and at this conference Let’s look for skills and capabilities around us, build APIs, and HELP OTHERS TELL A STORY