SlideShare a Scribd company logo
Domain Driven
Design
What it is and what it is not?
•   "Domain" not like in "part of the URL", but like in "area of business
    expertise"
•   Wikipedia: (http://en.wikipedia.org/wiki/Domain-driven_design)
    Domain-driven design (DDD) is an approach to developing software for
    complex needs by deeply connecting the implementation to an
    evolving model of the core business concepts. The premise of domain-
    driven design is the following:
     o Placing the project's primary focus on the core domain and domain
         logic
     o Basing complex designs on a model
     o Initiating a creative collaboration between technical and domain
         experts to iteratively cut ever closer to the conceptual heart of the
         problem.
     o Domain-driven design is not a technology or a methodology.
    DDD provides a structure of practices and terminology for making
    design decisions that focus and accelerate software projects dealing with
    complicated domains.
Core definitions
Domain: A sphere of knowledge (ontology), influence, or activity. The subject

•
  area to which the user applies a program is the domain of the software.
    Model: A system of abstractions that describes selected aspects of a

•
    domain and can be used to solve problems related to that domain.
    Ubiquitous Language: A language structured around the domain model
    and used by all team members to connect all the activities of the team

•
    with the software.
    Context: The setting in which a word or statement appears that
    determines its meaning.
Building blocks of the model
In DDD, there are artifacts to express, create, and retrieve domain models:
 •   Entity: An object that is not defined by its attributes, but rather by a thread of
     continuity and its identity.
 •   Value Object: An object that contains attributes but has no conceptual identity.
     They should be treated as immutable.
 •   Aggregate: A collection of objects that are bound together by a root
     entity, otherwise known as an aggregate root. The aggregate root guarantees the
     consistency of changes being made within the aggregate by forbidding external
     objects from holding references to its members.
 •   Service: When an operation does not conceptually belong to any object.
     Following the natural contours of the problem, you can implement these operations
     in services.
 •   Repository: methods for retrieving domain objects should delegate to a
     specialized Repository object such that alternative storage implementations may be
     easily interchanged.
 •   Factory: methods for creating domain objects should delegate to a specialized
     Factory object such that alternative implementations may be easily interchanged.
Ubiquitous language
meaning that the domain model should form a
 common language given by domain experts
 for describing system requirements, that
 works equally well for the business users
 or sponsors and for the software developers
Context
Multiple models are in play on any large project.
   Yet when code based on distinct models is combined, software becomes
   buggy, unreliable, and difficult to understand. Communication among team
   members becomes confused. It is often unclear in what context a model
   should not be applied.


•
Therefore:


•
    Explicitly define the context within which a model applies.
    Explicitly set boundaries in terms of team organization, usage within
    specific parts of the application, and physical manifestations such as code

•
    bases and database schemas.
    Keep the model strictly consistent within these bounds, but don’t be
    distracted or confused by issues outside.
The modeling process flow
•
•
    Model and document business processes first.
    Select a candidate business process and work with the business domain

•
    experts to document it using the Ubiquitous Language.
    Identify all the services that are required for the candidate business
    process. These services can be atomic (single step) or orchestrated (multi-
    step with or without work-flow) in nature. They can also be business (e.g.

•
    Underwriting or Funding) or infrastructure (e.g. E-mail or Job Scheduling).
    Identify and document the state and behavior of the objects used by
    services identified in the previous step.
Architecture
A typical enterprise application architecture consists of the following four

•
    conceptual layers:
    User Interface (Presentation Layer): Responsible for presenting

•
    information to the user and interpreting user commands.
    Application Layer: This layer coordinates the application activity. It
    doesn't contain any business logic. It does not hold the state of business

•
    objects, but it can hold the state of an application task's progress.
    Domain Layer: This layer contains information about the business
    domain. The state of business objects is held here. Persistence of the
    business objects and possibly their state is delegated to the infrastructure

•
    layer.
    Infrastructure Layer: This layer acts as a supporting library for all the
    other layers. It provides communication between layers, implements
    persistence for business objects, contains supporting libraries for the user
    interface layer, etc.
Application layer
•   is responsible for the navigation between the UI screens in the application

•
    as well as the interaction with the application layers of other systems.
    can also perform the basic (non-business related) validation on the user
    input data before transmitting it to the other (lower) layers of the

•
    application.


•
    doesn't contain any business or domain related logic or data access logic.
    doesn't have any state reflecting a business use case but it can manage
    the state of the user session or the progress of a task.
Domain layer
•   is responsible for the concepts of business domain, information about the
    business use case and the business rules. Domain objects encapsulate

•
    the state and behavior of business entities.
    can also manage the state (session) of a business use case if the use
    case spans multiple user requests (e.g. loan registration process which
    consists of multiple steps: user entering the loan details, system returning
    the products and rates based on the loan parameters, user selecting a
    specific product/rate combination, and finally the system locking the loan

•
    for that rate).
    contains service objects that only have a defined operational behavior
    which is not part of any domain object. Services encapsulate behavior of

•
    the business domain that doesn't fit in the domain objects themselves.
    is the heart of the business application and should be well isolated from
    the other layers of the application. Also, it should not be dependent on the
    application frameworks used in the other layers
Design concepts
Following design aspects are considered as the main ingredients of the current
    DDD implementation recipe:


•
•
    Object Oriented Programming (OOP)


•
    Dependency Injection (DI)
    Aspect Oriented Programming (AOP)
The project flow
From a project management standpoint, a real-world DDD implementation
   project comprises the same phases as any other software development
   project.


•
These phases include:


•
    Model the domain


•
    Design


•
    Development


•
    Unit and Integration Testing
    Refine and refactor the domain model based on the design and

•
    development (Continuous Integration (CI) of model concepts).
    Repeat the above steps using the updated domain model (CI of domain
    implementation).
Benefits
•   It helps the team create a common model, between the business and IT
    stakeholders in the company, that the team can use to communicate about

•
    the business requirements, data entities, and process models.
    The model is modular, extensible and easy to maintain as the design

•
    reflects the business model.
    It improves the reusability and testability of the business domain objects.
Prerequisites for the
successful application of DDD
•
•
    Your domain is not trivial
    The project team has experience and interest in Object Oriented

•
    Programming/Design


•
    You have access to domain experts
    You have an iterative process
Resources
http://en.wikipedia.org/wiki/Domain-driven_design
http://www.infoq.com/articles/ddd-in-practice
http://en.wikipedia.org/wiki/Object-oriented_programming
http://en.wikipedia.org/wiki/Dependency_injection
http://en.wikipedia.org/wiki/Aspect-oriented_programming
http://www.udidahan.com/2007/04/21/domain-model-pattern/
http://en.wikipedia.org/wiki/Unified_Modeling_Language




•
Books:
     Domain-Driven Design, Tackling Complexity in the Heart of Software, Eric Evans, Addison

•
•
     Wesley
     Applying Domain-Driven Design and Patterns, Jimmy Nilsson, Addison Wesley
     Refactoring to Patterns, Joshua Kerievsky, Addison Wesley

More Related Content

What's hot

Domain Driven Design 101
Domain Driven Design 101Domain Driven Design 101
Domain Driven Design 101
Richard Dingwall
 
Domain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) DistilledDomain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) Distilled
Nicola Costantino
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introduction
wojtek_s
 
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
Dmitry Geyzersky
 
