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 sur 25

Recommandé

Domain Driven Design Introduction par
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introductionwojtek_s
1.2K vues53 diapositives
Tools for SIAM - Portfolio management par
Tools for SIAM - Portfolio managementTools for SIAM - Portfolio management
Tools for SIAM - Portfolio managementSoftware AG UK
4K vues21 diapositives
2019-Nov: Domain Driven Design (DDD) and when not to use it par
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 vues45 diapositives
Something super epic... par
Something super epic...Something super epic...
Something super epic...Rabah Rahil
673 vues38 diapositives
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design par
.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 vues55 diapositives
An Introduction to Domain Driven Design in PHP par
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 vues56 diapositives

Contenu connexe

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

Requirements engineering in agile par
Requirements engineering in agileRequirements engineering in agile
Requirements engineering in agileTricode (part of Dept)
4.1K vues24 diapositives
Security Modelling in ArchiMate par
Security Modelling in ArchiMateSecurity Modelling in ArchiMate
Security Modelling in ArchiMatePECB
5.2K vues25 diapositives
CCRG 2005 Alberta Assessors Association Conference Seminar par
CCRG 2005 Alberta Assessors Association Conference SeminarCCRG 2005 Alberta Assessors Association Conference Seminar
CCRG 2005 Alberta Assessors Association Conference SeminarSalvador Carlos Hernandez Ramirez
240 vues57 diapositives
ASSET LIFE CYCLE COST ESTIMATING AND THE CCRG Rev4 par
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 vues57 diapositives
Asset Information Management (AIM) Presentation @ ARC's 2011 Industry Forum par
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 vues22 diapositives
Same Patterns Different Architectures - Colombo Architecture Meetup - Session-03 par
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 vues37 diapositives

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

