Hello, I’m taking for granted that:
Domain Objects (a.k.a Business Objects) – are objects that are related to a domain. They should know nothing about the data, only about the domain a.k.a the business of our application. They could be more complex, they could be more simple – they don’t have a rigid structure.
Some times, we see Domain Object referred to an object containing getters and setters.
Some consider this an “Anemic Domain Object”, relating those getters and setters, NOT to a Domain Object but, to a transaction script.
Now, by reading the source here:
AnemicDomainModel
We must notice that the term Domain Model here presented, is referring to the Domain Model in a sense of Design Pattern, not on a MVC sense.
So, according to this, let’s suppose that we are creating a CRUD application based on Gateway/Table Mapper patterns. On some configurations, we may have an object containing getters and setters. (for example, on the Zend Quick Start Guide).
1)
On this case, are we in face of a AnemicDomainModel ?
I will say no because we are not on a DDD implementation.
2)
Are we in face of a transaction script ?
I don’t know.
3)
Are we in face of a Domain Object ?
On a certain way yes… but it seems that getters and setters don’t really are something related with the behavior.
Can anyone provide some feedback on those thoughts? Thanks.