Applying Domain-Driven Design to craft Rich Domain Models
Applying Domain-Driven Design to craft Rich Domain ModelsApplying Domain-Driven Design to craft Rich Domain Models
Applying Domain-Driven Design to craft Rich Domain Models
Alexander van Trijffel
 
Domain Driven Design Demonstrated
Domain Driven Design Demonstrated Domain Driven Design Demonstrated
Domain Driven Design Demonstrated
Alan Christensen
 
Domain Driven Design: Zero to Hero
Domain Driven Design: Zero to HeroDomain Driven Design: Zero to Hero
Domain Driven Design: Zero to Hero
Fabrício Rissetto
 
Domain driven design
Domain driven designDomain driven design
Domain driven design
Mustafa Dağdelen
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Araf Karsh Hamid
 
D2 domain driven-design
D2 domain driven-designD2 domain driven-design
D2 domain driven-design
Arnaud Bouchez
 
DevDay2017 ESGI Essential DDD
DevDay2017 ESGI Essential DDDDevDay2017 ESGI Essential DDD
DevDay2017 ESGI Essential DDD
Gregory Boissinot
 
A Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation SlidesA Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation Slides
thinkddd
 
Domain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVCDomain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVC
Steven Smith
 
Domain Driven Design Quickly
Domain Driven Design QuicklyDomain Driven Design Quickly
Domain Driven Design Quickly
Mariam Hakobyan
 
