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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Similar a 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
 

Similar a 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
 

Último

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 

Último (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 

Domain Driven Design

Notas del editor

  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!