Play!> framework design pattern #3 : Avoid Anemic Domain Model

In my last post about data integrity, I noticed that with the MVC model of Play, you tend to put many logic in the controller, even a part of the domain model, thus creating an Anemic Domain Model as described by Martin Fowler.

And it’s what I made in my Codebaord Project to test Play! Framework. In my model, I have a class Domain that is only a database wrapper (with only annotations), and a controller Domains that has code that should be in the model (see old controller source with this wrong choice).