You can also have a settings CFC that's accessible to both apps. You can 
"hard code" the needed vars in the settings cfc as variables, but allow them 
to be overwritten on initialization and then require an instance of the 
settings cfc for each of your other cfcs. When I do this, I place the 
settings cfc in the application scope, and then just pass that to each of 
the cfcs that need settings info.

We've also done it with an ini file. When we read the ini file, we set the 
vars to the application scope, so we only need to read the ini file once. 
Then, we pass them to whatever other files need them. (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?

On 9/18/05, dave <[EMAIL PROTECTED]> wrote:
> 
> well heres why I ask
> I havent found a good way to pull in mainly application vars like dsn, 
> username & passwords that consistantly work.
> and I am working on 2 sites right now that basically are the same, one 
> uses part of the products, the other uses the rest of it (these will be 2 
> diff urls) but all the info will be shared exactly (same datasource, db, 
> email addies blah blah blah) and will be controlled by only the one main 
> site.
> So I want to use the xml file to contain all the config data.
> I was looking at galleons to see how ray does it but it's a bit confusing 
> to me.
> 
> Just trying to find the best way to do this, it isnt a m$ program, I don't 
> want it hacked to death to work right ;)~
> 
> But a decent way so I can control a few items without having to do it 
> manually on each cfc.
> 
> so a few diff ways to do this see so whats the best?
> 
> main concerns, run the xml to get the info into application vars
> 
> create the object to run it
> 
> calling it on the page
> 
> thanks :)
> 
> 
> 
> 
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:218613
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