I won't say this is "best" by any means - however, what I like to do
lately (and you may not see this in Galleon, or BlogCFC), is simply
pass a struct to all my CFCs. The struct contains all my settings. So
my init functions in the CFCs will take one arg, a structure. That
data is copied to the Variables scope in the CFC. I make assumptions
that variables.dsn will exist, for example. I feel "ok" with making
that assumption since the app _should_ break down if that variable
didn't exist.


On 9/19/05, Will Tomlinson <[EMAIL PROTECTED]> wrote:
> (So, if we had a cfc
> >that needed username, dsn, etc, we'd require that it be passed into an init
> >function - the cfc doesn't know that the application scope exists.)
> >
> >Make sense?
> 
> Yes this makes good sense, but I think what would help most is if you could 
> show us some *REALLY* basic example code. We have no problem reading the xml 
> or ini into applications scope, but our question arises on the best method 
> for giving the data to the cfc. Trying to understand what Ray is doing with 
> galleon is just too complex for a couple of rookies. :) We need to crawl 
> first.
> 
> Thanks much,
> Will
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218643
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