SlideShare a Scribd company logo
Domain Driven Design
Arch CoP
14/08/2023
Focus on Domain
When we begin a software project, we should focus on the domain it is
operating in.
A domain is a sphere of
knowledge, influence, or
activity. It is the business
area of focus for the
application developer.
Valuation Domain
Persona:
 Fund/Portfolio manager
 Debt fund manager
 Head of real estate lending
 Appraiser
 Broker
Equity Investors need to manage the valuation of their assets, loans, and investments
to support better and more timely decision-making.
Focus on Domain (cont.)
How can we make the software fit harmoniously with the domain?
 Make software a reflection of the
domain.
 Software needs to incorporate the core
concepts and elements of the domain,
and to preciously realize the
relationships between them.
 The entire purpose of the software is to
enhance a specific domain.
A Core Domain is a part of the
business Domain that is of
primary importance to the
success of the organization.
Supporting Subdomain
Generic Subdomain
Supplemented by
Domains, Subdomains
The whole Domain of the organization is composed of Subdomains.
 If a subdomain models some aspect of the business that is essential, yet not core, then it is a Supporting
Subdomain. The business creates a Supporting Subdomain because it is somewhat specialised.
 If a subdomain captures nothing special to the business, yet it is required for the overall business
solution, then it is a Generic Subdomain.
Domains, Subdomains - example
Domain
Valuation Context
Valuation Manage
ment (Core)
Collaboration
Context
Guest Collaboration
(Supporting)
Identity and
Access Context
Identity and
Access (Generic)
Strategic Design
Patterns –
Ubiquitous
Language
Common
Language
Domain Expert
Developers Architect
Testers
• A core principle of DDD is to use a language based on the model.
• The Ubiquitous Language connects all the parts of the design and
creates the premise for the design team to function well.
Strategic Design
Patterns –
Bounded
Context
A Bounded Context is an explicit boundary
within which a domain model exists.
Valuation Context
Identity and
Access Context
User Role
Portfolio
Manager
Broker
Appraiser
Portfolio Property
Workflow
Investor
Report
Modeling
Permissions
Strategic Design
Patterns –
Bounded
Context
Inside the boundary all terms and phrases of the
Ubiquitous Language have specific meaning.
In Valuation Context, Domain Experts don't describe the people who does
the valuation as Users with Permissions. They talk about these people in
terms of the roles they play in the Valution context, like, Fund/Portfolio
Manager, Appraiser, Broker.
On the other hand, it's in an Identity and Access Context that we talk about
Users. In this context, User objects have usernames, and detailed
information about the individual person.
We do not create an Appraiser object out of thin air. Every Appraiser must
be prequalified. We confirm the existence of a User playing the appraiser
Role within Identitiy and Access context.
The attributes of an authentication descriptor are passed with requests to
the Identity and Access context. To create a new Appraiser object in
Valution context, a subset of User attributes and a Role are used.
Strategic Design
Patterns –
Bounded
Context
Domain
Valuation Context
Valuation
Management (Core)
Collaboration
Context
Guest Collaboration
(Supporting)
Identity and
Access Context
Identity and
Access (Generic)
Strategic Design
Patterns –
Context Maps
Domain
Valuation Context
Collaboration
Context
Identity and
Access Context
Identity and
Access (Generic)
Context Maps show the relationships among
Bounded Context.
ACL
ACL
OHS/PL
OHS/PL
U
U
D
U
D
ACL
U = Upstream
D = Downstream
ACL = Anti-Corruption Layer
OHS = Open Host Service
PL = Published Language
Tactical Design
Patterns
<<entity>>
Organization
<<domain event>>
OrgProvisionedEvent
<<domain event>>
OrgUpdatedEvent
Delivery & CS Context
<<value object>>
ContactInformation
<<aggregate root>>
User
<<entity>>
Person
Identity and Access Context
<<entity>>
Role
<<entity>>
ServiceContract
<<value object>>
ContractDuration
<<domain event>>
UserProvisionedEvent
<<domain event>>
UserDeactivatedEvent
Tactical Design
Patterns
An Entity is a unique thing and is capable of being changed continuously over a
period. Changes can be so extensive that the object might seem much different
from what it once was. Yet it is the same object by identity (Unique Identity).
Value Objects are a vital building block of DDD. Examples of objects that are
commonly modeled as Value Objects are numbers (3, 10, 294.34); text strings;
dates; times; currencies; postal addresses; phone numbers. Benefits of using
Value Objects – easy to create, test, use, optimise, and maintain.
An Aggregate is composed of either a single entity or a cluster of Entities and
Value Objects that must remain transactionally consistent throughout the
Aggregate's lifetime.
An instance of an Aggregate is persisted using its Repository and later searched
for within and retrived from it.
Use stateless Services inside the domain model to perform business operations
that don't fit naturally as an operation on an Entity or a Value Object.
Use Domain Events to indicate the occurance of significant happening in the
domain.
Thank You

