SlideShare a Scribd company logo

Applying Domain-Driven Design to craft Rich Domain Models

Alexander van Trijffel
Alexander van Trijffel
Alexander van TrijffelFreelance Solution Architect/Developer at Deloitte

The domain model is an abstraction of the problem domain that your system supports. It contains the objects and operations that are crucial to your system and its users. Therefore the design of the domain model deserves the utmost care and attention. In this session you will be introduced to Domain-Driven Design and you will learn how to put Domain-Driven Design (DDD) into practice. We will explore how to apply DDD on tactical level to design a rich domain model that encapsulates behaviour, protects its invariants and can be tested in isolation from its runtime environment

Applying Domain-Driven Design to craft Rich Domain Models

1 of 34
Download to read offline
Applying

Domain-Driven Design to craft

Rich Domain Models
Alexander van Trijffel Templates
Powerpoint
6-2-2014
Agenda
•
•
•
•
•
•

What is a domain model?
Hexagonal Architecture
Ubiquitous Language
When to use Domain-Driven Design?
Adding behavior to the domain model
Value objects
The domain model
Represents business objects, operations and events that reflect the
business processes and are meaningful to the business representatives.

Business rules
‘An Asset Value Correlation multiplier must be applied for exposures with to
Financial Sector Entities with assets of at least $100 bn’
‘In case no Country of Risk is registered in UCI, the C-rating should be ‘No Rating’

Behavior
‘When an assessment is activated, a Global Facility Id is requested from UFI and
assigned to the assessment’
‘When an employee states that he has outside interests, the system accepts stock positions
under certain conditions’
Invariants
‘A confirmed assessment has been calculated’
‘An activated assessment has a GFID’

‘A counterparty has an Wwid’
‘A protection covers at least one debtor’
Hexagonal Architecture
The blue book

Recommended

Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven DesignAndriy Buday
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introductionwojtek_s
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationOğuzhan Soykan
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignRyan Riley
 
Domain Driven Design: Zero to Hero
Domain Driven Design: Zero to HeroDomain Driven Design: Zero to Hero
Domain Driven Design: Zero to HeroFabrício Rissetto
 

More Related Content

What's hot

Domain Driven Design Quickly
Domain Driven Design QuicklyDomain Driven Design Quickly
Domain Driven Design QuicklyMariam Hakobyan
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignNader Albert
 
Baby steps to Domain-Driven Design
Baby steps to Domain-Driven DesignBaby steps to Domain-Driven Design
Baby steps to Domain-Driven DesignŽilvinas Kuusas
 
Implementing DDD with C#
Implementing DDD with C#Implementing DDD with C#
Implementing DDD with C#Pascal Laurin
 
Refactoring for Domain Driven Design
Refactoring for Domain Driven DesignRefactoring for Domain Driven Design
Refactoring for Domain Driven DesignDavid Berliner
 
Domain Driven Design Demonstrated
Domain Driven Design Demonstrated Domain Driven Design Demonstrated
Domain Driven Design Demonstrated Alan Christensen
 
Domain driven design and model driven development
Domain driven design and model driven developmentDomain driven design and model driven development
Domain driven design and model driven developmentDmitry Geyzersky
 
Domain Driven Design - Strategic Patterns and Microservices
Domain Driven Design - Strategic Patterns and MicroservicesDomain Driven Design - Strategic Patterns and Microservices
Domain Driven Design - Strategic Patterns and MicroservicesRadosław Maziarka
 
Modelling a complex domain with Domain-Driven Design
Modelling a complex domain with Domain-Driven DesignModelling a complex domain with Domain-Driven Design
Modelling a complex domain with Domain-Driven DesignNaeem Sarfraz
 
Introducing Domain Driven Design - codemash
Introducing Domain Driven Design - codemashIntroducing Domain Driven Design - codemash
Introducing Domain Driven Design - codemashSteven Smith
 
Domain Driven Design and Hexagonal Architecture
Domain Driven Design and Hexagonal ArchitectureDomain Driven Design and Hexagonal Architecture
Domain Driven Design and Hexagonal ArchitectureCrishantha Nanayakkara
 
Domain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) DistilledDomain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) DistilledNicola Costantino
 
Domain Driven Design (DDD)
Domain Driven Design (DDD)Domain Driven Design (DDD)
Domain Driven Design (DDD)Tom Kocjan
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignYoung-Ho Cho
 
