Domain Driven Design
Domain-Driven Design в Java/Spring: что такое DDD, стратегические паттерны (Bounded Context, Context Map, Ubiquitous Language), тактические (Entity, Value Object, Aggregate, Domain Event, Repository), интеграционные (ACL, OHS), принципы проектирования. Объяснение прозой с примерами кода. Правила-якоря с кодами R-ENT/R-VO/R-AGG — в DDD Tactical Style Guide.
Why it matters for UCP. Maturity level 3 (DDD + Hexagonal) in UCP builds on DDD: aggregates, domain events, bounded contexts. Without it, the Handler turns into a service dumping ground. Part of the preparation program.
An explanation of Domain-Driven Design in prose with Java/Spring examples: what DDD is, how to slice a system into bounded contexts, how to describe a domain through aggregates and events, and how to connect contexts via integration patterns.
This is a theoretical section: the articles are meant to be read in order to build up the whole picture. Rules with codes R-ENT-N / R-AGG-N, which the AI skill ucp-ddd-tactical-review cites during PR review, live in the separate DDD Tactical Style Guide.
Section contents
- What DDD is and why you need it — what problem it solves, when it is justified, when it is overkill. The domain model, contexts, the ubiquitous language.
- Strategic patterns — Bounded Context, Context Map, Ubiquitous Language, subdomains. How to slice a system by meaning rather than by tables.
- Tactical patterns — Entity, Value Object, Aggregate, Repository, Domain Event with Java/Spring examples.
- Integration patterns — ACL, Open Host Service, Published Language, Customer-Supplier, Conformist. How to connect contexts without leaking someone else's model.
- Design principles — invariants, transaction boundaries, eventual consistency between aggregates.
- Ontology and the domain model — a system of concepts before aggregates: where the model comes from and why an aggregate is not a table.
- Event Storming — extracting the model from the business in one workshop: events, hot spots, context boundaries.
Related
- DDD Tactical Style Guide — 58 rules
R-ENT/R-VO/R-AGG/R-EVT/R-REP/R-DS/R-FAC/R-SPEC/R-MODfor AI review. - Use Case Pattern — the layered methodology; the DDD level = maturity level 3.
- ddd-building-blocks library — a Java implementation of
Entity,ValueObject,AggregateRoot,DomainEvent. usecase-pattern-skills— the methodology's AI skills, includingucp-ddd-tactical-design/ucp-ddd-tactical-review.