apidays London 2023 - Why and how to apply DDD to APIs, Radhouane Jrad, QBE Europe

apidays
apidaysapidays
Domain
Driven
Design
2023 © Mother Earth
Radhouane Jrad
The Plan
• DDD in General (History, etc.)
• Designing in DDD
• Implementing DDD: Use-Case
• Implementing DDD Principles
• DDD & Horizontal Scalability
• Principles Guiding API Governance
02/23
Disclaimer
DDD is a rich, complex, sometimes antagonistic topic. This presentation is an implementation of
DDD and some aspects may differ from other implementations.
The views in this presentation fairly (but not fully) adhere to standard DDD concepts.
03/23
Mantra
As a developer, it is your understanding, rather than your knowledge, that becomes software!
Alberto Brandolini
04/23
Origins: 2003
05/23
How Did We Get to DDD?
Business Model Business Domain
Domain Driven
Design
• Describes core aspects of company’s values
(economic, social, environmental, etc.) & how it
‘lives’ them
• Reflects rationale of a company’s purposes,
processes, markets, products & services, strategies,
infrastructure, operational processes, policies, etc.
Business Strategy
• Defines goals of the company
• Competitive matters: How to fight & compete?
What are our strengths & weaknesses? Where
are market opportunities? Lateral concerns
(social, societal, environmental, etc.)
• Different to Operational Strategy (efficiency, cost
mgmt., etc.)
Corporate Strategy
• Existential matters:
• What business should
we be in?
• What business should
we NOT be in?
• Essentially, 2 types of models:
• Linear (aka Pipes): upstream production &
downstream consumption,
e.g. ink > pen + lid > wholesale
• Networked (aka Platforms): multi-directional
exchange (e.g. Digital Transformation)
• We start getting technical:
• A “simple view” of a “complex Reality (UML)
• Class-based representation of objects being implemented
• Generated through Business Modelling & designed by Business
Analysts.
• Categorises the set of business systems that represent autonomous
units of the business modeled during Business Analysis.
Strategy
Operations
Infrastructure
• Aim is to structure the code and its language to
reflect the Business Domain
• e.g. Class ClaimApplication; + Class Customer +
method approveClaim + method rejectClaim
06/23
The Concept of Domain Driven Design
Business Domain
Domain Driven
Design
• We start getting technical:
• A “simple view” of a “complex Reality (UML)
• Class-based representation of objects being implemented
• Generated through Business Modelling & designed by Business
Analysts.
• Categorises the set of business systems that represent autonomous
units of the business modeled during Business Analysis.
• Aim is to structure the code and its language to
reflect the Business Domain
• e.g. Class ClaimApplication; + Class Customer +
method approveClaim + method rejectClaim
06/23
When to Use DDD?
07/23
Meaningfulness of DDD
08/23
DDD Strategic Tools
09/23
Sleeping
Compartment
Engine Room
Logistics
Kitchen
Captain’s Corner
Viewing Deck
Gathering Area
DDD Strategic Tools
10/23
Dining Room
Kitchen
Master
Bedroom
Garage
Guests Room
Living Room
Kid’s Room
Master Storage
Storage
Front Lawn
Shower/WC
Designing in DDD
11/23
Insurance Example
Customer =
Active policies,
historical
policies, MTA
Domain: Policy
Customer =
Open claims,
historical claims,
NCD status
Domain: Claim
Customer =
Name, physical
address, mobile
no.
Domain: Party
DB
API
DB
API
DB
API
12/23
Case Study: Integration for Insurance
13/23
Policy
Domains Cross-Contamination
14/23
Claims
DGL API
AL API
ACL API
DGL API
AL API
ACL API
Consumer A
Sys. Of.
Rec
X
Claims
Policy
Domain Gateway Layer APIs
15/23
Claims
DGL API
AL API
ACL API
DGL API
AL API
ACL API
Consumer A
Sys. Of.
Rec
• DGL API act as gateway to the
domain
• Every domain’s Abstract Layer is
constructed, developed, and
maintained ignoring other domains
• Every domain’s ACL is constructed,
developed, and maintained ignoring
other domains
• Security, Infrastructure,Testing, and
Asset Reusability requirements are
easy to address
• Usually one DGL API per Domain.
Domain Gateway Layer APIs
16/23
Claims Policy
The Case of a Common System of
Records
17/23
DGL API
AL API
ACL API
DGL API
ACL API
Consumer A
Sys. Of.
Rec
Consumer B
X
Claims Policy
Anti-Corruption Layer
17/23
DGL API
AL API
ACL API
DGL API
ACL API
Consumer A
Sys. Of.
Rec
Consumer B
Claim Processes
Need Policy no?
Policy Processes
DDD & Horizontal Scalability
18/23
Instance A
(1 CPU Unit)
DDD & Horizontal Scalability
19/23
Step 1 Step 2 Step 3 Step 4 Step 5
Instance B
(1 CPU Unit)
Step 1 Step 2 Step 3 Step 4 Step 5
Queues Queues
Some Notes:
20/23
Principles Guiding API Governance
21/23
Structural Principles
Feedback-Based Design (DSR)
SOLiD:
•Single Responsibility Principle (SRP)
•Open/Close Principle (OCP)
•Liskov, Interface Segregation Principle (ISP)
•Dependency Inversion Principles
Reusability Primacy of Principles
Domain Driven Design
Separation of Concerns
Three-layered Architecture
API-Led Architecture
YAGNI
Minimise Coupling
KISS
Git-based Version Control
O-Auth based Security
C-back with JWT
Asset exposure
(Marketplace)
IPaaS
(Managed Services)
API Catalogue
Logging
Smart Endpoints, Dumb Pipelines Asynchronous vs. Synchronous
Queues vs. EDA vs. Pub/Sub
Driving Principles
Technological Baseline
Security By Design
Horizontal vs. Vertical Scalability
Singular Technology
Integration Inventory
Load Balancers
REST vs. SOAP
Component Based Statelessness
API Building Blocks
22/23
Domain
Driven
Design
API-Led
Design
Pattern
Horizontal-
First
Scalability
REST-first ,
JSON-first
Integration
iPaaS
Security
By
Design
Product-
based
Reusability; Evolvability; Extensibility;
Security; Cost-Effectiveness;
Auditability; Clarity;
Simplicity/Simplification…
Thanks
23/23
LinkedIn: Radhouane Jrad
Questions?
2016 2013 2003
Some Good
Reads:
1 de 25

