On Apr 7, 2005 9:40 PM, Mark Mandel <[EMAIL PROTECTED]> wrote: > Yeah I would... assuming we have some sort of persistance layer - > > The Manager would: > - Check to see if the BO required is in the Pool, if yes, return it. > - otherwise createEmptyBO (from a Factory, or on it's own, dependent on how > abstract you really wanted to be) > - Then pass the BO to the DAO to populate it's data (assuming option (b)) > along with the ID of the BO you want > - Return back out the BO >
I don't think that answers Chris's question. If the manager finds that the BO is not in its cache and needs to talk to the DAO, why does it create an empty BO and pass it to the DAO? Why don't you just pass an ID and have the DAO return the BO? > In this model, the DAO knows about the BO's methods, and how that > relates to the database. Nothing more. If that's the goal, I would recommend creating a BOFactory. You can have your DAO call the BOFactory to get a new instance of your BO. This is a drinking game waiting to happen... Patrick -- Patrick McElhaney 704.560.9117 http://pmcelhaney.weblogs.us ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