More Related Content

Similar to Arch CoP - Domain Driven Design.pptx

User Experience Distilled
User Experience DistilledUser Experience Distilled
User Experience Distilled
Hindu Dharma
 
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
GlobalLogic Ukraine
 
Steve Gara Presentation Sgbizservices
Steve Gara Presentation   SgbizservicesSteve Gara Presentation   Sgbizservices
Steve Gara Presentation Sgbizservices
Steven Gara, M.S., CBAP ®, Six Sigma Green Belt
 
Requirements Definitions Of The Geospatial Web
Requirements Definitions Of The Geospatial WebRequirements Definitions Of The Geospatial Web
Requirements Definitions Of The Geospatial Web
Michael Maclennan
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introduction
wojtek_s
 
Emerging Roles and Hot Markets for Tomorrow’s Tech Writers v3.0
Emerging Roles and Hot Markets for Tomorrow’s Tech Writers v3.0Emerging Roles and Hot Markets for Tomorrow’s Tech Writers v3.0
Emerging Roles and Hot Markets for Tomorrow’s Tech Writers v3.0
Content Rules, Inc.
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) Presentation
Oğuzhan Soykan
 
DDD eXchange
DDD eXchangeDDD eXchange
DDD eXchange
Skills Matter
 
Domain Driven Design in an Agile World
Domain Driven Design in an Agile WorldDomain Driven Design in an Agile World
Domain Driven Design in an Agile World
Lorraine Steyn
 
D2 domain driven-design
D2 domain driven-designD2 domain driven-design
D2 domain driven-design
Arnaud Bouchez
 
Hire Top Flutter Developers in 2024 A Step-by-Step Guide
Hire Top Flutter Developers in 2024 A Step-by-Step GuideHire Top Flutter Developers in 2024 A Step-by-Step Guide
Hire Top Flutter Developers in 2024 A Step-by-Step Guide
AIS Technolabs Pvt Ltd
 
Seminar - Scalable Enterprise Application Development Using DDD and CQRS
Seminar - Scalable Enterprise Application Development Using DDD and CQRSSeminar - Scalable Enterprise Application Development Using DDD and CQRS
Seminar - Scalable Enterprise Application Development Using DDD and CQRS
Mizanur Sarker
 
Resume_Asish
Resume_AsishResume_Asish
Resume_Asish
Asish Patnaik
 
Domain driven design: a gentle introduction
Domain driven design:  a gentle introductionDomain driven design:  a gentle introduction
Domain driven design: a gentle introduction
Asher Sterkin
 
Siraj_CV
Siraj_CVSiraj_CV
The Modern Software Architect
The Modern Software ArchitectThe Modern Software Architect
The Modern Software Architect
Niels Bech Nielsen
 
Domain Driven Design Quickly
Domain Driven Design QuicklyDomain Driven Design Quickly
Domain Driven Design Quickly
Mariam Hakobyan
 
DDD
DDDDDD
Mohammod Hanif Mia
Mohammod Hanif MiaMohammod Hanif Mia
Mohammod Hanif Mia
Mohammod Mia
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Mojammel Haque
 

Similar to Arch CoP - Domain Driven Design.pptx (20)

User Experience Distilled
User Experience DistilledUser Experience Distilled
User Experience Distilled
 
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
 
Steve Gara Presentation Sgbizservices
Steve Gara Presentation   SgbizservicesSteve Gara Presentation   Sgbizservices
Steve Gara Presentation Sgbizservices
 
Requirements Definitions Of The Geospatial Web
Requirements Definitions Of The Geospatial WebRequirements Definitions Of The Geospatial Web
Requirements Definitions Of The Geospatial Web
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introduction
 
Emerging Roles and Hot Markets for Tomorrow’s Tech Writers v3.0
Emerging Roles and Hot Markets for Tomorrow’s Tech Writers v3.0Emerging Roles and Hot Markets for Tomorrow’s Tech Writers v3.0
Emerging Roles and Hot Markets for Tomorrow’s Tech Writers v3.0
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) Presentation
 
DDD eXchange
DDD eXchangeDDD eXchange
DDD eXchange
 