Introduction to Domain Driven Design
Introduction to Domain Driven DesignIntroduction to Domain Driven Design
Introduction to Domain Driven DesignChristos Tsakostas
 
How to Implement Domain Driven Design in Real Life SDLC
How to Implement Domain Driven Design  in Real Life SDLCHow to Implement Domain Driven Design  in Real Life SDLC
How to Implement Domain Driven Design in Real Life SDLCAbdul Karim
 

What's hot (20)

Domain Driven Design Quickly
Domain Driven Design QuicklyDomain Driven Design Quickly
Domain Driven Design Quickly
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Baby steps to Domain-Driven Design
Baby steps to Domain-Driven DesignBaby steps to Domain-Driven Design
Baby steps to Domain-Driven Design
 
Introduction to DDD
Introduction to DDDIntroduction to DDD
Introduction to DDD
 
Implementing DDD with C#
Implementing DDD with C#Implementing DDD with C#
Implementing DDD with C#
 
Refactoring for Domain Driven Design
Refactoring for Domain Driven DesignRefactoring for Domain Driven Design
Refactoring for Domain Driven Design
 
Domain Driven Design Demonstrated
Domain Driven Design Demonstrated Domain Driven Design Demonstrated
Domain Driven Design Demonstrated
 
Domain driven design and model driven development
Domain driven design and model driven developmentDomain driven design and model driven development
Domain driven design and model driven development
 
Domain Driven Design - Strategic Patterns and Microservices
Domain Driven Design - Strategic Patterns and MicroservicesDomain Driven Design - Strategic Patterns and Microservices
Domain Driven Design - Strategic Patterns and Microservices
 
Modelling a complex domain with Domain-Driven Design
Modelling a complex domain with Domain-Driven DesignModelling a complex domain with Domain-Driven Design
Modelling a complex domain with Domain-Driven Design
 
Introducing Domain Driven Design - codemash
Introducing Domain Driven Design - codemashIntroducing Domain Driven Design - codemash
Introducing Domain Driven Design - codemash
 
Domain Driven Design and Hexagonal Architecture
Domain Driven Design and Hexagonal ArchitectureDomain Driven Design and Hexagonal Architecture
Domain Driven Design and Hexagonal Architecture
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) DistilledDomain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) Distilled
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design (DDD)
Domain Driven Design (DDD)Domain Driven Design (DDD)
Domain Driven Design (DDD)
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Introduction to Domain Driven Design
Introduction to Domain Driven DesignIntroduction to Domain Driven Design
Introduction to Domain Driven Design
 
How to Implement Domain Driven Design in Real Life SDLC
How to Implement Domain Driven Design  in Real Life SDLCHow to Implement Domain Driven Design  in Real Life SDLC
How to Implement Domain Driven Design in Real Life SDLC
 

Viewers also liked

Building Rich Domain Models
Building Rich Domain ModelsBuilding Rich Domain Models
Building Rich Domain ModelsChris Richardson
 
Agile Modeling In Color (Agile China 2009)
Agile Modeling In Color (Agile China 2009)Agile Modeling In Color (Agile China 2009)
Agile Modeling In Color (Agile China 2009)Vernon Stinebaker
 
re:Invent 2012 Optimizing Cassandra
re:Invent 2012 Optimizing Cassandrare:Invent 2012 Optimizing Cassandra
re:Invent 2012 Optimizing CassandraRuslan Meshenberg
 
Improving application design with a rich domain model (springone 2007)
Improving application design with a rich domain model (springone 2007)Improving application design with a rich domain model (springone 2007)
Improving application design with a rich domain model (springone 2007)Chris Richardson
 
