SlideShare une entreprise Scribd logo
1  sur  24
Introduction to Domain Driven
            Design
  How can an IT Dev Dept improve in
   achieving business driven goals
Successful enterprise must be able
adapt fast to new market conditions
IT department is a key element to
         support such change
• Business complexity grows and changes
  quickly!
• We must find the way how to achieve the
  goals set by a business!
Understand and follow DDD paradigms
We have been doing all these
 things, but our own way
Spaghetti code
Objects with too many responsibilities
Untested code is difficult to change
                later
• application bugs
• creating of Heroes
• barrier for new features
Fear Driven Development
We should utilize existing
knowledge and best practices
What is DDD?
• Domain Knowledge
• Ubiquitous Language
• Bounded Context
Layered Architecture
Building Blocks
•   Entity: Contractor, Contractor Rate
•   Value Object: CXC_Date
•   Aggregate: Invoice, Contractor, Wree
•   Service: Company Service
•   Factory: Company Contact Factory
•   Repository: Contractor Repository
Building Blocks
Started with Entities
Factories

Unit tested!
Services
Repositories
Repositories
Aggregates


        Aggregate Root




Aggregate Members
Value Objects
What is next?
Improve Domain Layer
• Ongoing process of refactoring driven by
  Business requirements
• No need for complete overhaul – iterative
  process is more aligned with Business needs.
Thank you!

Contenu connexe

Tendances

Agile Teams Deserve Agile Testing
Agile Teams Deserve Agile TestingAgile Teams Deserve Agile Testing
Agile Teams Deserve Agile TestingSmartBear
 
Behaviour Driven Development (BDD) With Apex on Force.com
Behaviour Driven Development (BDD) With Apex on Force.comBehaviour Driven Development (BDD) With Apex on Force.com
Behaviour Driven Development (BDD) With Apex on Force.comSalesforce Developers
 
Case Study: T-Mobile’s Agile Journey with CA Agile Central
Case Study: T-Mobile’s Agile Journey with CA Agile CentralCase Study: T-Mobile’s Agile Journey with CA Agile Central
Case Study: T-Mobile’s Agile Journey with CA Agile CentralCA Technologies
 
Etg coldfusion presentation
Etg coldfusion presentationEtg coldfusion presentation
Etg coldfusion presentationEtisbew-corp
 
Brook Software Slideshow
Brook Software SlideshowBrook Software Slideshow
Brook Software SlideshowBrookSoftware
 
Oracle P6 R8.1 EPS Issues
Oracle P6 R8.1 EPS IssuesOracle P6 R8.1 EPS Issues
Oracle P6 R8.1 EPS Issuesjshakeel
 
Atagg2015 Benefits of BDD in Digital Era
Atagg2015 Benefits of BDD in Digital EraAtagg2015 Benefits of BDD in Digital Era
Atagg2015 Benefits of BDD in Digital EraAgile Testing Alliance
 

Tendances (11)

Agile Teams Deserve Agile Testing
Agile Teams Deserve Agile TestingAgile Teams Deserve Agile Testing
Agile Teams Deserve Agile Testing
 
Gautam_CV
Gautam_CVGautam_CV
Gautam_CV
 
Behaviour Driven Development (BDD) With Apex on Force.com
Behaviour Driven Development (BDD) With Apex on Force.comBehaviour Driven Development (BDD) With Apex on Force.com
Behaviour Driven Development (BDD) With Apex on Force.com
 
Case Study: T-Mobile’s Agile Journey with CA Agile Central
Case Study: T-Mobile’s Agile Journey with CA Agile CentralCase Study: T-Mobile’s Agile Journey with CA Agile Central
Case Study: T-Mobile’s Agile Journey with CA Agile Central
 
Etg coldfusion presentation
Etg coldfusion presentationEtg coldfusion presentation
Etg coldfusion presentation
 
Mobiappstar brochure
Mobiappstar brochureMobiappstar brochure
Mobiappstar brochure
 
Brook Software Slideshow
Brook Software SlideshowBrook Software Slideshow
Brook Software Slideshow
 
Weblitesofttech ppt
Weblitesofttech pptWeblitesofttech ppt
Weblitesofttech ppt
 