Introducing Domain Driven Design - codemash
Introducing Domain Driven Design - codemashIntroducing Domain Driven Design - codemash
Introducing Domain Driven Design - codemash
Steven Smith
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
AOE
 
Enterprise Software Architecture styles
Enterprise Software Architecture stylesEnterprise Software Architecture styles
Enterprise Software Architecture styles
Araf Karsh Hamid
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Young-Ho Cho
 
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
Abdul Karim
 

What's hot (20)

Domain Driven Design 101
Domain Driven Design 101Domain Driven Design 101
Domain Driven Design 101
 
Domain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) DistilledDomain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) Distilled
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introduction
 
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
 
Applying Domain-Driven Design to craft Rich Domain Models
Applying Domain-Driven Design to craft Rich Domain ModelsApplying Domain-Driven Design to craft Rich Domain Models
Applying Domain-Driven Design to craft Rich Domain Models
 
Domain Driven Design Demonstrated
Domain Driven Design Demonstrated Domain Driven Design Demonstrated
Domain Driven Design Demonstrated
 
Domain Driven Design: Zero to Hero
Domain Driven Design: Zero to HeroDomain Driven Design: Zero to Hero
Domain Driven Design: Zero to Hero
 
Domain driven design
Domain driven designDomain driven design
Domain driven design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
D2 domain driven-design
D2 domain driven-designD2 domain driven-design
D2 domain driven-design
 
DevDay2017 ESGI Essential DDD
DevDay2017 ESGI Essential DDDDevDay2017 ESGI Essential DDD
DevDay2017 ESGI Essential DDD
 
A Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation SlidesA Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation Slides
 
Domain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVCDomain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVC
 
Domain Driven Design Quickly
Domain Driven Design QuicklyDomain Driven Design Quickly
Domain Driven Design Quickly
 
Introducing Domain Driven Design - codemash
Introducing Domain Driven Design - codemashIntroducing Domain Driven Design - codemash
Introducing Domain Driven Design - codemash
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Enterprise Software Architecture styles
Enterprise Software Architecture stylesEnterprise Software Architecture styles
Enterprise Software Architecture styles
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
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
 

Similar to Domain Driven Design

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
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Muhammad Ali
 
Non-functional requirements
Non-functional requirements Non-functional requirements
Non-functional requirements
Rohela Raouf
 
Private cloud reference model ms
Private cloud reference model msPrivate cloud reference model ms
Private cloud reference model ms
chrisjosewanjira
 
Oracle Forms Modernization Roadmap
Oracle Forms Modernization RoadmapOracle Forms Modernization Roadmap
Oracle Forms Modernization Roadmap
Kai-Uwe Möller
 
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
Chris Renner
 
Model-driven and low-code development for event-based systems | Bobby Calderw...
Model-driven and low-code development for event-based systems | Bobby Calderw...Model-driven and low-code development for event-based systems | Bobby Calderw...
Model-driven and low-code development for event-based systems | Bobby Calderw...
HostedbyConfluent
 
Unit_1(Software and Software Engineering).pptx
Unit_1(Software and Software Engineering).pptxUnit_1(Software and Software Engineering).pptx
Unit_1(Software and Software Engineering).pptx
taxegap762
 
Design Engineering and Design concepts
Design Engineering and Design conceptsDesign Engineering and Design concepts
Design Engineering and Design concepts
JigyasaAgrawal7
 
Design Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptxDesign Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptx
KarthigaiSelviS3
 
