Download presentation
Presentation is loading. Please wait.
Published byBrett Woods Modified over 9 years ago
1
DOMAIN DRIVEN DESIGN Dave 12 May 2015
2
WHAT IS DDD? Set of principles to aid in building complex systems Enables us to focus on core problem domain NOT an architecture standard or design pattern
3
DOMAIN MODEL Fluently describes the domain, rules, requirements and intentions Must always be consistent and rich Free from infrastructural concerns (DB, UI, networking, host, frameworks) Aggregates, entities, value objects and domain events
4
ENTITIES A real thing in our domain which is not defined by its properties but rather by its identity. DO create as an entity if something is uniquely identifiable (litmus test) DO perform invariant validation & enforce consistently DO NOT use property bags (they are promiscuous) DO NOT design entities from database tables or API models
5
VALUE OBJECTS A real thing in our domain which is identified by the value of its properties and not by some identity attribute. DO create value objects as immutable DO NOT represent complex things with just value types
6
AGGREGATES A cluster of associated objects that we treat as a unit for the purpose of data consistency, integrity and invariant preservation. Draws consistency boundary around related entities and value objects. All external access to the aggregate is done through the aggregate root. Reference an aggregate by the root’s identity. External entities can hold references to any aggregate root, but never to any other entity or value object within the aggregate. To access any other part of the aggregate, you must navigate from the aggregate root.
7
REPOSITORIES Mediates between the domain and persistence layers for retrieving, adding and updating aggregates. One repository, one aggregate Repository implementation is not relevant to the domain
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.