> We're moving from application.cfm to application.cfc and I had a question > regarding best practices. > We re-use our base code and in the past, we have used a settings page that > is external from the base code and unique per client to set the > applicationname variable (and other variables). This is called at the > beginning of application.cfm and provides <cfapplication> with the unique > application name. > That same structure seems to work with application.cfc but requires calling > a file at the top of application.cfc, above setting the application > variables in application.cfc, to provide the applicationname. > Is that approach (calling a file at the top of application.cfc to provide a > unique client setting) considered a best practice for this kind of thing. > Or, is there a more appropriate way? > The only other thing I could think of would be to hard code the unique > client applicationname in Application.cfc, but that would then require that > Application.cfc be a unique file per client and thus not part of our core > base code in the sense that we wouldn't include it in upgrades (so that it > wouldn't over-write a unique client file with default values).
I think the most common approach for this sort of thing with Application.cfc is to use inheritance. You can have a base Application.cfc, then use the EXTENDS attribute to create a new Application.cfc with customized settings, overridden event handlers, etc. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:352899 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

