SlideShare una empresa de Scribd logo
1 de 16
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

Más contenido relacionado

La actualidad más candente

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
 
Domain Driven Design (DDD)
Domain Driven Design (DDD)Domain Driven Design (DDD)
Domain Driven Design (DDD)Tom Kocjan
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationOğuzhan Soykan
 
Domain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) DistilledDomain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) DistilledNicola Costantino
 
Domain driven design
Domain driven designDomain driven design
Domain driven designits_skm
 
Container orchestration overview
Container orchestration overviewContainer orchestration overview
Container orchestration overviewWyn B. Van Devanter
 
CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton Araf Karsh Hamid
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Ryan Jarvinen
 
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...Janusz Nowak
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes VMware Tanzu
 
stupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdfstupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdfDaniloQueirozMota
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideBytemark
 

La actualidad más candente (20)

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 (DDD)
Domain Driven Design (DDD)Domain Driven Design (DDD)
Domain Driven Design (DDD)
 
Scrum + bdd + ddd
Scrum + bdd + dddScrum + bdd + ddd
Scrum + bdd + ddd
 
Domain driven design
Domain driven designDomain driven design
Domain driven design
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) Presentation
 
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
Domain driven designDomain driven design
Domain driven design
 
Container orchestration overview
Container orchestration overviewContainer orchestration overview
Container orchestration overview
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Introduction to DDD
Introduction to DDDIntroduction to DDD
Introduction to DDD
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
 
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
stupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdfstupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdf
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
 
Azure dev ops
Azure dev opsAzure dev ops
Azure dev ops
 

Similar a 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 DesignMuhammad 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 mschrisjosewanjira
 
Oracle Forms Modernization Roadmap
Oracle Forms Modernization RoadmapOracle Forms Modernization Roadmap
Oracle Forms Modernization RoadmapKai-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 PHPChris 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).pptxtaxegap762
 
Design Engineering and Design concepts
Design Engineering and Design conceptsDesign Engineering and Design concepts
Design Engineering and Design conceptsJigyasaAgrawal7
 
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.pptxKarthigaiSelviS3
 
DevOps Introduction - Main Concepts Description
DevOps Introduction - Main Concepts DescriptionDevOps Introduction - Main Concepts Description
DevOps Introduction - Main Concepts DescriptionBrunoOliveira631137
 
A Case for Outside-In Design
A Case for Outside-In DesignA Case for Outside-In Design
A Case for Outside-In DesignSandro Mancuso
 
Clean architecture with asp.net core
Clean architecture with asp.net coreClean architecture with asp.net core
Clean architecture with asp.net coreSam Nasr, MCSA, MVP
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introductionwojtek_s
 
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 managerNalini Mehta
 
Software design for scientific applications
Software design for scientific applicationsSoftware design for scientific applications
Software design for scientific applicationsPriyanka Lal
 

Similar a 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
 
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
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introduction
 
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
 

Último

Majestique Viman Nagar Pune Brochure.pdf
Majestique Viman Nagar Pune Brochure.pdfMajestique Viman Nagar Pune Brochure.pdf
Majestique Viman Nagar Pune Brochure.pdfBabyrudram
 
Call Girls In Laxmi Nagar Delhi +91-8447779280! !Best Woman Seeking Man Escor...
Call Girls In Laxmi Nagar Delhi +91-8447779280! !Best Woman Seeking Man Escor...Call Girls In Laxmi Nagar Delhi +91-8447779280! !Best Woman Seeking Man Escor...
Call Girls In Laxmi Nagar Delhi +91-8447779280! !Best Woman Seeking Man Escor...asmaqueen5
 
TENANT SCREENING REPORT SERVICES​ How Tenant Screening Reports Work
TENANT SCREENING REPORT SERVICES​ How Tenant Screening Reports WorkTENANT SCREENING REPORT SERVICES​ How Tenant Screening Reports Work
TENANT SCREENING REPORT SERVICES​ How Tenant Screening Reports WorkTurbo Tenant
 