DevOps Introduction - Main Concepts Description
DevOps Introduction - Main Concepts DescriptionDevOps Introduction - Main Concepts Description
DevOps Introduction - Main Concepts Description
BrunoOliveira631137
 
A Case for Outside-In Design
A Case for Outside-In DesignA Case for Outside-In Design
A Case for Outside-In Design
Sandro Mancuso
 
Clean architecture with asp.net core
Clean architecture with asp.net coreClean architecture with asp.net core
Clean architecture with asp.net core
Sam Nasr, MCSA, MVP
 
OOSE UNIT-1.pdf
OOSE UNIT-1.pdfOOSE UNIT-1.pdf
OOSE UNIT-1.pdf
KarumuriJayasri
 
Android ppt with example of budget manager
Android ppt with example of budget managerAndroid ppt with example of budget manager
Android ppt with example of budget manager
Nalini Mehta
 
Software design for scientific applications
Software design for scientific applicationsSoftware design for scientific applications
Software design for scientific applicationsPriyanka Lal
 
Software design
Software designSoftware design
Software design
Benazir Fathima
 

Similar to Domain Driven Design (20)

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"
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Non-functional requirements
Non-functional requirements Non-functional requirements
Non-functional requirements
 
Private cloud reference model ms
Private cloud reference model msPrivate cloud reference model ms
Private cloud reference model ms
 
Oracle Forms Modernization Roadmap
Oracle Forms Modernization RoadmapOracle Forms Modernization Roadmap
Oracle Forms Modernization Roadmap
 
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
 
Model-driven and low-code development for event-based systems | Bobby Calderw...
Model-driven and low-code development for event-based systems | Bobby Calderw...Model-driven and low-code development for event-based systems | Bobby Calderw...
Model-driven and low-code development for event-based systems | Bobby Calderw...
 
Unit_1(Software and Software Engineering).pptx
Unit_1(Software and Software Engineering).pptxUnit_1(Software and Software Engineering).pptx
Unit_1(Software and Software Engineering).pptx
 
Design Engineering and Design concepts
Design Engineering and Design conceptsDesign Engineering and Design concepts
Design Engineering and Design concepts
 
Design Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptxDesign Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptx
 
DevOps Introduction - Main Concepts Description
DevOps Introduction - Main Concepts DescriptionDevOps Introduction - Main Concepts Description
DevOps Introduction - Main Concepts Description
 
A Case for Outside-In Design
A Case for Outside-In DesignA Case for Outside-In Design
A Case for Outside-In Design
 
Clean architecture with asp.net core
Clean architecture with asp.net coreClean architecture with asp.net core
Clean architecture with asp.net core
 
OOSE UNIT-1.pdf
OOSE UNIT-1.pdfOOSE UNIT-1.pdf
OOSE UNIT-1.pdf
 
Development Guideline
Development GuidelineDevelopment Guideline
Development Guideline
 
Android ppt with example of budget manager
Android ppt with example of budget managerAndroid ppt with example of budget manager
Android ppt with example of budget manager
 
Software design for scientific applications
Software design for scientific applicationsSoftware design for scientific applications
Software design for scientific applications
 
SDWest2005Goetsch
SDWest2005GoetschSDWest2005Goetsch
SDWest2005Goetsch
 
Prashant Patel
Prashant PatelPrashant Patel
Prashant Patel
 
Software design
Software designSoftware design
Software design
 

Recently uploaded

Architectural & Interior design portfolio.pdf
Architectural & Interior design portfolio.pdfArchitectural & Interior design portfolio.pdf
Architectural & Interior design portfolio.pdf
susantebinum
 
Simpolo Company Profile & Corporate Logo
Simpolo Company Profile & Corporate LogoSimpolo Company Profile & Corporate Logo
Simpolo Company Profile & Corporate Logo
simpolosparkteam
 
How to keep your Home naturally Cool and Warm
How to keep your Home naturally Cool and WarmHow to keep your Home naturally Cool and Warm
How to keep your Home naturally Cool and Warm
Vinra Construction
 
