Loading site configuration from ini file I load in static setting via an ini file. Ini file have the benefits


of NOT being server by most web servers by default. 
easier to edit than XML
even simplier than JSON


Setting get loaded in Application.cfc

void function setupApplication() output="false" {
... 
application.stAdminSetting  = application.loadini("admin\standard.ini");
...
}


Application.cfc has this as a function...

&lt;cffunction name="loadini" output="false" returnType="struct"&gt;
&lt;cfargument name="configfile" required="true" type="string" hint="reads from currentTemplate"&gt;


&lt;cfscript&gt;
var stResult = {};

var iniFilePath = "#GetDirectoryFromPath(GetBaseTemplatePath())##arguments.configfile#";
var stSection = getProfileSections(iniFilePath);


for(var section in stSection)   {

    var CurrentSection = evaluate("stSection.#section#");   

    var stData = {};

    for(var i = 1; i &lt;= ListLen(CurrentSection); i++)   {
        var key = ListGetAt(CurrentSection, i);

        stData[key] = getProfileString(iniFilePath, section, key);

        }

    setvariable("stResult.#section#", stData);
    }


return stResult;    
&lt;/cfscript&gt;
&lt;/cffunction&gt;


The ini file can have any number of setting. In particular my ini file has:

[ws]
comment=http://xxxxx.com/resource/comment.cfc?wsdl
ior=http://xxxxx.com/resource/ior.cfc?wsdl
node=http://xxxxx.com/resource/node.cfc?wsdl
pref=http://xxxxx.com/resource/pref.cfc?wsdl
traffic=http://xxxxx.com/resource/traffic.cfc?wsdl


What kinds of things can I do to improve this?
What kind of things are you looking to improve? Your solution looks pretty straightforward. The only problem with an ini file is that ColdFusion can't instantly/natively parse it. Whereas XML/JSON can be parsed directly into a Coldfusion Struct.

&lt;cfscript&gt;
public struct function loadini( required string configFile) {
    var stResult = {};
    var iniFilePath = "#GetDirectoryFromPath(GetBaseTemplatePath())##arguments.configfile#";
    var stSection = getProfileSections(iniFilePath);

    // loop over the sections
     for (section in stSection) {
        // loop over the list of variables in the ini file
        for (var i=0;i&lt;=listLen(stSection[section]);i++) {
            // result.section.variable = value 
            stResult[section][listGetAt(stSection[section],i)] = GetProfileString(iniFilePath, section, listGetAt(stSection[section],i) ) ;
        }
     }
    return stResult;        
}
&lt;/cfscript&gt;

&lt;cfdump var="#loadini('test.ini')#"&gt;