Domain Driven Design in an Agile World
Domain Driven Design in an Agile WorldDomain Driven Design in an Agile World
Domain Driven Design in an Agile World
 
D2 domain driven-design
D2 domain driven-designD2 domain driven-design
D2 domain driven-design
 
Hire Top Flutter Developers in 2024 A Step-by-Step Guide
Hire Top Flutter Developers in 2024 A Step-by-Step GuideHire Top Flutter Developers in 2024 A Step-by-Step Guide
Hire Top Flutter Developers in 2024 A Step-by-Step Guide
 
Seminar - Scalable Enterprise Application Development Using DDD and CQRS
Seminar - Scalable Enterprise Application Development Using DDD and CQRSSeminar - Scalable Enterprise Application Development Using DDD and CQRS
Seminar - Scalable Enterprise Application Development Using DDD and CQRS
 
Resume_Asish
Resume_AsishResume_Asish
Resume_Asish
 
Domain driven design: a gentle introduction
Domain driven design:  a gentle introductionDomain driven design:  a gentle introduction
Domain driven design: a gentle introduction
 
Siraj_CV
Siraj_CVSiraj_CV
Siraj_CV
 
The Modern Software Architect
The Modern Software ArchitectThe Modern Software Architect
The Modern Software Architect
 
Domain Driven Design Quickly
Domain Driven Design QuicklyDomain Driven Design Quickly
Domain Driven Design Quickly
 
DDD
DDDDDD
DDD
 
Mohammod Hanif Mia
Mohammod Hanif MiaMohammod Hanif Mia
Mohammod Hanif Mia
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 

More from Sanjoy Kumar Roy

Visualizing Software Architecture Effectively in Service Description
Visualizing Software Architecture Effectively in Service DescriptionVisualizing Software Architecture Effectively in Service Description
Visualizing Software Architecture Effectively in Service Description
Sanjoy Kumar Roy
 
Hypermedia API and how to document it effectively
Hypermedia API and how to document it effectivelyHypermedia API and how to document it effectively
Hypermedia API and how to document it effectively
Sanjoy Kumar Roy
 
An introduction to OAuth 2
An introduction to OAuth 2An introduction to OAuth 2
An introduction to OAuth 2
Sanjoy Kumar Roy
 
Transaction
TransactionTransaction
Transaction
Sanjoy Kumar Roy
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principles
Sanjoy Kumar Roy
 
Lessons learned in developing an agile architecture to reward our customers.
Lessons learned in developing an agile architecture to reward our customers.Lessons learned in developing an agile architecture to reward our customers.
Lessons learned in developing an agile architecture to reward our customers.
Sanjoy Kumar Roy
 
An introduction to G1 collector for busy developers
An introduction to G1 collector for busy developersAn introduction to G1 collector for busy developers
An introduction to G1 collector for busy developers
Sanjoy Kumar Roy
 
Major Java 8 features
Major Java 8 featuresMajor Java 8 features
Major Java 8 features
Sanjoy Kumar Roy
 

More from Sanjoy Kumar Roy (8)

Visualizing Software Architecture Effectively in Service Description
Visualizing Software Architecture Effectively in Service DescriptionVisualizing Software Architecture Effectively in Service Description
Visualizing Software Architecture Effectively in Service Description
 
Hypermedia API and how to document it effectively
Hypermedia API and how to document it effectivelyHypermedia API and how to document it effectively
Hypermedia API and how to document it effectively
 
An introduction to OAuth 2
An introduction to OAuth 2An introduction to OAuth 2
An introduction to OAuth 2
 
Transaction
TransactionTransaction
Transaction
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principles
 
Lessons learned in developing an agile architecture to reward our customers.
Lessons learned in developing an agile architecture to reward our customers.Lessons learned in developing an agile architecture to reward our customers.
Lessons learned in developing an agile architecture to reward our customers.
 
An introduction to G1 collector for busy developers
An introduction to G1 collector for busy developersAn introduction to G1 collector for busy developers
An introduction to G1 collector for busy developers
 
Major Java 8 features
Major Java 8 featuresMajor Java 8 features
Major Java 8 features
 

Recently uploaded

Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
TaghreedAltamimi
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
Peter Muessig
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
Top 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptxTop 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptx
devvsandy
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 

Recently uploaded (20)

Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
Top 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptxTop 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptx
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 

