Skip to content

DDD Tactical Patterns — Simple#

classDiagram
  class Aggregate {
    <<root>>
    +id
    +invariants enforced
  }
  class Entity {
    +id
    +mutable, lifecycle
  }
  class ValueObject {
    +immutable
    +equality by value
  }
  class DomainEvent {
    +past-tense fact
  }
  Aggregate o--> Entity
  Aggregate o--> ValueObject
  Aggregate ..> DomainEvent

DDD tactical building blocks model a single bounded context: aggregates enforce invariants, entities have identity and lifecycle, value objects are immutable values, domain events record what happened.