Oracle P6 R8.1 EPS Issues
Oracle P6 R8.1 EPS IssuesOracle P6 R8.1 EPS Issues
Oracle P6 R8.1 EPS Issues
 
Atagg2015 Benefits of BDD in Digital Era
Atagg2015 Benefits of BDD in Digital EraAtagg2015 Benefits of BDD in Digital Era
Atagg2015 Benefits of BDD in Digital Era
 
Ecode intro v.2.03
Ecode intro v.2.03Ecode intro v.2.03
Ecode intro v.2.03
 

Similaire à Domain Driven Design

Schibsted Spain - Day 1 - DDD Course
Schibsted Spain - Day 1 - DDD CourseSchibsted Spain - Day 1 - DDD Course
Schibsted Spain - Day 1 - DDD CourseKevin Mas Ruiz
 
DevOps Vancouver Meetup - WSBC Progress
DevOps Vancouver Meetup - WSBC ProgressDevOps Vancouver Meetup - WSBC Progress
DevOps Vancouver Meetup - WSBC ProgressAndre Kaminski
 
Prepare the sled in summer and project release at its beginning
Prepare the sled in summer and project release at its beginningPrepare the sled in summer and project release at its beginning
Prepare the sled in summer and project release at its beginningVadym Fedorov
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia eventXebia India
 
York edi, business objects and budget realities
York   edi, business objects and budget realitiesYork   edi, business objects and budget realities
York edi, business objects and budget realitiesDennis Bonagura
 
DOES16 London - Jonathan Fletcher - Re-imagining Hiscox IT: A DevOps Story
DOES16 London - Jonathan Fletcher - Re-imagining Hiscox IT: A DevOps StoryDOES16 London - Jonathan Fletcher - Re-imagining Hiscox IT: A DevOps Story
DOES16 London - Jonathan Fletcher - Re-imagining Hiscox IT: A DevOps StoryGene Kim
 
Sw Configuration Engineer
Sw Configuration EngineerSw Configuration Engineer
Sw Configuration EngineerJongens85
 
Critical Capabilities to Shifting Left the Right Way
Critical Capabilities to Shifting Left the Right WayCritical Capabilities to Shifting Left the Right Way
Critical Capabilities to Shifting Left the Right WaySmartBear
 
Biztech Consultancy Ppt
Biztech Consultancy PptBiztech Consultancy Ppt
Biztech Consultancy Pptkinjalmshah
 
GrayCell Corporate Presentation
GrayCell Corporate PresentationGrayCell Corporate Presentation
GrayCell Corporate PresentationAmit-GrayCell
 
MongoDB and Our Journey from Old, Slow and Monolithic to Fast and Agile Micro...
MongoDB and Our Journey from Old, Slow and Monolithic to Fast and Agile Micro...MongoDB and Our Journey from Old, Slow and Monolithic to Fast and Agile Micro...
MongoDB and Our Journey from Old, Slow and Monolithic to Fast and Agile Micro...MongoDB
 
Detail Guide - Hire Dedicated React Native Developers for your Project
Detail Guide - Hire Dedicated React Native Developers for your ProjectDetail Guide - Hire Dedicated React Native Developers for your Project
Detail Guide - Hire Dedicated React Native Developers for your ProjectSemaphoreSoftware1
 
Vishwanath_M_CV_NL
Vishwanath_M_CV_NLVishwanath_M_CV_NL
Vishwanath_M_CV_NLVishwanath M
 
Data integration case study: Oil & Gas industry
Data integration case study: Oil & Gas industryData integration case study: Oil & Gas industry
Data integration case study: Oil & Gas industryETLSolutions
 

Similaire à Domain Driven Design (20)

Schibsted Spain - Day 1 - DDD Course
Schibsted Spain - Day 1 - DDD CourseSchibsted Spain - Day 1 - DDD Course
Schibsted Spain - Day 1 - DDD Course
 
DevOps Vancouver Meetup - WSBC Progress
DevOps Vancouver Meetup - WSBC ProgressDevOps Vancouver Meetup - WSBC Progress
DevOps Vancouver Meetup - WSBC Progress
 
