David,

But since you have to put locks around application variables wouldn't it be
more efficient to use a request scope variable for this.

In your application. cfm:
cfset request.backgroundcolor=whatever

Then you don't need to lock every time you need to use it.

I find that since the request scope became available I hardly ever use
application variables.

Don

----- Original Message -----
From: "David Hannum" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Saturday, June 30, 2001 8:27 AM
Subject: Re: Application Variables


> Steve,
>
> Application vars are great for controlling attributes that occasionally
> change (or frequently for that matter) that you want to affect the whole
> application.  Say you wanted to have bgcolor across your entire site
change
> according to the time of day.  You can code your application.cfm or a
> header.cfm script to <CFSET Application.BGColor = "whatevercoloryouwant">
> based on the time of day.  Then, instead of coding this in the top of each
> script,  you can simply call the #Application.BGColor# variable in each
> script, and it will automatically be what you want it to be for everyone
> calling your application.
>
> Dave
>
>
>
> ----- Original Message -----
> From: Steve Reich <[EMAIL PROTECTED]>
> To: CF-Talk <[EMAIL PROTECTED]>
> Sent: Friday, June 29, 2001 5:00 PM
> Subject: Application Variables
>
>
> > Seems basic, but I've never really addressed this. Assuming this code is
> in
> > my application.cfm file, what is the difference in these two....
> >
> > <cfset bgcolor="black">
> >
> > .....and...
> >
> > <cfset application.bgcolor="black">
> >
> > I guess I need a quick lesson on application variables. I know they are
> > included in the scope defined in the cfapplication tag, but what are
pros
> > and cons?
> >
> > I have a small dev box with only 256 RAM. I have CF 4.5 and SQL7 running
> on
> > it so as you can imagine, it's quite slow. I'm wondering how much RAM is
> > used storing application variables? Could I increase performance (albeit
> > more theoretically) by not using application vars?
> >
> > If I am looking for server performance over speed, the first one seems
the
> > way to go since it's not a persistent variable. I'm only faking it by
> > putting it in the app.cfm file. Along this line, do I even need
> application
> > variables? What's the story?
> >
> > Thanks,
> > Steve
> >
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to