The primary advantage of using REQUEST scoped variables is the freedom from
locking everything, as with APPLICATION and SESSION variables.

Steve

-----Original Message-----
From: stas [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 29, 2001 4:05 PM
To: CF-Talk
Subject: Re: Request vs application scope


Isn't it a bit illogical to use request scope for storing constants if they
can be overwritten? I understand that there is no sense in doing <cfif
isdefined("request.myvar")....> as the variable will be destroyed no matter
what, so you have to always re-initialize it. Does that carry more or less
penalty than checking for existence of an application scope variable with
isdefined()?


----- Original Message -----
From: "Dave Watts" <[EMAIL PROTECTED]>


> Brilliant! So what's the downside? The variables are not
> persistent across pages are they?

Request variables aren't persistent across pages, as Session, Application
and Server variables are. However, you're using them in Application.cfm, so
they'll be available on every page. They'll simply be recreated for every
page. Since you're using them as constants, there isn't really any downside
to using them.

Dave Watts, CTO, Fig Leaf Software
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to