A pattern language for microservices (#gluecon #gluecon2016)
A pattern language for microservices (#gluecon #gluecon2016)A pattern language for microservices (#gluecon #gluecon2016)
A pattern language for microservices (#gluecon #gluecon2016)Chris Richardson
 
Microservices pattern language (microxchg microxchg2016)
Microservices pattern language (microxchg microxchg2016)Microservices pattern language (microxchg microxchg2016)
Microservices pattern language (microxchg microxchg2016)Chris Richardson
 
Microservices + Events + Docker = A Perfect Trio (dockercon)
Microservices + Events + Docker = A Perfect Trio (dockercon)Microservices + Events + Docker = A Perfect Trio (dockercon)
Microservices + Events + Docker = A Perfect Trio (dockercon)Chris Richardson
 
Developing microservices with aggregates (SpringOne platform, #s1p)
Developing microservices with aggregates (SpringOne platform, #s1p)Developing microservices with aggregates (SpringOne platform, #s1p)
Developing microservices with aggregates (SpringOne platform, #s1p)Chris Richardson
 
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...Chris Richardson
 
Developing microservices with aggregates (devnexus2017)
Developing microservices with aggregates (devnexus2017)Developing microservices with aggregates (devnexus2017)
Developing microservices with aggregates (devnexus2017)Chris Richardson
 

Viewers also liked (10)

Building Rich Domain Models
Building Rich Domain ModelsBuilding Rich Domain Models
Building Rich Domain Models
 
Agile Modeling In Color (Agile China 2009)
Agile Modeling In Color (Agile China 2009)Agile Modeling In Color (Agile China 2009)
Agile Modeling In Color (Agile China 2009)
 
re:Invent 2012 Optimizing Cassandra
re:Invent 2012 Optimizing Cassandrare:Invent 2012 Optimizing Cassandra
re:Invent 2012 Optimizing Cassandra
 
Improving application design with a rich domain model (springone 2007)
Improving application design with a rich domain model (springone 2007)Improving application design with a rich domain model (springone 2007)
Improving application design with a rich domain model (springone 2007)
 
A pattern language for microservices (#gluecon #gluecon2016)
A pattern language for microservices (#gluecon #gluecon2016)A pattern language for microservices (#gluecon #gluecon2016)
A pattern language for microservices (#gluecon #gluecon2016)
 
Microservices pattern language (microxchg microxchg2016)
Microservices pattern language (microxchg microxchg2016)Microservices pattern language (microxchg microxchg2016)
Microservices pattern language (microxchg microxchg2016)
 
Microservices + Events + Docker = A Perfect Trio (dockercon)
Microservices + Events + Docker = A Perfect Trio (dockercon)Microservices + Events + Docker = A Perfect Trio (dockercon)
Microservices + Events + Docker = A Perfect Trio (dockercon)
 
Developing microservices with aggregates (SpringOne platform, #s1p)
Developing microservices with aggregates (SpringOne platform, #s1p)Developing microservices with aggregates (SpringOne platform, #s1p)
Developing microservices with aggregates (SpringOne platform, #s1p)
 
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
 
Developing microservices with aggregates (devnexus2017)
Developing microservices with aggregates (devnexus2017)Developing microservices with aggregates (devnexus2017)
Developing microservices with aggregates (devnexus2017)
 

Similar to Applying Domain-Driven Design to craft Rich Domain Models

Domain driven design: a gentle introduction
Domain driven design:  a gentle introductionDomain driven design:  a gentle introduction
Domain driven design: a gentle introductionAsher Sterkin
 
Allan Cook (Deloitte Consulting): How Do I Sell a “First” VR/AR Project to My...
Allan Cook (Deloitte Consulting): How Do I Sell a “First” VR/AR Project to My...Allan Cook (Deloitte Consulting): How Do I Sell a “First” VR/AR Project to My...
Allan Cook (Deloitte Consulting): How Do I Sell a “First” VR/AR Project to My...AugmentedWorldExpo
 
Webinar: 5 Clear Steps to Get Your Nonprofit Cloud Ready - 2018-5-31
Webinar: 5 Clear Steps to Get Your Nonprofit Cloud Ready - 2018-5-31Webinar: 5 Clear Steps to Get Your Nonprofit Cloud Ready - 2018-5-31
Webinar: 5 Clear Steps to Get Your Nonprofit Cloud Ready - 2018-5-31TechSoup
 
Insurance - Open Source Analytics Dashboards for Real Time Business Overview
Insurance - Open Source Analytics Dashboards for Real Time Business OverviewInsurance - Open Source Analytics Dashboards for Real Time Business Overview
Insurance - Open Source Analytics Dashboards for Real Time Business OverviewEuro IT Group
 
Code & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven DesignCode & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven DesignFrank Levering
 
An Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHPAn Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHPChris Renner
 
SPSChicagoBurbs 2019 - What is CDM and CDS?
SPSChicagoBurbs 2019 - What is CDM and CDS?SPSChicagoBurbs 2019 - What is CDM and CDS?
SPSChicagoBurbs 2019 - What is CDM and CDS?Nicolas Georgeault
 
SPS Vancouver 2018 - What is CDM and CDS
SPS Vancouver 2018 - What is CDM and CDSSPS Vancouver 2018 - What is CDM and CDS
SPS Vancouver 2018 - What is CDM and CDSNicolas Georgeault
 
Hybrid Cloud A Journey to the Cloud by Peter Hellemans
Hybrid Cloud A Journey to the Cloud by Peter HellemansHybrid Cloud A Journey to the Cloud by Peter Hellemans
Hybrid Cloud A Journey to the Cloud by Peter HellemansNRB
 
Schibsted Spain - Day 1 - DDD Course
Schibsted Spain - Day 1 - DDD CourseSchibsted Spain - Day 1 - DDD Course
Schibsted Spain - Day 1 - DDD CourseKevin Mas Ruiz
 
Arch CoP - Domain Driven Design.pptx
Arch CoP - Domain Driven Design.pptxArch CoP - Domain Driven Design.pptx
Arch CoP - Domain Driven Design.pptxSanjoy Kumar Roy
 
A Case for Outside-In Design
A Case for Outside-In DesignA Case for Outside-In Design
A Case for Outside-In DesignSandro Mancuso
 
Dezyne Technologies Corporate Profile 2016 v1.2
Dezyne Technologies Corporate Profile 2016 v1.2Dezyne Technologies Corporate Profile 2016 v1.2
Dezyne Technologies Corporate Profile 2016 v1.2Dheeraj Kaushik
 

Similar to Applying Domain-Driven Design to craft Rich Domain Models (20)

Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain driven design: a gentle introduction
Domain driven design:  a gentle introductionDomain driven design:  a gentle introduction
Domain driven design: a gentle introduction
 
Allan Cook (Deloitte Consulting): How Do I Sell a “First” VR/AR Project to My...
Allan Cook (Deloitte Consulting): How Do I Sell a “First” VR/AR Project to My...Allan Cook (Deloitte Consulting): How Do I Sell a “First” VR/AR Project to My...
Allan Cook (Deloitte Consulting): How Do I Sell a “First” VR/AR Project to My...
 
Azr infotech services
Azr infotech servicesAzr infotech services
Azr infotech services
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Webinar: 5 Clear Steps to Get Your Nonprofit Cloud Ready - 2018-5-31
Webinar: 5 Clear Steps to Get Your Nonprofit Cloud Ready - 2018-5-31Webinar: 5 Clear Steps to Get Your Nonprofit Cloud Ready - 2018-5-31
Webinar: 5 Clear Steps to Get Your Nonprofit Cloud Ready - 2018-5-31
 
Insurance - Open Source Analytics Dashboards for Real Time Business Overview
Insurance - Open Source Analytics Dashboards for Real Time Business OverviewInsurance - Open Source Analytics Dashboards for Real Time Business Overview
Insurance - Open Source Analytics Dashboards for Real Time Business Overview
 
DOMAIN DRIVER DESIGN
DOMAIN DRIVER DESIGNDOMAIN DRIVER DESIGN
DOMAIN DRIVER DESIGN
 
Code & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven DesignCode & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven Design
 
Domain Driven Design
Domain Driven Design Domain Driven Design
Domain Driven Design
 
An Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHPAn Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHP
 
SPSChicagoBurbs 2019 - What is CDM and CDS?
SPSChicagoBurbs 2019 - What is CDM and CDS?SPSChicagoBurbs 2019 - What is CDM and CDS?
SPSChicagoBurbs 2019 - What is CDM and CDS?
 
SPS Vancouver 2018 - What is CDM and CDS
SPS Vancouver 2018 - What is CDM and CDSSPS Vancouver 2018 - What is CDM and CDS
SPS Vancouver 2018 - What is CDM and CDS
 
Sambasiva Suresh Kumar (1)
Sambasiva Suresh Kumar (1)Sambasiva Suresh Kumar (1)
Sambasiva Suresh Kumar (1)
 
Hybrid Cloud A Journey to the Cloud by Peter Hellemans
Hybrid Cloud A Journey to the Cloud by Peter HellemansHybrid Cloud A Journey to the Cloud by Peter Hellemans
Hybrid Cloud A Journey to the Cloud by Peter Hellemans
 
Schibsted Spain - Day 1 - DDD Course
Schibsted Spain - Day 1 - DDD CourseSchibsted Spain - Day 1 - DDD Course
Schibsted Spain - Day 1 - DDD Course
 
Big Data Analyst at BankofAmerica
Big Data Analyst at BankofAmericaBig Data Analyst at BankofAmerica
Big Data Analyst at BankofAmerica
 
Arch CoP - Domain Driven Design.pptx
Arch CoP - Domain Driven Design.pptxArch CoP - Domain Driven Design.pptx
Arch CoP - Domain Driven Design.pptx
 
A Case for Outside-In Design
A Case for Outside-In DesignA Case for Outside-In Design
A Case for Outside-In Design
 
Dezyne Technologies Corporate Profile 2016 v1.2
Dezyne Technologies Corporate Profile 2016 v1.2Dezyne Technologies Corporate Profile 2016 v1.2
Dezyne Technologies Corporate Profile 2016 v1.2
 

Recently uploaded

"Journey of Aspiration: Unveiling the Path to Becoming a Technocrat and Entre...
"Journey of Aspiration: Unveiling the Path to Becoming a Technocrat and Entre..."Journey of Aspiration: Unveiling the Path to Becoming a Technocrat and Entre...
"Journey of Aspiration: Unveiling the Path to Becoming a Technocrat and Entre...shaiyuvasv
 
Introduction to Serverless with AWS Lambda in C#.pptx
Introduction to Serverless with AWS Lambda in C#.pptxIntroduction to Serverless with AWS Lambda in C#.pptx
Introduction to Serverless with AWS Lambda in C#.pptxBrandon Minnick, MBA
 
Tete thermostatique Zigbee MOES BRT-100 V2.pdf
Tete thermostatique Zigbee MOES BRT-100 V2.pdfTete thermostatique Zigbee MOES BRT-100 V2.pdf
Tete thermostatique Zigbee MOES BRT-100 V2.pdfDomotica daVinci
 
Artificial-Intelligence-in-Marketing-Data.pdf
Artificial-Intelligence-in-Marketing-Data.pdfArtificial-Intelligence-in-Marketing-Data.pdf
Artificial-Intelligence-in-Marketing-Data.pdfIsidro Navarro
 
Bringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptxBringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptxMaarten Balliauw
 
Q1 Memory Fabric Forum: Advantages of Optical CXL​ for Disaggregated Compute ...
Q1 Memory Fabric Forum: Advantages of Optical CXL​ for Disaggregated Compute ...Q1 Memory Fabric Forum: Advantages of Optical CXL​ for Disaggregated Compute ...
Q1 Memory Fabric Forum: Advantages of Optical CXL​ for Disaggregated Compute ...Memory Fabric Forum
 
Bit N Build Poland
Bit N Build PolandBit N Build Poland
Bit N Build PolandGDSC PJATK
 
H3 Platform CXL Solution_Memory Fabric Forum.pptx
H3 Platform CXL Solution_Memory Fabric Forum.pptxH3 Platform CXL Solution_Memory Fabric Forum.pptx
H3 Platform CXL Solution_Memory Fabric Forum.pptxMemory Fabric Forum
 
2024 February Patch Tuesday
2024 February Patch Tuesday2024 February Patch Tuesday
2024 February Patch TuesdayIvanti
 
Power of 2024 - WITforce Odyssey.pptx.pdf
Power of 2024 - WITforce Odyssey.pptx.pdfPower of 2024 - WITforce Odyssey.pptx.pdf
Power of 2024 - WITforce Odyssey.pptx.pdfkatalinjordans1
 
Evolution of Chatbots: From Custom AI Chatbots and AI Chatbots for Websites.pptx
Evolution of Chatbots: From Custom AI Chatbots and AI Chatbots for Websites.pptxEvolution of Chatbots: From Custom AI Chatbots and AI Chatbots for Websites.pptx
Evolution of Chatbots: From Custom AI Chatbots and AI Chatbots for Websites.pptxKyle Willson
 
Curtain Module Manual Zigbee Neo CS01-1C.pdf
Curtain Module Manual Zigbee Neo CS01-1C.pdfCurtain Module Manual Zigbee Neo CS01-1C.pdf
Curtain Module Manual Zigbee Neo CS01-1C.pdfDomotica daVinci
 
zigbee motion sensor user manual NAS-PD07B2.pdf
zigbee motion sensor user manual NAS-PD07B2.pdfzigbee motion sensor user manual NAS-PD07B2.pdf
zigbee motion sensor user manual NAS-PD07B2.pdfDomotica daVinci
 
Put a flag on it. A busy developer's guide to feature toggles.
Put a flag on it. A busy developer's guide to feature toggles.Put a flag on it. A busy developer's guide to feature toggles.
Put a flag on it. A busy developer's guide to feature toggles.Mateusz Kwasniewski
 
Importance of magazines in education ppt
Importance of magazines in education pptImportance of magazines in education ppt
Importance of magazines in education pptsafnarafeek2002
 
Automate Your Master Data Processes for Shared Service Center Excellence
Automate Your Master Data Processes for Shared Service Center ExcellenceAutomate Your Master Data Processes for Shared Service Center Excellence
Automate Your Master Data Processes for Shared Service Center ExcellencePrecisely
 
Q1 Memory Fabric Forum: XConn CXL Switches for AI
Q1 Memory Fabric Forum: XConn CXL Switches for AIQ1 Memory Fabric Forum: XConn CXL Switches for AI
Q1 Memory Fabric Forum: XConn CXL Switches for AIMemory Fabric Forum
 
Navigating the Never Normal Strategies for Portfolio Leaders
Navigating the Never Normal Strategies for Portfolio LeadersNavigating the Never Normal Strategies for Portfolio Leaders
Navigating the Never Normal Strategies for Portfolio LeadersOnePlan Solutions
 
Early Tech Adoption: Foolish or Pragmatic? - 17th ISACA South Florida WOW Con...
Early Tech Adoption: Foolish or Pragmatic? - 17th ISACA South Florida WOW Con...Early Tech Adoption: Foolish or Pragmatic? - 17th ISACA South Florida WOW Con...
Early Tech Adoption: Foolish or Pragmatic? - 17th ISACA South Florida WOW Con...Adrian Sanabria
 

Recently uploaded (20)

"Journey of Aspiration: Unveiling the Path to Becoming a Technocrat and Entre...
"Journey of Aspiration: Unveiling the Path to Becoming a Technocrat and Entre..."Journey of Aspiration: Unveiling the Path to Becoming a Technocrat and Entre...
"Journey of Aspiration: Unveiling the Path to Becoming a Technocrat and Entre...
 
Introduction to Serverless with AWS Lambda in C#.pptx
Introduction to Serverless with AWS Lambda in C#.pptxIntroduction to Serverless with AWS Lambda in C#.pptx
Introduction to Serverless with AWS Lambda in C#.pptx
 
Tete thermostatique Zigbee MOES BRT-100 V2.pdf
Tete thermostatique Zigbee MOES BRT-100 V2.pdfTete thermostatique Zigbee MOES BRT-100 V2.pdf
Tete thermostatique Zigbee MOES BRT-100 V2.pdf
 
Artificial-Intelligence-in-Marketing-Data.pdf
Artificial-Intelligence-in-Marketing-Data.pdfArtificial-Intelligence-in-Marketing-Data.pdf
Artificial-Intelligence-in-Marketing-Data.pdf
 
COE AI Lab Universities
COE AI Lab UniversitiesCOE AI Lab Universities
COE AI Lab Universities
 
Bringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptxBringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptx
 
Q1 Memory Fabric Forum: Advantages of Optical CXL​ for Disaggregated Compute ...
Q1 Memory Fabric Forum: Advantages of Optical CXL​ for Disaggregated Compute ...Q1 Memory Fabric Forum: Advantages of Optical CXL​ for Disaggregated Compute ...
Q1 Memory Fabric Forum: Advantages of Optical CXL​ for Disaggregated Compute ...
 
Bit N Build Poland
Bit N Build PolandBit N Build Poland
Bit N Build Poland
 
H3 Platform CXL Solution_Memory Fabric Forum.pptx
H3 Platform CXL Solution_Memory Fabric Forum.pptxH3 Platform CXL Solution_Memory Fabric Forum.pptx
H3 Platform CXL Solution_Memory Fabric Forum.pptx
 
2024 February Patch Tuesday
2024 February Patch Tuesday2024 February Patch Tuesday
2024 February Patch Tuesday
 
Power of 2024 - WITforce Odyssey.pptx.pdf
Power of 2024 - WITforce Odyssey.pptx.pdfPower of 2024 - WITforce Odyssey.pptx.pdf
Power of 2024 - WITforce Odyssey.pptx.pdf
 
Evolution of Chatbots: From Custom AI Chatbots and AI Chatbots for Websites.pptx
Evolution of Chatbots: From Custom AI Chatbots and AI Chatbots for Websites.pptxEvolution of Chatbots: From Custom AI Chatbots and AI Chatbots for Websites.pptx
Evolution of Chatbots: From Custom AI Chatbots and AI Chatbots for Websites.pptx
 
Curtain Module Manual Zigbee Neo CS01-1C.pdf
Curtain Module Manual Zigbee Neo CS01-1C.pdfCurtain Module Manual Zigbee Neo CS01-1C.pdf
Curtain Module Manual Zigbee Neo CS01-1C.pdf
 
zigbee motion sensor user manual NAS-PD07B2.pdf
zigbee motion sensor user manual NAS-PD07B2.pdfzigbee motion sensor user manual NAS-PD07B2.pdf
zigbee motion sensor user manual NAS-PD07B2.pdf
 
Put a flag on it. A busy developer's guide to feature toggles.
Put a flag on it. A busy developer's guide to feature toggles.Put a flag on it. A busy developer's guide to feature toggles.
Put a flag on it. A busy developer's guide to feature toggles.
 
Importance of magazines in education ppt
Importance of magazines in education pptImportance of magazines in education ppt
Importance of magazines in education ppt
 
Automate Your Master Data Processes for Shared Service Center Excellence
Automate Your Master Data Processes for Shared Service Center ExcellenceAutomate Your Master Data Processes for Shared Service Center Excellence
Automate Your Master Data Processes for Shared Service Center Excellence
 
Q1 Memory Fabric Forum: XConn CXL Switches for AI
Q1 Memory Fabric Forum: XConn CXL Switches for AIQ1 Memory Fabric Forum: XConn CXL Switches for AI
Q1 Memory Fabric Forum: XConn CXL Switches for AI
 
Navigating the Never Normal Strategies for Portfolio Leaders
Navigating the Never Normal Strategies for Portfolio LeadersNavigating the Never Normal Strategies for Portfolio Leaders
Navigating the Never Normal Strategies for Portfolio Leaders
 
Early Tech Adoption: Foolish or Pragmatic? - 17th ISACA South Florida WOW Con...
Early Tech Adoption: Foolish or Pragmatic? - 17th ISACA South Florida WOW Con...Early Tech Adoption: Foolish or Pragmatic? - 17th ISACA South Florida WOW Con...
Early Tech Adoption: Foolish or Pragmatic? - 17th ISACA South Florida WOW Con...
 

Applying Domain-Driven Design to craft Rich Domain Models

  • 1. Applying Domain-Driven Design to craft Rich Domain Models Alexander van Trijffel Templates Powerpoint 6-2-2014
  • 2. Agenda • • • • • • What is a domain model? Hexagonal Architecture Ubiquitous Language When to use Domain-Driven Design? Adding behavior to the domain model Value objects
  • 3. The domain model Represents business objects, operations and events that reflect the business processes and are meaningful to the business representatives. Business rules ‘An Asset Value Correlation multiplier must be applied for exposures with to Financial Sector Entities with assets of at least $100 bn’ ‘In case no Country of Risk is registered in UCI, the C-rating should be ‘No Rating’ Behavior ‘When an assessment is activated, a Global Facility Id is requested from UFI and assigned to the assessment’ ‘When an employee states that he has outside interests, the system accepts stock positions under certain conditions’
  • 4. Invariants ‘A confirmed assessment has been calculated’ ‘An activated assessment has a GFID’ ‘A counterparty has an Wwid’ ‘A protection covers at least one debtor’
  • 8. Second Page : "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." Do we speak the same language?
  • 12. And our managers/services/* know all about the logic… * enter your favorite name for the application service role here
  • 13. We have a separate business layer
  • 15. When to invest in developing an ubiquitous language and implementing a Rich Domain Model? System type Domain logic Complexity Use cases DDD pays off? CRUD, Master data, Lookup Low Any No Simple, Small, Utility Low < 30 No Departmental, Narrow scoped Medium between 30 and 40 Could be Innovative Unknown ? Yes Enterprise System, Core system High > 40 Yes
  • 16. Object Oriented Software: • Encapsulates data and operations in objects that interact with each other via the object’s interface. • Applies information hiding; Internal representation of objects is hidden to clients Object oriented means that an object manages its state and guarantees that it is in a legal state at any time.
  • 17. By applying Object Orientation to the domain model, the model: • can ensure that its state is correct at all times • can hide complexity behind its public interface
  • 20. What if we have business rules on the client Status as well? Things get messy quickly…
  • 21. Empowering the domain: Encapsulating data and operations in domain objects
  • 22. Encapsulating domain logic in value objects
  • 23. Value object – immutable and comparable by its attributes
  • 24. Model object as Entity or Value Object? Entity Value object Unique Can have many occurences Distinguished by identity Distinguished by attributes Can be changed Immutable
  • 25. Money: Entity or value object?
  • 26. Value objects examples Percentage Probability of Default Loss Given Default World Wide Id Global Facility Id Rating Address Country Decision Period Status
  • 27. Other tactical DDD patterns to explore: • Domain Services • Domain Events • Aggregates
  • 28. Summary Domain-Driven Design is a methodology that provides patterns for designing rich domains that encapsulate data and behavior. The investment in developing an ubiquitous language and implementing a rich domain model pays off for medium to large applications that implement business rules and processes. By applying Object Oriented principles to the domain, business logic is easier to test, understand and extend.
  • 30. Resources • Domain-Driven Design: Tackling Complexity in the Heart of Software (Eric Evans) • Implementing Domain-Driven Design Vaughn Vernon • DDD/CQRS mailing list https://groups.google.com/forum/#!forum/dddcqrs
  • 32. Empowering the domain: Constructing objects What does it mean to be a client in our domain? • Does a client without a wwid make sense? • Does our domain even support clients without ratings? Communicate the intent of a client through the API:
  • 33. Empowering the domain: Encapsulated collections Can the domain object guarantee that the Ratings collection is valid at all times? Does it make sense to clear all ratings? Duplicate a rating?
  • 34. Empowering the domain: Encapsulated collections We provide an explicit API to manipulate the collection.

Editor's Notes

  1. Rich Domain ModelsThe domain model is an abstraction of the problem domain that your system supports. It contains the objects and operations that are crucial to your system and its users. Therefore the design of the domain model deserves the utmost care and attention. In this session Alexander will demonstrate how to put Domain-Driven Design (DDD) in practice. We will explore how to apply DDD on tactical level to design a rich domain model that encapsulates behaviour, protects its invariants and can be tested in isolation from its runtime environment.
  2. An invariant is a logical assertion that is held to always be true during a certain phase of execution
  3. Alistair Cockburn, 2005Allow an application to equally be driven by users, programs, automated test or batch scripts, and to be developed and tested in isolation from its eventual run-time devices and databases.
  4. Released in 2003DDD is a methodology for designing domain models using an object oriented approach.
  5. Business talks about clients, ratings, regulatory reportingDevelopers talk about XSDs, inserting database records, repositories, factories.
  6. Do you business users talk about Assigning an WWID, Creating an WWID or adding a long id to the Client database?Capture the nouns and the verbs and have your domain model and code reflect the names used by the business to prevent translations
  7. An anemic model is a domain model that doesn&apos;t contain any logic. That is why the model is called anemic. It is just a container for data that can be changed and interpreted by clients. Therefore all logic is placed outside the domain models in an anemic model.An anemic model can never guarantee it&apos;s correctness at any time. An anemic model has no logic that ensures that it is in a legal state at any time.. The main problem with anemic models is that they are contradictory with fundamental object-oriented principles like: encapsulation, information hiding and bringing data and process (logic) together.Procedural programming is straight forward to write, but hard to understand if you want to understand the state handling of an application.In a behavior-rich, but anemic domain, the domain is surrounded by a multitude of services that do the actual work, and fiddle with state on our domain objects.  The domain objects contain state to be persisted, but it’s not the domain objects themselves exposing any operations
  8. Enterprise system that is vital to the business can also be bought as an off the shelf product
  9. Add methods to your domain objects for changing its internal state. If The method requires any data to implement the business rules that does not relate to the domain object, give the method access to that data.  The less developers you exposure the intricacies of your domain, the easier it is to ensure that the business logic will be applied correctly. For all usage scenario’s =&gt; web services, user interfaces, etcKeep the application layer thin.This layer should only be concerned with coordination: Loading an entity from the database,send a message to it, persist changes. All business logic should not be apart of the application layer.Isolate complexity. Introduce modularity.
  10. Currency + amount + serial number
  11.