Security Modelling in ArchiMate par PECB
Security Modelling in ArchiMateSecurity Modelling in ArchiMate
Security Modelling in ArchiMate
PECB 5.2K vues
Asset Information Management (AIM) Presentation @ ARC's 2011 Industry Forum par 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 vues
Same Patterns Different Architectures - Colombo Architecture Meetup - Session-03 par 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 vues
Strategies for Implementing Aras Innovator par Aras
Strategies for Implementing Aras InnovatorStrategies for Implementing Aras Innovator
Strategies for Implementing Aras Innovator
Aras1.6K vues
Re-engineering Technology to break barriers with Business par 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 vues
HOW TO SAVE PILEs of $$$ BY CREATING THE BEST DATA MODEL THE FIRST TIME (Ksc... par 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 vues
Dynamics ax 2012 development overview par Ali Raza Zaidi
Dynamics ax 2012 development overviewDynamics ax 2012 development overview
Dynamics ax 2012 development overview
Ali Raza Zaidi4.1K vues
Performance Testing par vodQA
Performance TestingPerformance Testing
Performance Testing
vodQA68 vues
TLC2018 Thomas Haver: Transform with Enterprise Automation par Anna Royzman
TLC2018 Thomas Haver: Transform with Enterprise AutomationTLC2018 Thomas Haver: Transform with Enterprise Automation
TLC2018 Thomas Haver: Transform with Enterprise Automation
Anna Royzman233 vues
M01_Introduction+to+Performance+Tuning_ed1.pdf par ssuserc34fbf
M01_Introduction+to+Performance+Tuning_ed1.pdfM01_Introduction+to+Performance+Tuning_ed1.pdf
M01_Introduction+to+Performance+Tuning_ed1.pdf
ssuserc34fbf5 vues
Con9573 managing the oim platform with oracle enterprise manager par 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 vues
Kdd domain knowledge framework for business analysts par 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 vues

Plus de apidays

apidays Australia - The Swiss Cheese Model of Layered API Security, Leon Andr... par
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
46 vues50 diapositives
apidays Australia - No API is an island, Erik Tveitnes, REA par
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 vues17 diapositives
apidays Australia - How We Built Our Generative AI Assistant; New Relic Grok,... par
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 vues32 diapositives
apidays Australia - Discovering APIs And More With An Internal Developer Port... par
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
36 vues24 diapositives
Using APIs in a Design Thinking Approach to Problem Solving.pdf par
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 vues24 diapositives
apidays Australia - Transforming Your Network To Secure, Control And Observe ... par
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 vues43 diapositives

Plus de apidays(20)

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

Dernier

Data structure and algorithm. par
Data structure and algorithm. Data structure and algorithm.
Data structure and algorithm. Abdul salam
19 vues24 diapositives
3196 The Case of The East River par
3196 The Case of The East River3196 The Case of The East River
3196 The Case of The East RiverErickANDRADE90
11 vues4 diapositives
Advanced_Recommendation_Systems_Presentation.pptx par
Advanced_Recommendation_Systems_Presentation.pptxAdvanced_Recommendation_Systems_Presentation.pptx
Advanced_Recommendation_Systems_Presentation.pptxneeharikasingh29
5 vues9 diapositives
[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation par
[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation
[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented GenerationDataScienceConferenc1
7 vues29 diapositives
Chapter 3b- Process Communication (1) (1)(1) (1).pptx par
Chapter 3b- Process Communication (1) (1)(1) (1).pptxChapter 3b- Process Communication (1) (1)(1) (1).pptx
Chapter 3b- Process Communication (1) (1)(1) (1).pptxayeshabaig2004
5 vues30 diapositives
Introduction to Microsoft Fabric.pdf par
Introduction to Microsoft Fabric.pdfIntroduction to Microsoft Fabric.pdf
Introduction to Microsoft Fabric.pdfishaniuudeshika
29 vues16 diapositives

Dernier(20)

Data structure and algorithm. par Abdul salam
Data structure and algorithm. Data structure and algorithm.
Data structure and algorithm.
Abdul salam 19 vues
Advanced_Recommendation_Systems_Presentation.pptx par neeharikasingh29
Advanced_Recommendation_Systems_Presentation.pptxAdvanced_Recommendation_Systems_Presentation.pptx
Advanced_Recommendation_Systems_Presentation.pptx
[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation par DataScienceConferenc1
[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation
[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation
Chapter 3b- Process Communication (1) (1)(1) (1).pptx par ayeshabaig2004
Chapter 3b- Process Communication (1) (1)(1) (1).pptxChapter 3b- Process Communication (1) (1)(1) (1).pptx
Chapter 3b- Process Communication (1) (1)(1) (1).pptx
Short Story Assignment by Kelly Nguyen par kellynguyen01
Short Story Assignment by Kelly NguyenShort Story Assignment by Kelly Nguyen
Short Story Assignment by Kelly Nguyen
kellynguyen0119 vues
UNEP FI CRS Climate Risk Results.pptx par pekka28
UNEP FI CRS Climate Risk Results.pptxUNEP FI CRS Climate Risk Results.pptx
UNEP FI CRS Climate Risk Results.pptx
pekka2811 vues
CRIJ4385_Death Penalty_F23.pptx par yvettemm100
CRIJ4385_Death Penalty_F23.pptxCRIJ4385_Death Penalty_F23.pptx
CRIJ4385_Death Penalty_F23.pptx
yvettemm1006 vues
Building Real-Time Travel Alerts par Timothy Spann
Building Real-Time Travel AlertsBuilding Real-Time Travel Alerts
Building Real-Time Travel Alerts
Timothy Spann111 vues
Cross-network in Google Analytics 4.pdf par GA4 Tutorials
Cross-network in Google Analytics 4.pdfCross-network in Google Analytics 4.pdf
Cross-network in Google Analytics 4.pdf
GA4 Tutorials6 vues
Organic Shopping in Google Analytics 4.pdf par GA4 Tutorials
Organic Shopping in Google Analytics 4.pdfOrganic Shopping in Google Analytics 4.pdf
Organic Shopping in Google Analytics 4.pdf
GA4 Tutorials11 vues
Supercharging your Data with Azure AI Search and Azure OpenAI par Peter Gallagher
Supercharging your Data with Azure AI Search and Azure OpenAISupercharging your Data with Azure AI Search and Azure OpenAI
Supercharging your Data with Azure AI Search and Azure OpenAI
Peter Gallagher37 vues
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx par 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
Understanding Hallucinations in LLMs - 2023 09 29.pptx par Greg Makowski
Understanding Hallucinations in LLMs - 2023 09 29.pptxUnderstanding Hallucinations in LLMs - 2023 09 29.pptx
Understanding Hallucinations in LLMs - 2023 09 29.pptx
Greg Makowski17 vues

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…