Arch CoP - Domain Driven Design.pptx

  • 1. Domain Driven Design Arch CoP 14/08/2023
  • 2. Focus on Domain When we begin a software project, we should focus on the domain it is operating in. A domain is a sphere of knowledge, influence, or activity. It is the business area of focus for the application developer. Valuation Domain Persona:  Fund/Portfolio manager  Debt fund manager  Head of real estate lending  Appraiser  Broker Equity Investors need to manage the valuation of their assets, loans, and investments to support better and more timely decision-making.
  • 3. Focus on Domain (cont.) How can we make the software fit harmoniously with the domain?  Make software a reflection of the domain.  Software needs to incorporate the core concepts and elements of the domain, and to preciously realize the relationships between them.  The entire purpose of the software is to enhance a specific domain.
  • 4. A Core Domain is a part of the business Domain that is of primary importance to the success of the organization. Supporting Subdomain Generic Subdomain Supplemented by Domains, Subdomains The whole Domain of the organization is composed of Subdomains.  If a subdomain models some aspect of the business that is essential, yet not core, then it is a Supporting Subdomain. The business creates a Supporting Subdomain because it is somewhat specialised.  If a subdomain captures nothing special to the business, yet it is required for the overall business solution, then it is a Generic Subdomain.
  • 5. Domains, Subdomains - example Domain Valuation Context Valuation Manage ment (Core) Collaboration Context Guest Collaboration (Supporting) Identity and Access Context Identity and Access (Generic)
  • 6. Strategic Design Patterns – Ubiquitous Language Common Language Domain Expert Developers Architect Testers • A core principle of DDD is to use a language based on the model. • The Ubiquitous Language connects all the parts of the design and creates the premise for the design team to function well.
  • 7. Strategic Design Patterns – Bounded Context A Bounded Context is an explicit boundary within which a domain model exists. Valuation Context Identity and Access Context User Role Portfolio Manager Broker Appraiser Portfolio Property Workflow Investor Report Modeling Permissions
  • 8. Strategic Design Patterns – Bounded Context Inside the boundary all terms and phrases of the Ubiquitous Language have specific meaning. In Valuation Context, Domain Experts don't describe the people who does the valuation as Users with Permissions. They talk about these people in terms of the roles they play in the Valution context, like, Fund/Portfolio Manager, Appraiser, Broker. On the other hand, it's in an Identity and Access Context that we talk about Users. In this context, User objects have usernames, and detailed information about the individual person. We do not create an Appraiser object out of thin air. Every Appraiser must be prequalified. We confirm the existence of a User playing the appraiser Role within Identitiy and Access context. The attributes of an authentication descriptor are passed with requests to the Identity and Access context. To create a new Appraiser object in Valution context, a subset of User attributes and a Role are used.
  • 9. Strategic Design Patterns – Bounded Context Domain Valuation Context Valuation Management (Core) Collaboration Context Guest Collaboration (Supporting) Identity and Access Context Identity and Access (Generic)
  • 10. Strategic Design Patterns – Context Maps Domain Valuation Context Collaboration Context Identity and Access Context Identity and Access (Generic) Context Maps show the relationships among Bounded Context. ACL ACL OHS/PL OHS/PL U U D U D ACL U = Upstream D = Downstream ACL = Anti-Corruption Layer OHS = Open Host Service PL = Published Language
  • 11. Tactical Design Patterns <<entity>> Organization <<domain event>> OrgProvisionedEvent <<domain event>> OrgUpdatedEvent Delivery & CS Context <<value object>> ContactInformation <<aggregate root>> User <<entity>> Person Identity and Access Context <<entity>> Role <<entity>> ServiceContract <<value object>> ContractDuration <<domain event>> UserProvisionedEvent <<domain event>> UserDeactivatedEvent
  • 12. Tactical Design Patterns An Entity is a unique thing and is capable of being changed continuously over a period. Changes can be so extensive that the object might seem much different from what it once was. Yet it is the same object by identity (Unique Identity). Value Objects are a vital building block of DDD. Examples of objects that are commonly modeled as Value Objects are numbers (3, 10, 294.34); text strings; dates; times; currencies; postal addresses; phone numbers. Benefits of using Value Objects – easy to create, test, use, optimise, and maintain. An Aggregate is composed of either a single entity or a cluster of Entities and Value Objects that must remain transactionally consistent throughout the Aggregate's lifetime. An instance of an Aggregate is persisted using its Repository and later searched for within and retrived from it. Use stateless Services inside the domain model to perform business operations that don't fit naturally as an operation on an Entity or a Value Object. Use Domain Events to indicate the occurance of significant happening in the domain.