Why does UserService have a User? UserService IS-A Service and HAS-A UserDAO, but the only time the UserService interacts with a User is when methods are called and user objects or properties are passed into them.
User HAS-A UserService HAS-A UserDAO works well because the User should be the API to user-related behaviors, the Service is where those behaviors are implemented at an application level and the DAO serves the persistence needs. Generally when a User object calls a UserService method, it's going to call UserService.save(this) or something similiar: User.setId(); User.load(); User.load() internally does: <cfset this = variables.UserService.getUserById(arguments.id)> Is that making sense? J On Dec 22, 2008, at 11:58 PM, Michael Sharman wrote: > > Thanks Mark, I considered that but I think I got held up on the > circular-ish dependancy. > > UserService has a User <--> User has a UserService (which in turn has > a UserDAO) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CFCDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cfcdev?hl=en -~----------~----~----~----~------~----~------~--~---