9990771857 Call Girls in Dwarka Sector 3 Delhi (Call Girls) Delhi
9990771857 Call Girls in Dwarka Sector 3 Delhi (Call Girls) Delhi9990771857 Call Girls in Dwarka Sector 3 Delhi (Call Girls) Delhi
9990771857 Call Girls in Dwarka Sector 3 Delhi (Call Girls) Delhidelhimodel235
 
Purva Soukhyam in Guduvancheri Chennai.pdf
Purva Soukhyam in Guduvancheri Chennai.pdfPurva Soukhyam in Guduvancheri Chennai.pdf
Purva Soukhyam in Guduvancheri Chennai.pdfpritika141199
 
9990771857 Call Girls in Dwarka Sector 137 Noida (Call Girls) Delhi
9990771857 Call Girls in Dwarka Sector 137 Noida (Call Girls) Delhi9990771857 Call Girls in Dwarka Sector 137 Noida (Call Girls) Delhi
9990771857 Call Girls in Dwarka Sector 137 Noida (Call Girls) Delhidelhimodel235
 
M3M The Line Brochure - Premium Investment Opportunity for Commercial Ventures
M3M The Line Brochure - Premium Investment Opportunity for Commercial VenturesM3M The Line Brochure - Premium Investment Opportunity for Commercial Ventures
M3M The Line Brochure - Premium Investment Opportunity for Commercial Venturessheltercareglobal
 
Kohinoor Flats In Hinjewadi Phase 2 | Homes Built To Suit Your Needs
Kohinoor Flats In Hinjewadi Phase 2 | Homes Built To Suit Your NeedsKohinoor Flats In Hinjewadi Phase 2 | Homes Built To Suit Your Needs
Kohinoor Flats In Hinjewadi Phase 2 | Homes Built To Suit Your Needsaidasheikh47
 
Mahindra Happinest Tathawade Pune Brochure.pdf
Mahindra Happinest Tathawade Pune Brochure.pdfMahindra Happinest Tathawade Pune Brochure.pdf
Mahindra Happinest Tathawade Pune Brochure.pdfBabyrudram
 
Premium Villa Projects in Sarjapur Road Bengaluru
Premium Villa Projects in Sarjapur Road BengaluruPremium Villa Projects in Sarjapur Road Bengaluru
Premium Villa Projects in Sarjapur Road BengaluruShivaSeo3
 
Call girls in new Ashok NagarDelhi꧁ 8447779280꧂ Escort Service Women Seeking ...
Call girls in new Ashok NagarDelhi꧁ 8447779280꧂ Escort Service Women Seeking ...Call girls in new Ashok NagarDelhi꧁ 8447779280꧂ Escort Service Women Seeking ...
Call girls in new Ashok NagarDelhi꧁ 8447779280꧂ Escort Service Women Seeking ...asmaqueen5
 
2k Shots ≽ 9205541914 ≼ Call Girls In Sainik Farm (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Sainik Farm (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Sainik Farm (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Sainik Farm (Delhi)Delhi Call girls
 
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|AkshayJoshi575980
 
SVN Live 5.6.24 Weekly Property Broadcast
SVN Live 5.6.24 Weekly Property BroadcastSVN Live 5.6.24 Weekly Property Broadcast
SVN Live 5.6.24 Weekly Property BroadcastSVN International Corp.
 
Magarpatta Nova Elegance Mundhwa Pune E-Brochure.pdf
Magarpatta Nova Elegance Mundhwa Pune  E-Brochure.pdfMagarpatta Nova Elegance Mundhwa Pune  E-Brochure.pdf
Magarpatta Nova Elegance Mundhwa Pune E-Brochure.pdfManishSaxena95
 
Best Deal Virtual Space in Satya The Hive Tata Zudio 750 Sqft 1.89 Cr All inc...
Best Deal Virtual Space in Satya The Hive Tata Zudio 750 Sqft 1.89 Cr All inc...Best Deal Virtual Space in Satya The Hive Tata Zudio 750 Sqft 1.89 Cr All inc...
Best Deal Virtual Space in Satya The Hive Tata Zudio 750 Sqft 1.89 Cr All inc...ApartmentWala1
 
2k Shot Call girls Aiims Delhi 9205541914
2k Shot Call girls Aiims Delhi 92055419142k Shot Call girls Aiims Delhi 9205541914
2k Shot Call girls Aiims Delhi 9205541914Delhi Call girls
 
Call Girls in Karkardooma Delhi +91 84487779280}Woman Seeking Man in Delhi NCR
Call Girls in Karkardooma Delhi +91 84487779280}Woman Seeking Man in Delhi NCRCall Girls in Karkardooma Delhi +91 84487779280}Woman Seeking Man in Delhi NCR
Call Girls in Karkardooma Delhi +91 84487779280}Woman Seeking Man in Delhi NCRasmaqueen5
 
