SlideShare ist ein Scribd-Unternehmen logo
1 von 34
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
DDD on strategic level
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?
Ubiquitous
language
DDD on tactical level
Aren’t we
doing DDD
already?

We have
entities…
And our managers/services/*
know all about the logic…

* enter your favorite name for the application service role here
We have a separate business layer
Hello Anemic Domain Model!
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
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.
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
Anemic Domain Model example
Applying business rules
What if we have business rules on the client Status as well?

Things get messy quickly…
Empowering the domain:
Encapsulating data and operations in domain objects
Encapsulating domain logic in value objects
Value object – immutable and comparable by its attributes
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
Money: Entity or value object?
Value objects examples

Percentage
Probability of Default
Loss Given Default
World Wide Id
Global Facility Id
Rating

Address
Country
Decision
Period
Status
Other tactical DDD patterns to explore:
• Domain Services
• Domain Events

• Aggregates
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.
Thanks for
your attention!
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
Backup slides
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:
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?
Empowering the domain:
Encapsulated collections

We provide an explicit API to manipulate the collection.

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) Presentation
 
Domain Driven Design (DDD)
Domain Driven Design (DDD)Domain Driven Design (DDD)
Domain Driven Design (DDD)
 
DDD Tactical Design with Clean Architecture - Ivan Paulovich
DDD Tactical Design with Clean Architecture - Ivan PaulovichDDD Tactical Design with Clean Architecture - Ivan Paulovich
DDD Tactical Design with Clean Architecture - Ivan Paulovich
 
Brownfield Domain Driven Design
Brownfield Domain Driven DesignBrownfield Domain Driven Design
Brownfield Domain Driven Design
 
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
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
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
 
Implementing DDD with C#
Implementing DDD with C#Implementing DDD with C#
Implementing DDD with C#
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introduction
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Introduction to DDD
Introduction to DDDIntroduction to DDD
Introduction to DDD
 
Domain Driven Design Demonstrated
Domain Driven Design Demonstrated Domain Driven Design Demonstrated
Domain Driven Design Demonstrated
 
Domain Driven Design
Domain Driven Design Domain Driven Design
Domain Driven Design
 
Enterprise Software Architecture styles
Enterprise Software Architecture stylesEnterprise Software Architecture styles
Enterprise Software Architecture styles
 
Domain-driven design - eine Einführung
Domain-driven design - eine EinführungDomain-driven design - eine Einführung
Domain-driven design - eine Einführung
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Clean architecture with ddd layering in php
Clean architecture with ddd layering in phpClean architecture with ddd layering in php
Clean architecture with ddd layering in php
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Introducing Clean Architecture
Introducing Clean ArchitectureIntroducing Clean Architecture
Introducing Clean Architecture
 

Andere mochten auch

Andere mochten auch (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)
 

Ähnlich wie Applying Domain-Driven Design to craft Rich Domain Models

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
Dheeraj Kaushik
 

Ähnlich wie 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
 
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
 
Sphere 3D presentation for Credit Suisse technology conference 2014
Sphere 3D presentation for Credit Suisse technology conference 2014Sphere 3D presentation for Credit Suisse technology conference 2014
Sphere 3D presentation for Credit Suisse technology conference 2014
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

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.

Hinweis der Redaktion

  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.