midDDD

What is the 'Anemic Domain Model' anti-pattern?

Updated Apr 28, 2026

Short answer

A model where objects have state (getters/setters) but no behavior, leaving logic in service layers.

Deep explanation

Mid-level DDD focuses on the interaction between components. Aggregate Roots protect business rules (Invariants). If an Order can't have more than 10 items, the Order Aggregate Root rejects the 'AddItem' call. Domain Events help decouple these systems.

Real-world example

A banking app where a 'Transfer' triggers an 'Email Notification' via a Domain Event.

Common mistakes

  • Injecting Repositories into Entities, which couples the model to the persistence layer.

Follow-up questions

  • How large should an Aggregate be?

More DDD interview questions

View all →