There are lots of ways you can configuration an application. You can define server, application, or request variables in your Application.cfm file; you can load an external XML file; you can use an INI, or initialization, style file; you can store you application’s configuration parameters in a database (although often, configuration data contains data source information, so that’s a bit like locking your keys in your car). You can even try to dynamically determine your configuration based on your environment.
I find myself using a little of everything. Primarily, I use the
init custom tag from DRK 3 and put configuration in my Application.cfm file. I actually like using code to express my application’s configuration as opposed to text formats like INI or XML because code is more flexible and often less verbose. If it gets out of control and I want to externalize huge lists of things like products or countries or something, I will use an XML file or store them in a database table, depending on how dynamic I need them to be, and whether I have time to build an interface for editing the information in the database, which I usually don’t.
What techniques to you use in different circumstances, and why?