Avrupa Konutlari Yenimahalle - Listing Turkey
Avrupa Konutlari Yenimahalle - Listing TurkeyAvrupa Konutlari Yenimahalle - Listing Turkey
Avrupa Konutlari Yenimahalle - Listing Turkey
Listing Turkey
 
Oeiras Tech City, Developed by RE Capital and REIG, Will Become Lisbon's Futu...
Oeiras Tech City, Developed by RE Capital and REIG, Will Become Lisbon's Futu...Oeiras Tech City, Developed by RE Capital and REIG, Will Become Lisbon's Futu...
Oeiras Tech City, Developed by RE Capital and REIG, Will Become Lisbon's Futu...
Newman George Leech
 
Optimizing Your MCA Lead Capture Process for Better Results
Optimizing Your MCA Lead Capture Process for Better ResultsOptimizing Your MCA Lead Capture Process for Better Results
Optimizing Your MCA Lead Capture Process for Better Results
Lead Generation Media
 
Urbanrise Paradise on Earth - Unveiling Unprecedented Luxury in Exquisite Vil...
Urbanrise Paradise on Earth - Unveiling Unprecedented Luxury in Exquisite Vil...Urbanrise Paradise on Earth - Unveiling Unprecedented Luxury in Exquisite Vil...
Urbanrise Paradise on Earth - Unveiling Unprecedented Luxury in Exquisite Vil...
JagadishKR1
 
Elegant Evergreen Homes - Luxury Apartments Redefining Comfort in Yelahanka, ...
Elegant Evergreen Homes - Luxury Apartments Redefining Comfort in Yelahanka, ...Elegant Evergreen Homes - Luxury Apartments Redefining Comfort in Yelahanka, ...
Elegant Evergreen Homes - Luxury Apartments Redefining Comfort in Yelahanka, ...
JagadishKR1
 
Presentation to Windust Meadows HOA Board of Directors June 4, 2024: Focus o...
Presentation to Windust Meadows HOA Board of Directors June 4, 2024:  Focus o...Presentation to Windust Meadows HOA Board of Directors June 4, 2024:  Focus o...
Presentation to Windust Meadows HOA Board of Directors June 4, 2024: Focus o...
Joseph Lewis Aguirre
 
Green Homes, Islamabad Presentation .pdf
Green Homes, Islamabad Presentation .pdfGreen Homes, Islamabad Presentation .pdf
Green Homes, Islamabad Presentation .pdf
ticktoktips
 
Brigade Insignia at Yelahanka Brochure.pdf
Brigade Insignia at Yelahanka Brochure.pdfBrigade Insignia at Yelahanka Brochure.pdf
Brigade Insignia at Yelahanka Brochure.pdf
SachinChauhan191
 
One20 North Vancouver Floor Plans by Three Shores Development.
One20 North Vancouver Floor Plans by Three Shores Development.One20 North Vancouver Floor Plans by Three Shores Development.
One20 North Vancouver Floor Plans by Three Shores Development.
VickyAulakh1
 
Biography and career about Lixin Azarmehr
Biography and career about Lixin AzarmehrBiography and career about Lixin Azarmehr
Biography and career about Lixin Azarmehr
Lixin Azarmehr
 
MC Heights-Best Construction Company in jhang
MC Heights-Best Construction Company in jhangMC Heights-Best Construction Company in jhang
MC Heights-Best Construction Company in jhang
laraibfatim009
 
