Yeah, while I am using this method, I realized after I posted this that this
probably wasn't a good use for this technique.
I am using this technique of passing the parent to the child as a form of an
app manager. The parent being the app manager. And by passing a reference
of the parent to the participating child app, the child app can ask teh
parent for the right service. Like I have a VendorManager as a app manager
for a CRM system. VendorManager has methods such as getUserService and
getCatalogService and getTerritoryService. So if the territory app wants to
get details about a user from the user app, it asks its compositional parent
to return teh right service to it.
Does this seem a more valid reason to use this technique?
----- Original Message -----
From: "Sean A Corfield" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 15, 2003 9:28 PM
Subject: Re: [CFCDev] BO/DAO/Manager CFC's and Inheritance
> On Dec 15, 2003, at 3:56 PM, Gabriel Roffman wrote:
> > That sounds fine. How would you relate the different managers? What
> > I've
> > done lately is when I init the main manager, I init its child managers
> > and
> > pass a reference of the parent to the child. As in...
> >
> > articleManager.cfc
> > <cffunction name="init">
> > <cfset variables.JournalManager = createObject("component",
> > "JournalManager").init(this)>
> > </cffunction>
>
> The problem with this is that you are tying know of children into the
> parent. Article is generic but you are forcing the ArticleManager to
> know about Article's children. I'd recommend refactoring your code to
> avoid that dependency!
>
> Sean A Corfield -- http://www.corfield.org/blog/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
> in the message of the email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
>
> An archive of the CFCDev list is available at
www.mail-archive.com/[EMAIL PROTECTED]
>
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]