It's an option - IF the CFC's in question are all able to extend the
same base class and IF all the CFC's that extend that base class
actually need to use the function UDF.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf
> Of Douglas Knudsen
> Sent: Wednesday, September 29, 2004 1:25 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [CFCDev] Function Libraries
> 
> what about putting these in a 'super' CFC and have your CFCs extend
it?
> 
> Doug
> 
> 
> On Wed, 29 Sep 2004 12:55:10 -0400, Brian Kotek <[EMAIL PROTECTED]>
> wrote:
> > You could also just create an instance variable that holds your UDF
CFC
> > in your init() function.
> >
> > <cffunction name="init">
> >   <cfset variables.udfObject = createObject( 'component', 'udf'
).init()
> > />
> >   <cfreturn this />
> > </cffunction>
> >
> > vs.
> >
> > <cffunction name="init">
> >   <cfargument name="udfObject" type="udf" />
> >   <cfset variables.udfObject = arguments.udfObject />
> >   <cfreturn this />
> > </cffunction>
> >
> > The answer probably depends on whether you use the UDF CFC
elsewhere.
> > If you use it elsewhere, you may want to create it elsewhere and
just
> > pass a reference to your session CFC.  If you only use it in the
session
> > CFC, you might want to initialize it within the session CFC's
> > constructor.  Either way, your session CFC would then have a data
member
> > that holds a reference to an instance of your UDF CFC.
> >
> >
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On
> > Behalf
> > > Of Jim Davis
> > > Sent: Wednesday, September 29, 2004 12:24 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: [CFCDev] Function Libraries
> > >
> > > You might instantiate the CFC into the Application scope.  You can
> > then
> > > accept the instance into your Session CFCs as a parameter to
maintain
> > the
> > > abstraction.
> > >
> > > Jim Davis
> > >
> > > > -----Original Message-----
> > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On
> > > Behalf
> > > > Of Marlon Moyer
> > > > Sent: Wednesday, September 29, 2004 12:19 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [CFCDev] Function Libraries
> > > >
> > > > I've got a CFC that contains several UDF's that I use time to
time
> > in
> > > > my session scoped CFC objects.  Right now, at the top of the
session
> > > > scoped object, I use createobject to instatiate the library.
> > Looking
> > > > back at it now, it seems that this way is not very efficient,
but
> > > > storing the library in an application scope and referencing it
via
> > > > applications vars seems to be bad design also.  What other ways
> > might
> > > > I do this?
> > >
> > >
> > >
> > >
> > > ----------------------------------------------------------
> > > 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]
> >
> 
> 
> 
> --
> Douglas Knudsen
> http://www.cubicleman.com
> this is my signature, like it?
> ----------------------------------------------------------
> 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]

Reply via email to