[thelist] CF: Determining which DB used.
Raymond Camden
jedimaster at macromedia.com
Wed Sep 12 13:28:17 CDT 2001
> out of curiosity, how often do you find yourself using the
> global scopes (application, server, etc) to store data rather
> than just initializing into variables which expire at the end
> of the request? I find a vast majority of my variables are
> under a struct I call "app" or in the form or request scope.
> In those I don't have to worry about locking and they still
> seem to work. From a development standpoint it seems *much*
> quicker to have a cfinclude file that does a bunch of cfsets
> to a "local" scope instead of having to worry about locking
> all the dang time.
Like most of you, I change my development styles from time to time.
Currently, my way of doing things is like so (pseudo-code);
-----
do I need to init app vars?
if so, do it
request.app = duplicate(app);
-----
This results in a bunch of sets one time, first hit, and a duplicate
call on each hit. In theory, this is fast, and it still lets me update
app vars when I need to. To be honest, if I were only using 1-9 vars,
and they were strictly read only, I'd probably just use the request
scope.
I'm still not 100% sure I'll use this format, but it's working great for
me now.
More information about the thelist
mailing list