[thelist] CF: Request for Opinion
Aaron Johnson
ajlist at mindseye.com
Fri Sep 6 13:25:01 CDT 2002
Hi Frank,
> I write my apps to be very modular and portable. Frequently,
> there are bits of common information to be shared among the
> apps, such as company info, addresses, contact information,
> etc., or perhaps some small bits of configuration
> information.
>
> Which in your opinion is the better choice:
>
> 1) A cached query
>
> 2) Setting the query to a struct in the application scope
>
> 3) Neither one has a significant overall advantage
> (performance/memory/elegance) over the other
>
> 4) An alternate choice
-- personally, I use a struct in request scope. My configuration
information is hierarchical, which makes it hard to store the
information in a database (databases being inherently better at storing
relational information)
If/when you move to CFMX, IMHO you *could* use web.xml to store your
configuration information, details here:
http://www.macromedia.com/v1/handlers/index.cfm?id=19399
Advantage:
a) web.xml, which lives in /WEB-INF/, is similiar to global.asa in ASP
in that it is parsed on the first hit to the web app, which means that
you're web app doesn't have to parse through a properties.cfm file
everytime.
b) it's XML!
HTH
AJ
More information about the thelist
mailing list