2010/5/25 Robert Graf-Waczenski <r...@lsoft.com>: > My intuition for the "model" is "that which is serialized to disk" (or, more > generally: "to persistent storage"). This means that such a class does not > contain any business logic but only has getters and/or setters.
No, domain objects do not need to be anemic: http://en.wikipedia.org/wiki/Anemic_Domain_Model You can put logic in your domain objects. > In reality > (and in many nontrivial projects) the distinction is not as strict, so your > "model" class may very well have methods that go beyond getting/setting > properties and you may in fact have instances of "model" classes that live > (at least temporarily) outside the "model" domain. "business logic" methods are, in fact, part of the model. Let the services, or DAO, or whatever, do only the persistence/retrieval part of your code. Antonio --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org