call girls in ganesh nagar Delhi 8264348440 ✅ call girls ❤️
call girls in ganesh nagar Delhi 8264348440 ✅ call girls ❤️call girls in ganesh nagar Delhi 8264348440 ✅ call girls ❤️
call girls in ganesh nagar Delhi 8264348440 ✅ call girls ❤️soniya singh
 
Low Rate ↬Call Girls in Trilokpuri Delhi ↫8447779280}Escorts Service In Delhi
Low Rate ↬Call Girls in Trilokpuri Delhi ↫8447779280}Escorts Service In DelhiLow Rate ↬Call Girls in Trilokpuri Delhi ↫8447779280}Escorts Service In Delhi
Low Rate ↬Call Girls in Trilokpuri Delhi ↫8447779280}Escorts Service In Delhiasmaqueen5
 

Último (20)

Majestique Viman Nagar Pune Brochure.pdf
Majestique Viman Nagar Pune Brochure.pdfMajestique Viman Nagar Pune Brochure.pdf
Majestique Viman Nagar Pune Brochure.pdf
 
Call Girls In Laxmi Nagar Delhi +91-8447779280! !Best Woman Seeking Man Escor...
Call Girls In Laxmi Nagar Delhi +91-8447779280! !Best Woman Seeking Man Escor...Call Girls In Laxmi Nagar Delhi +91-8447779280! !Best Woman Seeking Man Escor...
Call Girls In Laxmi Nagar Delhi +91-8447779280! !Best Woman Seeking Man Escor...
 
TENANT SCREENING REPORT SERVICES​ How Tenant Screening Reports Work
TENANT SCREENING REPORT SERVICES​ How Tenant Screening Reports WorkTENANT SCREENING REPORT SERVICES​ How Tenant Screening Reports Work
TENANT SCREENING REPORT SERVICES​ How Tenant Screening Reports Work
 
9990771857 Call Girls in Dwarka Sector 3 Delhi (Call Girls) Delhi
9990771857 Call Girls in Dwarka Sector 3 Delhi (Call Girls) Delhi9990771857 Call Girls in Dwarka Sector 3 Delhi (Call Girls) Delhi
9990771857 Call Girls in Dwarka Sector 3 Delhi (Call Girls) Delhi
 
Purva Soukhyam in Guduvancheri Chennai.pdf
Purva Soukhyam in Guduvancheri Chennai.pdfPurva Soukhyam in Guduvancheri Chennai.pdf
Purva Soukhyam in Guduvancheri Chennai.pdf
 
9990771857 Call Girls in Dwarka Sector 137 Noida (Call Girls) Delhi
9990771857 Call Girls in Dwarka Sector 137 Noida (Call Girls) Delhi9990771857 Call Girls in Dwarka Sector 137 Noida (Call Girls) Delhi
9990771857 Call Girls in Dwarka Sector 137 Noida (Call Girls) Delhi
 
M3M The Line Brochure - Premium Investment Opportunity for Commercial Ventures
M3M The Line Brochure - Premium Investment Opportunity for Commercial VenturesM3M The Line Brochure - Premium Investment Opportunity for Commercial Ventures
M3M The Line Brochure - Premium Investment Opportunity for Commercial Ventures
 
