Thanks Cameron,

I would like to set different application names, but I've had issues in the 
past.  I don't remember exactly, but I think there were some application 
variables not accessible.  What are the pros and cons for using separate 
application names?  Are there any caveats I should be aware of if I decide to 
use separate application names?

Donnie


>Assuming that both App.cfc files share the same Application name, it's
>really all one "application" regardless of which fires first. So you aren't
>really getting much benefit from what it sounds like you are trying to do,
>unless App.cfc is doing some other things too.
>
>A few ways you could do this. Here are some ideas:
>
>1) Use some sort of BeanFactory/Parent SubFactories to populate these
>beans. DI/1 is a good one...
>
>https://github.com/framework-one/di1
>
>2) You could pull out some of the Application.cfc code and abstract it into
>other files. Then you have the option to include things your IRV needs or
>not, without extending. Mura CMS does this. Start at line 48/67/79 here to
>see a few examples of how:
>
>https://github.com/blueriver/MuraCMS/blob/develop/Application.cfc
>
>3) I've used a very lightweight SingletonFactory.cfc before to create files
>on demand. This is similar to some things DI/1 does but super dumbed down
>and without the Dependency Injection part. you ask it for a CFC and it
>optionally creates it if needed and stores it in the application scope. If
>it's already in Application scope it just returns it.
>
>A quick example is here:
>
>https://gist.github.com/cameroncf/10487348
>
>You call it something like this:
>
>ivrSettings = createObject('component','path.to.model.SingletonFactory')
>                      .init()
>                      .getObject('path.to.model.IVR.Settings');
>
>You can obviously abstract out some of that init code but that's
>essentially how it's used in a one line example.
>
>-Cameron
>
>-- 
>Cameron Childress
>--
>p:   678.637.5072
>im: cameroncf
>facebook <http://www.facebook.com/cameroncf> |
>twitter<http://twitter.com/cameronc> |
>google+ <https://profiles.google.com/u/0/117829379451708140985> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358324
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to