Recomendados

Domain Driven Design Introduction por
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introductionwojtek_s
1.2K vistas53 diapositivas
Tools for SIAM - Portfolio management por
Tools for SIAM - Portfolio managementTools for SIAM - Portfolio management
Tools for SIAM - Portfolio managementSoftware AG UK
4K vistas21 diapositivas
2019-Nov: Domain Driven Design (DDD) and when not to use it por
2019-Nov: Domain Driven Design (DDD) and when not to use it2019-Nov: Domain Driven Design (DDD) and when not to use it
2019-Nov: Domain Driven Design (DDD) and when not to use itMark Windholtz
67 vistas45 diapositivas
Something super epic... por
Something super epic...Something super epic...
Something super epic...Rabah Rahil
673 vistas38 diapositivas
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design por
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven DesignNETFest
1.5K vistas55 diapositivas
An Introduction to Domain Driven Design in PHP por
An Introduction to Domain Driven Design in PHPAn Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHPChris Renner
2.5K vistas56 diapositivas

Más contenido relacionado

Similar a apidays London 2023 - Why and how to apply DDD to APIs, Radhouane Jrad, QBE Europe

Requirements engineering in agile por
Requirements engineering in agileRequirements engineering in agile
Requirements engineering in agileTricode (part of Dept)
4.1K vistas24 diapositivas
Security Modelling in ArchiMate por
Security Modelling in ArchiMateSecurity Modelling in ArchiMate
Security Modelling in ArchiMatePECB
5.2K vistas25 diapositivas
CCRG 2005 Alberta Assessors Association Conference Seminar por
CCRG 2005 Alberta Assessors Association Conference SeminarCCRG 2005 Alberta Assessors Association Conference Seminar
CCRG 2005 Alberta Assessors Association Conference SeminarSalvador Carlos Hernandez Ramirez
240 vistas57 diapositivas
ASSET LIFE CYCLE COST ESTIMATING AND THE CCRG Rev4 por
ASSET LIFE CYCLE COST ESTIMATING AND THE CCRG Rev4ASSET LIFE CYCLE COST ESTIMATING AND THE CCRG Rev4
ASSET LIFE CYCLE COST ESTIMATING AND THE CCRG Rev4Salvador Carlos Hernandez Ramirez
1.4K vistas57 diapositivas
Asset Information Management (AIM) Presentation @ ARC's 2011 Industry Forum por
Asset Information Management (AIM) Presentation @ ARC's 2011 Industry ForumAsset Information Management (AIM) Presentation @ ARC's 2011 Industry Forum
Asset Information Management (AIM) Presentation @ ARC's 2011 Industry ForumARC Advisory Group
5.5K vistas22 diapositivas
Same Patterns Different Architectures - Colombo Architecture Meetup - Session-03 por
Same Patterns Different Architectures - Colombo Architecture Meetup - Session-03Same Patterns Different Architectures - Colombo Architecture Meetup - Session-03
Same Patterns Different Architectures - Colombo Architecture Meetup - Session-0399X Technology
510 vistas37 diapositivas

