Will Tomlinson wrote:
> Can we please get some more input on this topic guys? I'd just like to know 
> how some of you handle these things.

Umm, we are still use ini rather than xml files but the overall 
architecture is much the same. A lot of our sites use code that dates 
back to CF 5 or even 4.5 where an ini file was the only way to go. We 
built a couple of custom tags that read and write an ini file in its 
entirety in or out of a structure. In most case that is a structure in 
the application scope called application.config. In that would be all of 
the sections of the ini file so for example you might have a structure 
called application.config.DSNs and in it would be the values for each 
DSN the site uses. Those custom tags use the Duplicate function so the 
data in the application scope is "clean". The code in the site is a tad 
more wordy as there is 'application.config.xxx" all over the place but 
we find it a small price to pay.

How that data is used in a cfc is up to the designer. We generally have 
no issue in using the application scope in a cfc, we are not overly 
dedicated to perfect OO encapsulation and the like, but if a cfc has to 
be truly self-contained then we pass in the data via a structure or 
similar, again using the duplicate function.

One trick that we do is to have the site's configuration ini file placed 
*outside* the site's code structure. The code in application.cfm that 
gathers the data "knows" where to find the ini file. This enables a much 
safer update of code for a site as there is no chance of the config data 
being copied across and promptly trashing the production site :-)

HTH

Kym K

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:218582
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to