Well I was wondering how domain models are supposed to be designed in a way that it does not behave like an anemic domain model, nor does it violate single responsibility principle. As far as I know, many PHP frameworks such as CakePHP use Anemic Domain Model, in which the models do not have any behaviors other than getter/setter. This is considered an anti-pattern according to Martin Fowler and therefore should be avoided. Many advanced/professional programmers advocate for fat model - thin controller design strategy, and thats for a reason.
Unfortunately, real life is not all that simple, a fat model can quickly become uncontrolled and end up violating single responsibility principle. In fact my first domain model designed 2 years ago had even controller and presentation logic in it, it may sound laughable but it does happen. Stripping responsibilities from fat domain models, however, will eventually lead to anemic domain model. Its a difficult balance.
In fact, someone on stackoverflow used an example to illustrate that the balance can be found. The problem is, he uses a typical OO example, a car, something you typically find in a beginner OO textbook. Personally I dont consider this a good example as in most web/enterprise applications, you dont use cars, dogs or such simple objects for your models. They may be good to initialize beginner coders OO thought process, but almost never useful in real applications. Having a car/dog as example for explaining complex concept can be confusing. Instead, I wonder what a User, UserProfile, Item or Shop domain object’s single responsibility should be…
http://stackoverflow.com/questions/8808314/how-single-responsibility-principle-relates-to-anemic-rich-domain-model
So I’d like to ask you advanced programmers here, according to single responsibility principle, what specific responsibility does your domain model have? And what are the reasons for this? A concrete and example from an actual web application would be nice(not something like a car, a dog that you never use in domain model design), thanks.