Software Architecture · Cluster
Domain Modeling
Boundaries, invariants, and ubiquitous language.
- 01 Value Objects and Entities: Deciding What Has Identity Why some domain types are defined by their attributes and others by a lifecycle, and how equality, mutation, and identifier choice all follow from that one decision.
- 02 Invariants and Illegal States: Making Invalid Combinations Unrepresentable How sum types, smart constructors, and parse-at-the-boundary design remove whole classes of runtime checks, and where the technique stops paying for itself.
- 03 Ubiquitous Language: Keeping One Term for One Concept in Code How naming drift between speech and source produces defects that survive testing, and what it takes to make the code use the same words the domain does.
- 04 Aggregate Boundaries and Transaction Scope How to decide what loads and changes together in one transaction, why object references across those boundaries cause trouble, and how conflicts are detected.
- 05 Bounded Contexts and the Cost of a Shared Model Why one organisation-wide model accumulates nullable fields, how context boundaries are drawn around consistency, and what a context map records about the relationships between them.
- 06 Domain Events: Publishing State Transitions Without Losing Them Why the database commit and the event publish are two writes that can disagree, how an outbox closes the gap, and what ordering and duplication guarantees consumers actually get.
- 07 Repositories and the Persistence Boundary What a repository should expose, why it belongs to the aggregate root rather than the table, and which storage concerns it cannot hide from the model.
- 08 Modeling Validity Over Time and Retroactive Correction Separating the time a fact was true from the time the system learned it, and the interval and constraint mechanics that keep an as-of query honest.
- 09 Anti-Corruption Layers at System Edges How a translation layer keeps an external model and its failure semantics out of the domain, where the layer belongs in the call path, and when it costs more than it saves.
- 10 Evolving a Persistent Domain Model Without Downtime The expand-migrate-contract sequence, batched backfills, and event upcasting, for model changes that must survive mixed application versions and a rollback.