Prepare the sled in summer and project release at its beginning
Prepare the sled in summer and project release at its beginningPrepare the sled in summer and project release at its beginning
Prepare the sled in summer and project release at its beginning
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia event
 
York edi, business objects and budget realities
York   edi, business objects and budget realitiesYork   edi, business objects and budget realities
York edi, business objects and budget realities
 
DOES16 London - Jonathan Fletcher - Re-imagining Hiscox IT: A DevOps Story
DOES16 London - Jonathan Fletcher - Re-imagining Hiscox IT: A DevOps StoryDOES16 London - Jonathan Fletcher - Re-imagining Hiscox IT: A DevOps Story
DOES16 London - Jonathan Fletcher - Re-imagining Hiscox IT: A DevOps Story
 
DevOps with Chef
DevOps with ChefDevOps with Chef
DevOps with Chef
 
Sw Configuration Engineer
Sw Configuration EngineerSw Configuration Engineer
Sw Configuration Engineer
 
Profile_Hadoop
Profile_HadoopProfile_Hadoop
Profile_Hadoop
 
Critical Capabilities to Shifting Left the Right Way
Critical Capabilities to Shifting Left the Right WayCritical Capabilities to Shifting Left the Right Way
Critical Capabilities to Shifting Left the Right Way
 
Biztech Consultancy Ppt
Biztech Consultancy PptBiztech Consultancy Ppt
Biztech Consultancy Ppt
 
GrayCell Corporate Presentation
GrayCell Corporate PresentationGrayCell Corporate Presentation
GrayCell Corporate Presentation
 
MongoDB and Our Journey from Old, Slow and Monolithic to Fast and Agile Micro...
MongoDB and Our Journey from Old, Slow and Monolithic to Fast and Agile Micro...MongoDB and Our Journey from Old, Slow and Monolithic to Fast and Agile Micro...
MongoDB and Our Journey from Old, Slow and Monolithic to Fast and Agile Micro...
 
Ravikumar_Resume
Ravikumar_ResumeRavikumar_Resume
Ravikumar_Resume
 
Detail Guide - Hire Dedicated React Native Developers for your Project
Detail Guide - Hire Dedicated React Native Developers for your ProjectDetail Guide - Hire Dedicated React Native Developers for your Project
Detail Guide - Hire Dedicated React Native Developers for your Project
 
Profile Meyyappan CV
Profile Meyyappan CVProfile Meyyappan CV
Profile Meyyappan CV
 
Technical Debt.pptx
Technical Debt.pptxTechnical Debt.pptx
Technical Debt.pptx
 
Vishwanath_M_CV_NL
Vishwanath_M_CV_NLVishwanath_M_CV_NL
Vishwanath_M_CV_NL
 
Abbas
AbbasAbbas
Abbas
 
Data integration case study: Oil & Gas industry
Data integration case study: Oil & Gas industryData integration case study: Oil & Gas industry
Data integration case study: Oil & Gas industry
 

Dernier

Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimaginedpanagenda
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch TuesdayIvanti
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftshyamraj55
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfFIDO Alliance
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jNeo4j
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfFIDO Alliance
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPTiSEO AI
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfUK Journal
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...FIDO Alliance
 

Dernier (20)

Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 

Domain Driven Design

