Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Re: Is it just me or are this.mappings acting funny?

$
0
0

@Carl-

 

I guess in the desire to build an automated application (cause let's be honest, how cool is it when you have a config file that controls how the application inits, am I right?), it seems you are where I might be heading.  I just didn't want to have to resort to static simplicity due to the fact that I couldn't comprehend a built-in function or how ColdFusion's mapping worked.

 

I did consider the performance hit from doing the XML parsing every route.  In my application, after the initial heavy load of the startup, on each request, the pseudo runs a:

 

Config.processAppPseudo()

 

This iterates over a private structure variable in the object that contains all the key/value pairs (previously pulled from XML) and simply executes a <cfset structInsert( this, keyName, keyValue, true ) /> in a loop.  It's overhead, but an acceptable level I feel.  And if need be, I could have part of the startup BUILD a file dynamically created that has all the this-scope declarations.  To me, I just wanted any automated solution that did not resort in me hard-coding the variables.


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>