However what advantages does it provide? It may correspond to the "Hibernate philosophy" however I've always preferred to make my entities be data access only and the services provide the business methods, sometimes it make sense to add a method to the DAO if it may be called from multiple places from the service (so I added that option) but I still wouldn't consider it a business operation since clients should only be calling the service layer anyway. Peter, you say placing operations on DAOs mixes concerns, however I'd say placing "business" operations on hibernate entities correspond just as much or more mixing of concerns (since they provide the actual mapping to the underlying database). I guess what it really comes down to is how to, is how you prefer to design your system.
Chad -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Monday, December 06, 2004 2:01 AM To: [EMAIL PROTECTED] Subject: RE: [Andromda-user] Adding business methods to Spring Entities Hi Chad, hi Roy, >> Chad Brandon wrote: >> Business methods are currently created on the DAOs if you model operations >> on the entities, does that not work for you? > > Roy wrote: >The short answer is no. I don't think an object that wants to call an >entity's business method should depend on its corresponding DAO. I second that. According to the Hibernate philosophy, the business objects should contain the business methods, thus producing a rich domain model. Adding business models to DAOs results in a mix up of two concerns (data access on one hand, business logic on the other hand). - Peter ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Andromda-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/andromda-user ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Andromda-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/andromda-user
