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 state of the domain objects. Fowler calls such external classes transaction scripts. It is a very common anti-pattern in enterprise Java applications, possibly encouraged by technologies such as J2EE's Entity Beans. [1] Some argue, however, that it is not an anti-pattern at all.[citation needed]
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 expressed in a different notation or language. While creating such mappings are possible, an undesirable side effect is that it becomes hard to know where to implement actual behavior, since no specific class in the hierarchy is suitable for having the behavior.[citation needed]