Investing In The US As A Canadian… And How To Do It RIGHT!! (feat. Erwin Szet...
Investing In The US As A Canadian… And How To Do It RIGHT!! (feat. Erwin Szet...Investing In The US As A Canadian… And How To Do It RIGHT!! (feat. Erwin Szet...
Investing In The US As A Canadian… And How To Do It RIGHT!! (feat. Erwin Szet...
Volition Properties
 
SVN Live 6.3.24 Weekly Property Broadcast
SVN Live 6.3.24 Weekly Property BroadcastSVN Live 6.3.24 Weekly Property Broadcast
SVN Live 6.3.24 Weekly Property Broadcast
SVN International Corp.
 
Torun Center Residences Istanbul - Listing Turkey
Torun Center Residences Istanbul - Listing TurkeyTorun Center Residences Istanbul - Listing Turkey
Torun Center Residences Istanbul - Listing Turkey
Listing Turkey
 
Rixos Tersane Istanbul Residences Brochure_May2024_ENG.pdf
Rixos Tersane Istanbul Residences Brochure_May2024_ENG.pdfRixos Tersane Istanbul Residences Brochure_May2024_ENG.pdf
Rixos Tersane Istanbul Residences Brochure_May2024_ENG.pdf
Listing Turkey
 
One FNG by Group 108 Sector 142 Noida Construction Update
One FNG by Group 108 Sector 142 Noida Construction UpdateOne FNG by Group 108 Sector 142 Noida Construction Update
One FNG by Group 108 Sector 142 Noida Construction Update
One FNG
 
Omaxe Sports City Dwarka A Comprehensive Guide
Omaxe Sports City Dwarka A Comprehensive GuideOmaxe Sports City Dwarka A Comprehensive Guide
Omaxe Sports City Dwarka A Comprehensive Guide
omaxesportscitydwark
 

Recently uploaded (20)

Architectural & Interior design portfolio.pdf
Architectural & Interior design portfolio.pdfArchitectural & Interior design portfolio.pdf
Architectural & Interior design portfolio.pdf
 
Simpolo Company Profile & Corporate Logo
Simpolo Company Profile & Corporate LogoSimpolo Company Profile & Corporate Logo
Simpolo Company Profile & Corporate Logo
 
How to keep your Home naturally Cool and Warm
How to keep your Home naturally Cool and WarmHow to keep your Home naturally Cool and Warm
How to keep your Home naturally Cool and Warm
 
Avrupa Konutlari Yenimahalle - Listing Turkey
Avrupa Konutlari Yenimahalle - Listing TurkeyAvrupa Konutlari Yenimahalle - Listing Turkey
Avrupa Konutlari Yenimahalle - Listing Turkey
 
Oeiras Tech City, Developed by RE Capital and REIG, Will Become Lisbon's Futu...
Oeiras Tech City, Developed by RE Capital and REIG, Will Become Lisbon's Futu...Oeiras Tech City, Developed by RE Capital and REIG, Will Become Lisbon's Futu...
Oeiras Tech City, Developed by RE Capital and REIG, Will Become Lisbon's Futu...
 
Optimizing Your MCA Lead Capture Process for Better Results
Optimizing Your MCA Lead Capture Process for Better ResultsOptimizing Your MCA Lead Capture Process for Better Results
Optimizing Your MCA Lead Capture Process for Better Results
 
Urbanrise Paradise on Earth - Unveiling Unprecedented Luxury in Exquisite Vil...
Urbanrise Paradise on Earth - Unveiling Unprecedented Luxury in Exquisite Vil...Urbanrise Paradise on Earth - Unveiling Unprecedented Luxury in Exquisite Vil...
Urbanrise Paradise on Earth - Unveiling Unprecedented Luxury in Exquisite Vil...
 
Elegant Evergreen Homes - Luxury Apartments Redefining Comfort in Yelahanka, ...
Elegant Evergreen Homes - Luxury Apartments Redefining Comfort in Yelahanka, ...Elegant Evergreen Homes - Luxury Apartments Redefining Comfort in Yelahanka, ...
Elegant Evergreen Homes - Luxury Apartments Redefining Comfort in Yelahanka, ...
 
Presentation to Windust Meadows HOA Board of Directors June 4, 2024: Focus o...
Presentation to Windust Meadows HOA Board of Directors June 4, 2024:  Focus o...Presentation to Windust Meadows HOA Board of Directors June 4, 2024:  Focus o...
Presentation to Windust Meadows HOA Board of Directors June 4, 2024: Focus o...
 
Green Homes, Islamabad Presentation .pdf
Green Homes, Islamabad Presentation .pdfGreen Homes, Islamabad Presentation .pdf
Green Homes, Islamabad Presentation .pdf
 
Brigade Insignia at Yelahanka Brochure.pdf
Brigade Insignia at Yelahanka Brochure.pdfBrigade Insignia at Yelahanka Brochure.pdf
Brigade Insignia at Yelahanka Brochure.pdf
 
One20 North Vancouver Floor Plans by Three Shores Development.
One20 North Vancouver Floor Plans by Three Shores Development.One20 North Vancouver Floor Plans by Three Shores Development.
One20 North Vancouver Floor Plans by Three Shores Development.
 
Biography and career about Lixin Azarmehr
Biography and career about Lixin AzarmehrBiography and career about Lixin Azarmehr
Biography and career about Lixin Azarmehr
 
MC Heights-Best Construction Company in jhang
MC Heights-Best Construction Company in jhangMC Heights-Best Construction Company in jhang
MC Heights-Best Construction Company in jhang
 
Investing In The US As A Canadian… And How To Do It RIGHT!! (feat. Erwin Szet...
Investing In The US As A Canadian… And How To Do It RIGHT!! (feat. Erwin Szet...Investing In The US As A Canadian… And How To Do It RIGHT!! (feat. Erwin Szet...
Investing In The US As A Canadian… And How To Do It RIGHT!! (feat. Erwin Szet...
 
SVN Live 6.3.24 Weekly Property Broadcast
SVN Live 6.3.24 Weekly Property BroadcastSVN Live 6.3.24 Weekly Property Broadcast
SVN Live 6.3.24 Weekly Property Broadcast
 
Torun Center Residences Istanbul - Listing Turkey
Torun Center Residences Istanbul - Listing TurkeyTorun Center Residences Istanbul - Listing Turkey
Torun Center Residences Istanbul - Listing Turkey
 
Rixos Tersane Istanbul Residences Brochure_May2024_ENG.pdf
Rixos Tersane Istanbul Residences Brochure_May2024_ENG.pdfRixos Tersane Istanbul Residences Brochure_May2024_ENG.pdf
Rixos Tersane Istanbul Residences Brochure_May2024_ENG.pdf
 
One FNG by Group 108 Sector 142 Noida Construction Update
One FNG by Group 108 Sector 142 Noida Construction UpdateOne FNG by Group 108 Sector 142 Noida Construction Update
One FNG by Group 108 Sector 142 Noida Construction Update
 
Omaxe Sports City Dwarka A Comprehensive Guide
Omaxe Sports City Dwarka A Comprehensive GuideOmaxe Sports City Dwarka A Comprehensive Guide
Omaxe Sports City Dwarka A Comprehensive Guide
 

Domain Driven Design

  • 2. What it is and what it is not? • "Domain" not like in "part of the URL", but like in "area of business expertise" • Wikipedia: (http://en.wikipedia.org/wiki/Domain-driven_design) Domain-driven design (DDD) is an approach to developing software for complex needs by deeply connecting the implementation to an evolving model of the core business concepts. The premise of domain- driven design is the following: o Placing the project's primary focus on the core domain and domain logic o Basing complex designs on a model o Initiating a creative collaboration between technical and domain experts to iteratively cut ever closer to the conceptual heart of the problem. o Domain-driven design is not a technology or a methodology. DDD provides a structure of practices and terminology for making design decisions that focus and accelerate software projects dealing with complicated domains.
  • 3. Core definitions Domain: A sphere of knowledge (ontology), influence, or activity. The subject • area to which the user applies a program is the domain of the software. Model: A system of abstractions that describes selected aspects of a • domain and can be used to solve problems related to that domain. Ubiquitous Language: A language structured around the domain model and used by all team members to connect all the activities of the team • with the software. Context: The setting in which a word or statement appears that determines its meaning.
  • 4. Building blocks of the model In DDD, there are artifacts to express, create, and retrieve domain models: • Entity: An object that is not defined by its attributes, but rather by a thread of continuity and its identity. • Value Object: An object that contains attributes but has no conceptual identity. They should be treated as immutable. • Aggregate: A collection of objects that are bound together by a root entity, otherwise known as an aggregate root. The aggregate root guarantees the consistency of changes being made within the aggregate by forbidding external objects from holding references to its members. • Service: When an operation does not conceptually belong to any object. Following the natural contours of the problem, you can implement these operations in services. • Repository: methods for retrieving domain objects should delegate to a specialized Repository object such that alternative storage implementations may be easily interchanged. • Factory: methods for creating domain objects should delegate to a specialized Factory object such that alternative implementations may be easily interchanged.
  • 5. Ubiquitous language meaning that the domain model should form a common language given by domain experts for describing system requirements, that works equally well for the business users or sponsors and for the software developers
  • 6. Context Multiple models are in play on any large project. Yet when code based on distinct models is combined, software becomes buggy, unreliable, and difficult to understand. Communication among team members becomes confused. It is often unclear in what context a model should not be applied. • Therefore: • Explicitly define the context within which a model applies. Explicitly set boundaries in terms of team organization, usage within specific parts of the application, and physical manifestations such as code • bases and database schemas. Keep the model strictly consistent within these bounds, but don’t be distracted or confused by issues outside.
  • 7. The modeling process flow • • Model and document business processes first. Select a candidate business process and work with the business domain • experts to document it using the Ubiquitous Language. Identify all the services that are required for the candidate business process. These services can be atomic (single step) or orchestrated (multi- step with or without work-flow) in nature. They can also be business (e.g. • Underwriting or Funding) or infrastructure (e.g. E-mail or Job Scheduling). Identify and document the state and behavior of the objects used by services identified in the previous step.
  • 8. Architecture A typical enterprise application architecture consists of the following four • conceptual layers: User Interface (Presentation Layer): Responsible for presenting • information to the user and interpreting user commands. Application Layer: This layer coordinates the application activity. It doesn't contain any business logic. It does not hold the state of business • objects, but it can hold the state of an application task's progress. Domain Layer: This layer contains information about the business domain. The state of business objects is held here. Persistence of the business objects and possibly their state is delegated to the infrastructure • layer. Infrastructure Layer: This layer acts as a supporting library for all the other layers. It provides communication between layers, implements persistence for business objects, contains supporting libraries for the user interface layer, etc.
  • 9. Application layer • is responsible for the navigation between the UI screens in the application • as well as the interaction with the application layers of other systems. can also perform the basic (non-business related) validation on the user input data before transmitting it to the other (lower) layers of the • application. • doesn't contain any business or domain related logic or data access logic. doesn't have any state reflecting a business use case but it can manage the state of the user session or the progress of a task.
  • 10. Domain layer • is responsible for the concepts of business domain, information about the business use case and the business rules. Domain objects encapsulate • the state and behavior of business entities. can also manage the state (session) of a business use case if the use case spans multiple user requests (e.g. loan registration process which consists of multiple steps: user entering the loan details, system returning the products and rates based on the loan parameters, user selecting a specific product/rate combination, and finally the system locking the loan • for that rate). contains service objects that only have a defined operational behavior which is not part of any domain object. Services encapsulate behavior of • the business domain that doesn't fit in the domain objects themselves. is the heart of the business application and should be well isolated from the other layers of the application. Also, it should not be dependent on the application frameworks used in the other layers
  • 11. Design concepts Following design aspects are considered as the main ingredients of the current DDD implementation recipe: • • Object Oriented Programming (OOP) • Dependency Injection (DI) Aspect Oriented Programming (AOP)
  • 12. The project flow From a project management standpoint, a real-world DDD implementation project comprises the same phases as any other software development project. • These phases include: • Model the domain • Design • Development • Unit and Integration Testing Refine and refactor the domain model based on the design and • development (Continuous Integration (CI) of model concepts). Repeat the above steps using the updated domain model (CI of domain implementation).
  • 13.
  • 14. Benefits • It helps the team create a common model, between the business and IT stakeholders in the company, that the team can use to communicate about • the business requirements, data entities, and process models. The model is modular, extensible and easy to maintain as the design • reflects the business model. It improves the reusability and testability of the business domain objects.
  • 15. Prerequisites for the successful application of DDD • • Your domain is not trivial The project team has experience and interest in Object Oriented • Programming/Design • You have access to domain experts You have an iterative process