Anemic Domain Model

From Wikipedia, the free encyclopedia

The Anemic Domain Model is a design-pattern first described by Martin Fowler. It describes the use of a domain model, where the business logic is implemented outside the domain objects. Logic is then typically implemented in separate classes which transform the domain objects' state. Fowler calls such objects transaction scripts. It is a very common anti-pattern in enterprise Java applications[citation needed], though some argue it is not an anti-pattern at all.

Many modelers come from a database modeling culture, in which data is modeled, but not actions or behavior. Therefore the classes implementing the domain model and the database schema are mapped onto each other, the difference being that they are expressedin a different notation or language. While creating such mappings that are possible, it has the undesirable side effects that is becomes hard to know where to implement actual behavior, because no class in the class diagram is suitable for having the behavior.

[edit] External link