Joe that seems a good  point.  One that had slipped by me until now.  

is there a shorthand way to pass the datasaource name to CFCs or do
you have to include the datasource name as one of the arguments every
time you instantiate a CFC?

Cheers
Mike Kear
Windsor, NSW, Australia
AFP Webworks
http://afpwebworks.com
.com,.net,.org domains from AUD$20/Year






On Sat, 30 Oct 2004 08:50:24 -0400, Joe Rinehart <[EMAIL PROTECTED]> wrote:
> Mike,
> 
> It can be referenced fine from within the CFC, but it's probably not a
> good idea.  A CFC shouldn't "reach out" to external data, but instead
> be told what it needs to know.  Doing otherwise breaks what's known as
> 'encapsulation' in the OOP world.  Basically, it lowers the
> reusability of your CFC:  what if you were migrating between two
> databases, your CFC had a perfect method to talk to both, and you
> wanted to instantiate two instances pointed at two different
> datasources?
> 
> Cheers,
> 
> Joe
> 
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF 
community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=35

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183028
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to