SlideShare uma empresa Scribd logo
1 de 13
Domain Driven Design
Prajeesh Prathap
TechnicalArchitect - www.prowareness.nl
Term?
 Approach to software development for complex needs by
connecting the implementation to an evolving model
Core concepts
 Domain
 Model
 Ubiquitous language
 Bounded context
Building blocks
 Entity
 Value object
 Aggregate
 Aggregate root
 Service
 Repository
 Unit of work
 Factory
Entities vs.
Value objects
 Entity is not defined by its attributes, but rather by a thread of
continuity and its identity.
 Value object contains attributes but has no conceptual identity.
They should be treated as immutable.
Aggregate
root
 An aggregate root is an entity that composes other entities (as
well as its own values) by composition. If an entity has a reference
to another entity, then the referenced entity must either be within
the same aggregate, or be the root of some other aggregate.
 An aggregate root is responsible for ensuring that the aggregated
entities are always in a valid state.
Creating
domain
objects
 Objects that describe the system
 Should be clean, well organised and testable
 Technology that must fit the domain objects, not vice versa.
 Void of persistence related code making them technology
agnostic or persistence ignorant.
 Should be plain old objects and void of any technology related
attributes.
Repository
 A repository is an abstraction over the persistence store, returning
entities – or more precisely aggregate roots – meeting some
criteria.
Unit of work
 Maintains a list of objects affected by a business transaction and
coordinates the writing out of changes and the resolution of
concurrency problems.
Services
 Infrastructure services
 Cross-cutting services that you put into the Infrastructure layer:
logging, emailing, caching etc.
 Domain services
 Holds a behaviour that does not belong to any other entity or value-
object in the domain
 Application services
 Interface used by the outside world to use the domain
Factories
 Contains methods for creating domain objects so that alternative
implementations may be easily interchanged.
Other patterns
 Specification
 Role objects
Thank you

Mais conteúdo relacionado

Semelhante a Domain driven design

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
 
2.business object repository
2.business object repository2.business object repository
2.business object repository
Ajay Kumar ☁
 

Semelhante a Domain driven design (20)

Domain driven design
Domain driven designDomain driven design
Domain driven design
 
Domain Driven Design for Angular
Domain Driven Design for AngularDomain Driven Design for Angular
Domain Driven Design for Angular
 
Entity Framework 4
Entity Framework 4Entity Framework 4
Entity Framework 4
 
Adaptive Architecture
Adaptive ArchitectureAdaptive Architecture
Adaptive Architecture
 
Design Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityDesign Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur University
 
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
 
soa1.ppt
soa1.pptsoa1.ppt
soa1.ppt
 
DDD
DDDDDD
DDD
 
Hibernate
HibernateHibernate
Hibernate
 
Architecting and Designing Enterprise Applications
Architecting and Designing Enterprise ApplicationsArchitecting and Designing Enterprise Applications
Architecting and Designing Enterprise Applications
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
ap assignmnet presentation.pptx
ap assignmnet presentation.pptxap assignmnet presentation.pptx
ap assignmnet presentation.pptx
 
Se
SeSe
Se
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) Presentation
 
Unit i
Unit iUnit i
Unit i
 
2.business object repository
2.business object repository2.business object repository
2.business object repository
 
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"
 
Middleware Technologies
Middleware Technologies Middleware Technologies
Middleware Technologies
 
Gof design pattern
Gof design patternGof design pattern
Gof design pattern
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
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
 

Último (20)

Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
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 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

Domain driven design

  • 1. Domain Driven Design Prajeesh Prathap TechnicalArchitect - www.prowareness.nl
  • 2. Term?  Approach to software development for complex needs by connecting the implementation to an evolving model
  • 3. Core concepts  Domain  Model  Ubiquitous language  Bounded context
  • 4. Building blocks  Entity  Value object  Aggregate  Aggregate root  Service  Repository  Unit of work  Factory
  • 5. Entities vs. Value objects  Entity is not defined by its attributes, but rather by a thread of continuity and its identity.  Value object contains attributes but has no conceptual identity. They should be treated as immutable.
  • 6. Aggregate root  An aggregate root is an entity that composes other entities (as well as its own values) by composition. If an entity has a reference to another entity, then the referenced entity must either be within the same aggregate, or be the root of some other aggregate.  An aggregate root is responsible for ensuring that the aggregated entities are always in a valid state.
  • 7. Creating domain objects  Objects that describe the system  Should be clean, well organised and testable  Technology that must fit the domain objects, not vice versa.  Void of persistence related code making them technology agnostic or persistence ignorant.  Should be plain old objects and void of any technology related attributes.
  • 8. Repository  A repository is an abstraction over the persistence store, returning entities – or more precisely aggregate roots – meeting some criteria.
  • 9. Unit of work  Maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems.
  • 10. Services  Infrastructure services  Cross-cutting services that you put into the Infrastructure layer: logging, emailing, caching etc.  Domain services  Holds a behaviour that does not belong to any other entity or value- object in the domain  Application services  Interface used by the outside world to use the domain
  • 11. Factories  Contains methods for creating domain objects so that alternative implementations may be easily interchanged.