What Is a Write Model?
A write model is the part of a system responsible for validating and applying changes while protecting domain invariants. It is normalized and rule-centric rather than tuned for fast reads. In CQRS it is paired with one or more read models that are derived from the changes it produces.
Why it matters
Concentrating consistency rules in the write model keeps correctness in one place. It frees read models to be reshaped for performance without risking the integrity of writes.
Related guides
What Is a Read Model?A read model is a data representation optimized for queries and display, often denormalized and kept separate…
What Is a Command Handler?A command handler is the component that receives a command requesting a change, validates it, and executes th…
What Is an Aggregate Root?An aggregate root is the single entity through which all access to a cluster of related domain objects flows,…