Kohinoor Flats In Hinjewadi Phase 2 | Homes Built To Suit Your Needs
Kohinoor Flats In Hinjewadi Phase 2 | Homes Built To Suit Your NeedsKohinoor Flats In Hinjewadi Phase 2 | Homes Built To Suit Your Needs
Kohinoor Flats In Hinjewadi Phase 2 | Homes Built To Suit Your Needs
 
Mahindra Happinest Tathawade Pune Brochure.pdf
Mahindra Happinest Tathawade Pune Brochure.pdfMahindra Happinest Tathawade Pune Brochure.pdf
Mahindra Happinest Tathawade Pune Brochure.pdf
 
Premium Villa Projects in Sarjapur Road Bengaluru
Premium Villa Projects in Sarjapur Road BengaluruPremium Villa Projects in Sarjapur Road Bengaluru
Premium Villa Projects in Sarjapur Road Bengaluru
 
Call girls in new Ashok NagarDelhi꧁ 8447779280꧂ Escort Service Women Seeking ...
Call girls in new Ashok NagarDelhi꧁ 8447779280꧂ Escort Service Women Seeking ...Call girls in new Ashok NagarDelhi꧁ 8447779280꧂ Escort Service Women Seeking ...
Call girls in new Ashok NagarDelhi꧁ 8447779280꧂ Escort Service Women Seeking ...
 
2k Shots ≽ 9205541914 ≼ Call Girls In Sainik Farm (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Sainik Farm (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Sainik Farm (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Sainik Farm (Delhi)
 
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|
 
SVN Live 5.6.24 Weekly Property Broadcast
SVN Live 5.6.24 Weekly Property BroadcastSVN Live 5.6.24 Weekly Property Broadcast
SVN Live 5.6.24 Weekly Property Broadcast
 
Magarpatta Nova Elegance Mundhwa Pune E-Brochure.pdf
Magarpatta Nova Elegance Mundhwa Pune  E-Brochure.pdfMagarpatta Nova Elegance Mundhwa Pune  E-Brochure.pdf
Magarpatta Nova Elegance Mundhwa Pune E-Brochure.pdf
 
Best Deal Virtual Space in Satya The Hive Tata Zudio 750 Sqft 1.89 Cr All inc...
Best Deal Virtual Space in Satya The Hive Tata Zudio 750 Sqft 1.89 Cr All inc...Best Deal Virtual Space in Satya The Hive Tata Zudio 750 Sqft 1.89 Cr All inc...
Best Deal Virtual Space in Satya The Hive Tata Zudio 750 Sqft 1.89 Cr All inc...
 
2k Shot Call girls Aiims Delhi 9205541914
2k Shot Call girls Aiims Delhi 92055419142k Shot Call girls Aiims Delhi 9205541914
2k Shot Call girls Aiims Delhi 9205541914
 
Call Girls in Karkardooma Delhi +91 84487779280}Woman Seeking Man in Delhi NCR
Call Girls in Karkardooma Delhi +91 84487779280}Woman Seeking Man in Delhi NCRCall Girls in Karkardooma Delhi +91 84487779280}Woman Seeking Man in Delhi NCR
Call Girls in Karkardooma Delhi +91 84487779280}Woman Seeking Man in Delhi NCR
 
call girls in ganesh nagar Delhi 8264348440 ✅ call girls ❤️
call girls in ganesh nagar Delhi 8264348440 ✅ call girls ❤️call girls in ganesh nagar Delhi 8264348440 ✅ call girls ❤️
call girls in ganesh nagar Delhi 8264348440 ✅ call girls ❤️
 
Low Rate ↬Call Girls in Trilokpuri Delhi ↫8447779280}Escorts Service In Delhi
Low Rate ↬Call Girls in Trilokpuri Delhi ↫8447779280}Escorts Service In DelhiLow Rate ↬Call Girls in Trilokpuri Delhi ↫8447779280}Escorts Service In Delhi
Low Rate ↬Call Girls in Trilokpuri Delhi ↫8447779280}Escorts Service In Delhi
 

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