Search⌘ K
AI Features

Rich vs. Anemic Domain Model

Understand the contrast between rich and anemic domain models within Hexagonal Architecture. Learn how rich models encapsulate business rules inside entities, while anemic models centralize logic in use cases, enabling you to choose the approach that best suits your application context.

Our architecture style does not address the problem of how our domain model is to be implemented. This is a blessing because we can do what seems right in our context and a curse because we don’t have any guidelines to help us.

A frequent discussion is whether to implement a rich domain model following the DDDDomain-driven design philosophy or an “anemic” domain model. I’m not going to favor one of the two, but let’s discuss how each of these fits into our architecture.

The rich domain model

In a rich domain model, as much of the domain logic as ...