Similar a apidays London 2023 - Why and how to apply DDD to APIs, Radhouane Jrad, QBE Europe(20)

Security Modelling in ArchiMate por PECB
Security Modelling in ArchiMateSecurity Modelling in ArchiMate
Security Modelling in ArchiMate
PECB 5.2K vistas
Asset Information Management (AIM) Presentation @ ARC's 2011 Industry Forum por ARC Advisory Group
Asset Information Management (AIM) Presentation @ ARC's 2011 Industry ForumAsset Information Management (AIM) Presentation @ ARC's 2011 Industry Forum
Asset Information Management (AIM) Presentation @ ARC's 2011 Industry Forum
ARC Advisory Group5.5K vistas
Same Patterns Different Architectures - Colombo Architecture Meetup - Session-03 por 99X Technology
Same Patterns Different Architectures - Colombo Architecture Meetup - Session-03Same Patterns Different Architectures - Colombo Architecture Meetup - Session-03
Same Patterns Different Architectures - Colombo Architecture Meetup - Session-03
99X Technology510 vistas
Strategies for Implementing Aras Innovator por Aras
Strategies for Implementing Aras InnovatorStrategies for Implementing Aras Innovator
Strategies for Implementing Aras Innovator
Aras1.6K vistas
Applying Domain-Driven Design to craft Rich Domain Models por Alexander van Trijffel
Applying Domain-Driven Design to craft Rich Domain ModelsApplying Domain-Driven Design to craft Rich Domain Models
Applying Domain-Driven Design to craft Rich Domain Models
Re-engineering Technology to break barriers with Business por XPDays
Re-engineering Technology to break barriers with BusinessRe-engineering Technology to break barriers with Business
Re-engineering Technology to break barriers with Business
XPDays11 vistas
HOW TO SAVE PILEs of $$$ BY CREATING THE BEST DATA MODEL THE FIRST TIME (Ksc... por Kent Graziano
HOW TO SAVE  PILEs of $$$BY CREATING THE BEST DATA MODEL THE FIRST TIME (Ksc...HOW TO SAVE  PILEs of $$$BY CREATING THE BEST DATA MODEL THE FIRST TIME (Ksc...
HOW TO SAVE PILEs of $$$ BY CREATING THE BEST DATA MODEL THE FIRST TIME (Ksc...
Kent Graziano134 vistas
Dynamics ax 2012 development overview por Ali Raza Zaidi
Dynamics ax 2012 development overviewDynamics ax 2012 development overview
Dynamics ax 2012 development overview
Ali Raza Zaidi4.1K vistas
Performance Testing por vodQA
Performance TestingPerformance Testing
Performance Testing
vodQA68 vistas
TLC2018 Thomas Haver: Transform with Enterprise Automation por Anna Royzman
TLC2018 Thomas Haver: Transform with Enterprise AutomationTLC2018 Thomas Haver: Transform with Enterprise Automation
TLC2018 Thomas Haver: Transform with Enterprise Automation
Anna Royzman233 vistas
M01_Introduction+to+Performance+Tuning_ed1.pdf por ssuserc34fbf
M01_Introduction+to+Performance+Tuning_ed1.pdfM01_Introduction+to+Performance+Tuning_ed1.pdf
M01_Introduction+to+Performance+Tuning_ed1.pdf
ssuserc34fbf5 vistas
Con9573 managing the oim platform with oracle enterprise manager por OracleIDM
Con9573 managing the oim platform with oracle enterprise manager Con9573 managing the oim platform with oracle enterprise manager
Con9573 managing the oim platform with oracle enterprise manager
OracleIDM1.8K vistas
Kdd domain knowledge framework for business analysts por Manoj Kumar Lal
Kdd domain knowledge framework for business analystsKdd domain knowledge framework for business analysts
Kdd domain knowledge framework for business analysts
Manoj Kumar Lal293 vistas

Más de apidays

apidays Australia - The Swiss Cheese Model of Layered API Security, Leon Andr... por
apidays Australia - The Swiss Cheese Model of Layered API Security, Leon Andr...apidays Australia - The Swiss Cheese Model of Layered API Security, Leon Andr...
apidays Australia - The Swiss Cheese Model of Layered API Security, Leon Andr...apidays
48 vistas50 diapositivas
apidays Australia - No API is an island, Erik Tveitnes, REA por
apidays Australia - No API is an island, Erik Tveitnes, REAapidays Australia - No API is an island, Erik Tveitnes, REA
apidays Australia - No API is an island, Erik Tveitnes, REAapidays
37 vistas17 diapositivas
apidays Australia - How We Built Our Generative AI Assistant; New Relic Grok,... por
apidays Australia - How We Built Our Generative AI Assistant; New Relic Grok,...apidays Australia - How We Built Our Generative AI Assistant; New Relic Grok,...
apidays Australia - How We Built Our Generative AI Assistant; New Relic Grok,...apidays
57 vistas32 diapositivas
apidays Australia - Discovering APIs And More With An Internal Developer Port... por
apidays Australia - Discovering APIs And More With An Internal Developer Port...apidays Australia - Discovering APIs And More With An Internal Developer Port...
apidays Australia - Discovering APIs And More With An Internal Developer Port...apidays
39 vistas24 diapositivas
Using APIs in a Design Thinking Approach to Problem Solving.pdf por
Using APIs in a Design Thinking Approach to Problem Solving.pdfUsing APIs in a Design Thinking Approach to Problem Solving.pdf
Using APIs in a Design Thinking Approach to Problem Solving.pdfapidays
27 vistas24 diapositivas
apidays Australia - Transforming Your Network To Secure, Control And Observe ... por
apidays Australia - Transforming Your Network To Secure, Control And Observe ...apidays Australia - Transforming Your Network To Secure, Control And Observe ...
apidays Australia - Transforming Your Network To Secure, Control And Observe ...apidays
27 vistas43 diapositivas

Más de apidays(20)

apidays Australia - The Swiss Cheese Model of Layered API Security, Leon Andr... por apidays
apidays Australia - The Swiss Cheese Model of Layered API Security, Leon Andr...apidays Australia - The Swiss Cheese Model of Layered API Security, Leon Andr...
apidays Australia - The Swiss Cheese Model of Layered API Security, Leon Andr...
apidays48 vistas
apidays Australia - No API is an island, Erik Tveitnes, REA por apidays
apidays Australia - No API is an island, Erik Tveitnes, REAapidays Australia - No API is an island, Erik Tveitnes, REA
apidays Australia - No API is an island, Erik Tveitnes, REA
apidays37 vistas
apidays Australia - How We Built Our Generative AI Assistant; New Relic Grok,... por apidays
apidays Australia - How We Built Our Generative AI Assistant; New Relic Grok,...apidays Australia - How We Built Our Generative AI Assistant; New Relic Grok,...
apidays Australia - How We Built Our Generative AI Assistant; New Relic Grok,...
apidays57 vistas
apidays Australia - Discovering APIs And More With An Internal Developer Port... por apidays
apidays Australia - Discovering APIs And More With An Internal Developer Port...apidays Australia - Discovering APIs And More With An Internal Developer Port...
apidays Australia - Discovering APIs And More With An Internal Developer Port...
apidays39 vistas
Using APIs in a Design Thinking Approach to Problem Solving.pdf por apidays
Using APIs in a Design Thinking Approach to Problem Solving.pdfUsing APIs in a Design Thinking Approach to Problem Solving.pdf
Using APIs in a Design Thinking Approach to Problem Solving.pdf
apidays27 vistas
apidays Australia - Transforming Your Network To Secure, Control And Observe ... por apidays
apidays Australia - Transforming Your Network To Secure, Control And Observe ...apidays Australia - Transforming Your Network To Secure, Control And Observe ...
apidays Australia - Transforming Your Network To Secure, Control And Observe ...
apidays27 vistas
apidays Australia - Consuming And Building APIs During Hackathons, William Mc... por apidays
apidays Australia - Consuming And Building APIs During Hackathons, William Mc...apidays Australia - Consuming And Building APIs During Hackathons, William Mc...
apidays Australia - Consuming And Building APIs During Hackathons, William Mc...
apidays11 vistas
apidays Australia - Building On-Premise Hybrid API Platforms, David Freeman, ... por apidays
apidays Australia - Building On-Premise Hybrid API Platforms, David Freeman, ...apidays Australia - Building On-Premise Hybrid API Platforms, David Freeman, ...
apidays Australia - Building On-Premise Hybrid API Platforms, David Freeman, ...
apidays17 vistas
apidays Australia - Enable Faster Delivery With Collaborative Platform Teams,... por apidays
apidays Australia - Enable Faster Delivery With Collaborative Platform Teams,...apidays Australia - Enable Faster Delivery With Collaborative Platform Teams,...
apidays Australia - Enable Faster Delivery With Collaborative Platform Teams,...
apidays28 vistas
apidays Australia - Building Trust Brick by Brick, Dasith Wijesiriwardena, Ju... por apidays
apidays Australia - Building Trust Brick by Brick, Dasith Wijesiriwardena, Ju...apidays Australia - Building Trust Brick by Brick, Dasith Wijesiriwardena, Ju...
apidays Australia - Building Trust Brick by Brick, Dasith Wijesiriwardena, Ju...
apidays39 vistas
apidays Australia - The Playful Bond Between REST And Data Streams, Warren Ve... por apidays
apidays Australia - The Playful Bond Between REST And Data Streams, Warren Ve...apidays Australia - The Playful Bond Between REST And Data Streams, Warren Ve...
apidays Australia - The Playful Bond Between REST And Data Streams, Warren Ve...
apidays36 vistas
apidays Australia - Unlocking The Power: The Importance Of API Registration, ... por apidays
apidays Australia - Unlocking The Power: The Importance Of API Registration, ...apidays Australia - Unlocking The Power: The Importance Of API Registration, ...
apidays Australia - Unlocking The Power: The Importance Of API Registration, ...
apidays17 vistas
apidays Australia - API Strategy In The Era Of Generative AI,Shreshta Shyamsu... por apidays
apidays Australia - API Strategy In The Era Of Generative AI,Shreshta Shyamsu...apidays Australia - API Strategy In The Era Of Generative AI,Shreshta Shyamsu...
apidays Australia - API Strategy In The Era Of Generative AI,Shreshta Shyamsu...
apidays65 vistas
apidays London 2023 - How APIs support the democratization of FAIR data and d... por apidays
apidays London 2023 - How APIs support the democratization of FAIR data and d...apidays London 2023 - How APIs support the democratization of FAIR data and d...
apidays London 2023 - How APIs support the democratization of FAIR data and d...
apidays67 vistas
apidays London 2023 - Revolutionising fitness and well-being, David Turner, V... por apidays
apidays London 2023 - Revolutionising fitness and well-being, David Turner, V...apidays London 2023 - Revolutionising fitness and well-being, David Turner, V...
apidays London 2023 - Revolutionising fitness and well-being, David Turner, V...
apidays31 vistas
apidays London 2023 - Let's make "true" impact happen!, Sandra Sydow, Climate... por apidays
apidays London 2023 - Let's make "true" impact happen!, Sandra Sydow, Climate...apidays London 2023 - Let's make "true" impact happen!, Sandra Sydow, Climate...
apidays London 2023 - Let's make "true" impact happen!, Sandra Sydow, Climate...
apidays23 vistas
apidays London 2023 - 7 pillars of an API Factory, Patrick Brosse, Amadeus por apidays
apidays London 2023 - 7 pillars of an API Factory, Patrick Brosse, Amadeusapidays London 2023 - 7 pillars of an API Factory, Patrick Brosse, Amadeus
apidays London 2023 - 7 pillars of an API Factory, Patrick Brosse, Amadeus
apidays48 vistas
apidays London 2023 - Meeting Relentless Business Change in a Post API Econom... por apidays
apidays London 2023 - Meeting Relentless Business Change in a Post API Econom...apidays London 2023 - Meeting Relentless Business Change in a Post API Econom...
apidays London 2023 - Meeting Relentless Business Change in a Post API Econom...
apidays17 vistas
apidays London 2023 - Overengineering Weakens your API Security, Dr. David Va... por apidays
apidays London 2023 - Overengineering Weakens your API Security, Dr. David Va...apidays London 2023 - Overengineering Weakens your API Security, Dr. David Va...
apidays London 2023 - Overengineering Weakens your API Security, Dr. David Va...
apidays38 vistas
apidays London 2023 - When to soar and when to dive, Claire Barrett, APIsFirst por apidays
apidays London 2023 - When to soar and when to dive, Claire Barrett, APIsFirst apidays London 2023 - When to soar and when to dive, Claire Barrett, APIsFirst
apidays London 2023 - When to soar and when to dive, Claire Barrett, APIsFirst
apidays21 vistas

Último

CRIJ4385_Death Penalty_F23.pptx por
CRIJ4385_Death Penalty_F23.pptxCRIJ4385_Death Penalty_F23.pptx
CRIJ4385_Death Penalty_F23.pptxyvettemm100
7 vistas24 diapositivas
SAP-TCodes.pdf por
SAP-TCodes.pdfSAP-TCodes.pdf
SAP-TCodes.pdfmustafaghulam8181
10 vistas285 diapositivas
Data about the sector workshop por
Data about the sector workshopData about the sector workshop
Data about the sector workshopinfo828217
15 vistas27 diapositivas
SUPER STORE SQL PROJECT.pptx por
SUPER STORE SQL PROJECT.pptxSUPER STORE SQL PROJECT.pptx
SUPER STORE SQL PROJECT.pptxkhan888620
13 vistas16 diapositivas
shivam tiwari.pptx por
shivam tiwari.pptxshivam tiwari.pptx
shivam tiwari.pptxAanyaMishra4
5 vistas14 diapositivas
apple.pptx por
apple.pptxapple.pptx
apple.pptxhoneybeeqwe
5 vistas15 diapositivas

Último(20)

CRIJ4385_Death Penalty_F23.pptx por yvettemm100
CRIJ4385_Death Penalty_F23.pptxCRIJ4385_Death Penalty_F23.pptx
CRIJ4385_Death Penalty_F23.pptx
yvettemm1007 vistas
Data about the sector workshop por info828217
Data about the sector workshopData about the sector workshop
Data about the sector workshop
info82821715 vistas
SUPER STORE SQL PROJECT.pptx por khan888620
SUPER STORE SQL PROJECT.pptxSUPER STORE SQL PROJECT.pptx
SUPER STORE SQL PROJECT.pptx
khan88862013 vistas
3196 The Case of The East River por ErickANDRADE90
3196 The Case of The East River3196 The Case of The East River
3196 The Case of The East River
ErickANDRADE9017 vistas
Organic Shopping in Google Analytics 4.pdf por GA4 Tutorials
Organic Shopping in Google Analytics 4.pdfOrganic Shopping in Google Analytics 4.pdf
Organic Shopping in Google Analytics 4.pdf
GA4 Tutorials16 vistas
[DSC Europe 23][AI:CSI] Dragan Pleskonjic - AI Impact on Cybersecurity and P... por DataScienceConferenc1
[DSC Europe 23][AI:CSI]  Dragan Pleskonjic - AI Impact on Cybersecurity and P...[DSC Europe 23][AI:CSI]  Dragan Pleskonjic - AI Impact on Cybersecurity and P...
[DSC Europe 23][AI:CSI] Dragan Pleskonjic - AI Impact on Cybersecurity and P...
OECD-Persol Holdings Workshop on Advancing Employee Well-being in Business an... por StatsCommunications
OECD-Persol Holdings Workshop on Advancing Employee Well-being in Business an...OECD-Persol Holdings Workshop on Advancing Employee Well-being in Business an...
OECD-Persol Holdings Workshop on Advancing Employee Well-being in Business an...
CRM stick or twist.pptx por info828217
CRM stick or twist.pptxCRM stick or twist.pptx
CRM stick or twist.pptx
info82821711 vistas
[DSC Europe 23] Danijela Horak - The Innovator’s Dilemma: to Build or Not to ... por DataScienceConferenc1
[DSC Europe 23] Danijela Horak - The Innovator’s Dilemma: to Build or Not to ...[DSC Europe 23] Danijela Horak - The Innovator’s Dilemma: to Build or Not to ...
[DSC Europe 23] Danijela Horak - The Innovator’s Dilemma: to Build or Not to ...
[DSC Europe 23][AI:CSI] Aleksa Stojanovic - Applying AI for Threat Detection ... por DataScienceConferenc1
[DSC Europe 23][AI:CSI] Aleksa Stojanovic - Applying AI for Threat Detection ...[DSC Europe 23][AI:CSI] Aleksa Stojanovic - Applying AI for Threat Detection ...
[DSC Europe 23][AI:CSI] Aleksa Stojanovic - Applying AI for Threat Detection ...
Data Journeys Hard Talk workshop final.pptx por info828217
Data Journeys Hard Talk workshop final.pptxData Journeys Hard Talk workshop final.pptx
Data Journeys Hard Talk workshop final.pptx
info82821710 vistas
LIVE OAK MEMORIAL PARK.pptx por ms2332always
LIVE OAK MEMORIAL PARK.pptxLIVE OAK MEMORIAL PARK.pptx
LIVE OAK MEMORIAL PARK.pptx
ms2332always7 vistas
[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init... por DataScienceConferenc1
[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init...[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init...
[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init...
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx por DataScienceConferenc1
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx

apidays London 2023 - Why and how to apply DDD to APIs, Radhouane Jrad, QBE Europe

  • 1. Domain Driven Design 2023 © Mother Earth Radhouane Jrad
  • 2. The Plan • DDD in General (History, etc.) • Designing in DDD • Implementing DDD: Use-Case • Implementing DDD Principles • DDD & Horizontal Scalability • Principles Guiding API Governance 02/23
  • 3. Disclaimer DDD is a rich, complex, sometimes antagonistic topic. This presentation is an implementation of DDD and some aspects may differ from other implementations. The views in this presentation fairly (but not fully) adhere to standard DDD concepts. 03/23
  • 4. Mantra As a developer, it is your understanding, rather than your knowledge, that becomes software! Alberto Brandolini 04/23
  • 6. How Did We Get to DDD? Business Model Business Domain Domain Driven Design • Describes core aspects of company’s values (economic, social, environmental, etc.) & how it ‘lives’ them • Reflects rationale of a company’s purposes, processes, markets, products & services, strategies, infrastructure, operational processes, policies, etc. Business Strategy • Defines goals of the company • Competitive matters: How to fight & compete? What are our strengths & weaknesses? Where are market opportunities? Lateral concerns (social, societal, environmental, etc.) • Different to Operational Strategy (efficiency, cost mgmt., etc.) Corporate Strategy • Existential matters: • What business should we be in? • What business should we NOT be in? • Essentially, 2 types of models: • Linear (aka Pipes): upstream production & downstream consumption, e.g. ink > pen + lid > wholesale • Networked (aka Platforms): multi-directional exchange (e.g. Digital Transformation) • We start getting technical: • A “simple view” of a “complex Reality (UML) • Class-based representation of objects being implemented • Generated through Business Modelling & designed by Business Analysts. • Categorises the set of business systems that represent autonomous units of the business modeled during Business Analysis. Strategy Operations Infrastructure • Aim is to structure the code and its language to reflect the Business Domain • e.g. Class ClaimApplication; + Class Customer + method approveClaim + method rejectClaim 06/23
  • 7. The Concept of Domain Driven Design Business Domain Domain Driven Design • We start getting technical: • A “simple view” of a “complex Reality (UML) • Class-based representation of objects being implemented • Generated through Business Modelling & designed by Business Analysts. • Categorises the set of business systems that represent autonomous units of the business modeled during Business Analysis. • Aim is to structure the code and its language to reflect the Business Domain • e.g. Class ClaimApplication; + Class Customer + method approveClaim + method rejectClaim 06/23
  • 8. When to Use DDD? 07/23
  • 10. DDD Strategic Tools 09/23 Sleeping Compartment Engine Room Logistics Kitchen Captain’s Corner Viewing Deck Gathering Area
  • 11. DDD Strategic Tools 10/23 Dining Room Kitchen Master Bedroom Garage Guests Room Living Room Kid’s Room Master Storage Storage Front Lawn Shower/WC
  • 13. Insurance Example Customer = Active policies, historical policies, MTA Domain: Policy Customer = Open claims, historical claims, NCD status Domain: Claim Customer = Name, physical address, mobile no. Domain: Party DB API DB API DB API 12/23
  • 14. Case Study: Integration for Insurance 13/23
  • 15. Policy Domains Cross-Contamination 14/23 Claims DGL API AL API ACL API DGL API AL API ACL API Consumer A Sys. Of. Rec X Claims
  • 16. Policy Domain Gateway Layer APIs 15/23 Claims DGL API AL API ACL API DGL API AL API ACL API Consumer A Sys. Of. Rec • DGL API act as gateway to the domain • Every domain’s Abstract Layer is constructed, developed, and maintained ignoring other domains • Every domain’s ACL is constructed, developed, and maintained ignoring other domains • Security, Infrastructure,Testing, and Asset Reusability requirements are easy to address • Usually one DGL API per Domain.
  • 17. Domain Gateway Layer APIs 16/23
  • 18. Claims Policy The Case of a Common System of Records 17/23 DGL API AL API ACL API DGL API ACL API Consumer A Sys. Of. Rec Consumer B X
  • 19. Claims Policy Anti-Corruption Layer 17/23 DGL API AL API ACL API DGL API ACL API Consumer A Sys. Of. Rec Consumer B Claim Processes Need Policy no? Policy Processes
  • 20. DDD & Horizontal Scalability 18/23
  • 21. Instance A (1 CPU Unit) DDD & Horizontal Scalability 19/23 Step 1 Step 2 Step 3 Step 4 Step 5 Instance B (1 CPU Unit) Step 1 Step 2 Step 3 Step 4 Step 5 Queues Queues
  • 23. Principles Guiding API Governance 21/23 Structural Principles Feedback-Based Design (DSR) SOLiD: •Single Responsibility Principle (SRP) •Open/Close Principle (OCP) •Liskov, Interface Segregation Principle (ISP) •Dependency Inversion Principles Reusability Primacy of Principles Domain Driven Design Separation of Concerns Three-layered Architecture API-Led Architecture YAGNI Minimise Coupling KISS Git-based Version Control O-Auth based Security C-back with JWT Asset exposure (Marketplace) IPaaS (Managed Services) API Catalogue Logging Smart Endpoints, Dumb Pipelines Asynchronous vs. Synchronous Queues vs. EDA vs. Pub/Sub Driving Principles Technological Baseline Security By Design Horizontal vs. Vertical Scalability Singular Technology Integration Inventory Load Balancers REST vs. SOAP Component Based Statelessness
  • 24. API Building Blocks 22/23 Domain Driven Design API-Led Design Pattern Horizontal- First Scalability REST-first , JSON-first Integration iPaaS Security By Design Product- based Reusability; Evolvability; Extensibility; Security; Cost-Effectiveness; Auditability; Clarity; Simplicity/Simplification…