Hey Andy,

In the case of an association like this (cfc1 uses cfc2), I'd try to
make cfc2 a property of cfc1 that's settable.  I.e., if there was
application.userManager that needed to make use of
application.DAOFactory, I'd have a setDAOFactory() method on the
userManager that told it what DAOFactory to use, so that it remained
encapsulated.

-Joe


On 6/1/05, Andy Jarrett <[EMAIL PROTECTED]> wrote:
> Hi there,
> 
> I have several CFC's in my app which i init into the application scope.
> 
> e.g. application.mycfc1 and application.mycfc2
> 
> If i want a method from mycfc1 from mycfc2 then i use the following code
> 
> <cfset usersName = application.myCFC2.getUsersName(id) />
> 
> I just wanted to check this is a good way of doing this? or is there
> another i.e. with out going to the application scope?
> 
> Cheers
> 
> Andy J
> 
> 
> ----------------------------------------------------------
> 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).
> 
> CFCDev is supported by New Atlanta, makers of BlueDragon
> http://www.newatlanta.com/products/bluedragon/index.cfm
> 
> An archive of the CFCDev list is available at 
> www.mail-archive.com/[email protected]
> 
> 
> 


-- 
Get Glued!
The Model-Glue ColdFusion Framework
http://www.model-glue.com


----------------------------------------------------------
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).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to