Aggregate In DDD. What makes an ENTITY AGGREGATE root Has global identity. Expected to be directly accessed in typical business scenarios. If it has other.

Slides:



Advertisements
Similar presentations
Designing tables from a data model (Chapter 6) One base table for each entity.
Advertisements

Using Dataflow Diagrams
Recursion in Python. Recursion Problems in every area of life can be defined recursively, that is, they can be described in terms of themselves. An English.
Craig Berntson
Key takeaway Go beyond Domain Model and move towards CQRS (related session B313)
Naming Computer Engineering Department Distributed Systems Course Asst. Prof. Dr. Ahmet Sayar Kocaeli University - Fall 2014.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
Ganesh Subramanian 22/12/2010
From Class Diagrams to Databases. So far we have considered “objects” Objects have attributes Objects have operations Attributes are the things you record.
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
CS6320 – MVC L. Grewe THE ISSUE: Separating Implementation from Interface The business logic stays the same regardless of what the presentation is The.
Naming Names in computer systems are used to share resources, to uniquely identify entities, to refer to locations and so on. An important issue with naming.
Chapter 26 Applying Gang of Four Design Patterns 1CS6359 Fall 2012 John Cole.
3/15/05H-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Evaluating Class Diagrams Topics include: Cohesion, Coupling Law of Demeter (handout)
State,identity and behavior of objects Sem III K.I.R.A.S.
LOGICAL DATABASE DESIGN
Logical Database Design Nazife Dimililer. II - Logical Database Design Two stages –Building and validating local logical model –Building and validating.
The chapter will address the following questions:
USE Case Model.
Neo.NET Entity Objects Design Goals Copyright © Erik Dörnenburg – Last updated: May 2004.
Why Analysis Process Refer to earlier chapters Models what the system will do makes it easier for understanding no environment considered (hence, system.
Domain-Driven Design using the ADO.NET Entity Framework Tim McCarthy Principal Engineer, InterKnowlogy
Domain Driven Design. Set of blog posts spanning 10 months – building an app Fefactored along the way code to Patterns eg repository.
Domain-Driven Design Tim McCarthy Principal Engineer, InterKnowlogy
Building an Offline Smart Client using Domain-Driven Design Principles Tim McCarthy.
CSCI 3140 Module 2 – Conceptual Database Design Theodore Chiasson Dalhousie University.
 Proposal for Retention- and Legal Hold Management based on Secondary Types Alfresco OpenText SAP.
Abstract Factory Design Pattern making abstract things.
CSCI 3140 Module 3 – Logical Database Design for the Relational Model Theodore Chiasson Dalhousie University.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
Object and Class Diagrams CSE301 University of Sunderland.
Software Construction Lecture 18 Software Testing.
Copyright © Curt Hill Generic Classes Template Classes or Container Classes.
Domain and Persistence Patterns. Fundamental Pattern Types Design Patterns Business Logic Patterns.
Applying Domain-Driven Design Jimmy Nilsson Webcast with UML China
A Student Guide to Object- Oriented Development Chapter 10 Designing objects and classes.
Programming in Java CSCI-2220 Object Oriented Programming.
Sadegh Aliakbary. Copyright ©2014 JAVACUP.IRJAVACUP.IR All rights reserved. Redistribution of JAVACUP contents is not prohibited if JAVACUP.
Ch- 8. Class Diagrams Class diagrams are the most common diagram found in modeling object- oriented systems. Class diagrams are important not only for.
Use Case Textual Analysis
Copyright © 2013 Curt Hill Triggers The Generation of Indirect Actions.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
PROGRAMMING TESTING B MODULE 2: SOFTWARE SYSTEMS 22 NOVEMBER 2013.
Behavioural Patterns GoF pg Iterator GoF pg. 257 – 271 Memento GoF pg By: Dan Sibbernsen.
Gerhard Dueck -- CS3013Analysis 1. Gerhard Dueck -- CS3013Analysis 2 Why analysis?  Yield a more precise specification of the requirements.  Introduce.
COP 2220 Computer Science I Topics –Breaking Problems Down –Functions –User-defined Functions –Calling Functions –Variable Scope Lecture 4.
Object Design More Design Patterns Object Constraint Language Object Design Specifying Interfaces Review Exam 2 CEN 4010 Class 18 – 11/03.
Lecture 5 Introduction to Use Case Analysis and the Analysis Model Introduction to the UML.
DOMAIN DRIVEN DESIGN Dave 12 May WHAT IS DDD? Set of principles to aid in building complex systems Enables us to focus on core problem domain NOT.
3/1/01H-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Evaluating Class Diagrams Topics include: Cohesion, Coupling Law of Demeter (handout)
1 Constraints and Triggers in SQL. 2 Constraints are conditions that must hold on all valid relation instances SQL2 provides a variety of techniques for.
Generator Design Patterns: Singleton and Prototype
Unit II-Chapter No. : 5- design Patterns
Object-Oriented Analysis (OOA)
Gang of Four’s Design Patterns for Microservices
Scope, Objects, Strings, Numbers
Naming A name in a distributed system is a string of bits or characters used to refer to an entity. To resolve name a naming system is needed.
The Object Oriented Approach to Design
Unit Test Pattern.
Advanced Programming Behnam Hatami Fall 2017.
Incomplete Accessions and Dispositions
DOMAIN DRIVEN DESIGN Martin.
Access to resources by using Groups
Software Design Lecture 5.
Programming to Interfaces
Software Development Process Using UML Recap
Task 13 Scope – Model Structure (L=ChrisH)
Task 13 Scope – Model Structure (L=ChrisH)
SPL – PS13 Persistence Layer.
Finding transactions through your application
Presentation transcript:

Aggregate In DDD

What makes an ENTITY AGGREGATE root Has global identity. Expected to be directly accessed in typical business scenarios. If it has other objects to take care of and: Manage lifecycle of internal objects within it’s boundary. Control all access to internal objects. Enforce invariants/integrity in transactions.

AGGREGATE in modeling process(1) Separate domain LAYERS. Identify ENTITY and VALUE objects in domain layer. Identify AGGREGATE root of ENTITIES and define it’s boundary. Create REPOSITORY for AGGREGATE root.

AGGREGATE in modeling process(2) Consider creation of objects (constructor, AGGREGATE root, FACTORY…). Clarify responsibilities and put objects into proper MODULES and LAYERS. Iteratively discover and refine domain model.

AGGREGATE in codes(1) AGGREGATE root creates internal objects. Part part = root.AddPart(“part-1”); Part part = new Part(root, “part-1”); root.AddPart(part);

AGGREGATE in codes(2) ONLY provide accessibility through REPOSITORY for AGGREGATE root. Other objects must be found by traversal of associations. Nothing outside the aggregate boundary can hold a reference to anything inside, except the root. (deleting operation has no side effects.) ENTITYES inside boundary have local identity, unique within AGGREGATE.

AGGREGATE in codes(3) AGGREGATE root holds internal object related logic for some cases. Objects within AGGREGATE can hold references to other AGGREGATE roots.

Defining boundary(1) Listen to typical business scenarios, be pragmatic on defining boundary. Be referenced by an AGGREGATE root does not mean being aggregated. Entity accessed through different paths (AGGREGATE roots) in different scenarios usually worth making itself it’s own AGGREGATE root.

Defining boundary(2) Use this pattern: "No one would look up A directly without wanting the B itself.” instead of the below one “the A is not integrated/valid conceptually without an B.”

Not mentioned topics NHibernate cascading strategy for AGGREGATE. Typical trade-offs when implementing AGGREGATE.