Notes de l'éditeur

  1. When I was about to create a presentation about recent implementation of Repositories I realised that it would not be understood by our team without some proper introduction to Domain Driven Design. Therefore I decided to make a presentation about DDD instead and use Wiki to describe the processes around Repositories.
  2. Every enterprise must be able to adapt fast in order to survive in the market. Technology changes faster than ever before. Market demand and supply changes in volumes and in structure – constantly.
  3. And an IT department should be key a element to enable such change.But business complexity grows and changes quickly! Legislative changes ... Global Financial Crisis ... Competitors continually launching new products and so on.So we in IT must find a way how to achieve the goals set by the business!
  4. Domain Driven Design offers the solution.DDD is not about technology rather than about business modelling and its transformation into software. It describes the way how to do it and also how to solve common problems.
  5. But do we need another methodology, other processes to follow? Isn't it just some sort of abstract over complication? Let me explain!
  6. Spaghetti code is about processing data instead of building blocks. That means every where the data had been used, the code followed. It breaks the DRY principle and leads to spreading of Business Logic across the whole application.Later we started putting Business Logic into Objects, which was a great leap forward!
  7. Simply following OOP basics does not get the job done right. It can lead to creating of ‘Balls of Mud’ - classes with too many responsibilities which are breaking up the Single Responsibility Principle. Also subclassing/inheritance can be abused instead of using composition.Mixed responsibilities lead to unpredictable behaviour.Such class takes too long to read and understand and even longer to change.
  8. Changing untested code has unpredictable consequences. Untested code is often the cause of: *) application bugs*) creation of Heroes – only the developer who developed the code can maintain it*) barrier for implementation of any new features – nobody wants to change such a part of the system – which leads to FDD
  9. People are afraid of making changes to a code and would rather maintain it in its current state or demand complete overhaul before executing any - even small changes.
  10. There are many ways how to provide business what it requires: Agile, RUP, Lean etcToday I would like to focus on DDD.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:*) Placing the project's primary focus on the core domain and domain logic*) Basing complex designs on a model*) Initiating a creative collaboration between technical and domain experts to iteratively cut ever closer to the conceptual heart of the problem.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.The term was coined by Eric Evans in his book of the same title:Domain-Driven Design - Tackling Complexity in the Heart of Software
  11. So what is the DDD?Domain: A sphere of knowledge or activity. The subject area to which the user applies a program – that is the domain of the software.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. E.g. ‘Invoice Balance’ or ‘Released Pay’Context: The setting in which a word or statement appears that determines its meaning.
  12. 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 can hold the state of an application task's progress.Domain Layer: This layer contains information about the business domain - the heart of software. The state of business objects is held here. Persistence of the business objects 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.
  13. Entity: An object that is not defined by its attributes, but rather by a thread of continuity and its identity.Example: Invoice, Payroll, Contractor. Identity can be provided Invoice ID or for Contractor by some Customer reference number (not necessarily by database id)Value Object: An object that contains attributes but has no conceptual identity. They should be treated as immutable.Example: CXC_Date - date does not have any identity, but it is distinguished by its value. Another example can be Price consisting of amount and currency.  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.Example: Invoice and its Invoice Items or Contract and its Contract Rates. Service: When an operation does not conceptually belong to any concrete object, one can implement these operations in services. Service operation is stateless. Example: 'Assign contracts to manager' or 'Calculate Payroll'. Factory: methods for creating domain objects should be delegated to a specialized Factory object so alternative implementations may be easily interchanged.Example: Payroll Builder - to build a payroll requires too many tasks to just make it part of Payroll object itself, therefore dedicated object is required which sole purpose is to Build the Payroll object.Repositories: methods for retrieving domain objects should be delegated to a specialized Repository object so that alternative storage implementations may be easily interchanged. Repositories should provide abstraction of persistence storage to Domain layer. They are not the same as Factories, because process of building and retrieving from repository is completely different. Example: Newly created repositories in PAYX.
  14. It all began when the PAYX/lib folder was introduced. It was a good start to achieving the multilayered architecture – to separate the Model from Views and Controllers. But what went wrong was all the classes suddenly became Entities – they became overcomplicated and unmaintainable, untested and actually untestable.
  15. One day time we started using Unit Testing. Then we realised our current approach is making Unit Testing hard. We replaced static methods or functions with Factories
  16. Later we replaced other static methods with Domain Services. It improved testability and clarity of the Domain, but unfortunatelyServices had too many responsibilities. It led to mocking of methods of the same class during unit testing. This was the reason we implemented ...
  17. Now this is the last part we finally introduced to PAYX. Repositories provide methods for retrieving domain objects from persistence storage and are creating an illusion of in-memory object graph for the Domain Layer. By injecting Repositories we can easy make the unit tests DB independent.
  18. But also we can easily swap persistence storage without affecting Domain!
  19. Good examples for Aggregates in PAYX are Invoice with its Invoice Items or Wree with Wree Items.
  20. As I already mentioned an example is CXC_Date or Contract_Number class.
  21. Are we done here? Shall we have a beer?! Not yet!