1
votes

So far, I have not come across a blog post or an article which describes the objective criteria for tagging a domain model as anemic. I think, it would definitely help to set objective criteria for anemic domain models.

Few years back, I designed a domain model. I had few tables in database (around 7). I created exactly same number of classes in code. I implemented repository pattern for each of those classes. Today, I definitely feel that it was anemic domain model. There was a chance for me to design an object oriented domain model, but the domain model that I designed was relational in nature. From that experience, one criteria that I have defined is - if the object model maps one - to - one with you relational model, then it could be a sign for anemic domain model.

Are there any other criteria that might be pointing to anemic domain model?

Thanks.

1

1 Answers

4
votes

The article you're looking for is by Martin Fowler and is available at:http://martinfowler.com/bliki/AnemicDomainModel.html .

The fundamental criteria is basically an object model that exposes the semantics of the business domain, but fails to encapsulate the business logic, which includes behavior and invariant constraints.