Skip to main content

Domain Model (DDD)

A Domain Model is an abstraction of a (part of a) Domain in a software system.

Its implementation targets the realization of (complex) use cases inherent to the given Domain, by incorporating processes, workflows, actors and data specific to the Domain.

Often, planning and designing a Domain Model focuses on a Core Domain that was exposed with the help of Domain Driven Design.

When designing Domain Models, it is suggested to align logic, constraints and invariants close to the implementation of such a Domain Model: This is what Fowler at. al. call a Rich Domain Model, that is "better for complex logic" [📖PPOEA, p. 117]. Conversely, Domain Models that contain little or no domain logic have a risk to become Anemic Domain Models, e.g. models that serve mainly as OO-representations for relational database models.

"A Domain Model creates a web of interconnected objects, where each object represents some meaningful individual, [...]". [📖PPOEA, p. 116]