i concur, the request scope is best for variables like dsn that will not
change from page to page.

ken beard
tampa,fl

-----Original Message-----
From: Douglas Brown [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 4:34 PM
To: CF-Talk
Subject: Re: What is the best variable scope?


I prefer doing like so


<cfset request.site = structNew()>
<cfset request.site.dsn = "myDsn">
<cfset request.site.title = "My title">

blah blah blah




Douglas Brown
Email: [EMAIL PROTECTED]
----- Original Message -----
From: "Alex Hubner" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, June 25, 2002 1:29 PM
Subject: What is the best variable scope?


> Dear friends,
>
> Sorry for this stupid question but I really didn't find a
consensus on
> that. What is the best variable scope to be used on
applications (not
> using Fusebox or any other methodology) that need to be
present on every
> template. Variables that we can use in the Application.cfm to
set a
> datasource name, page titles, etc. Application scope is not
consider
> because it requires the use of CFLOCK and I don't want to
remember it
> (and lock my code) everytime I need to output a datasource
name, for
> example.
>
> I use the simple Local variables (by seting it using <CFSET
var="value">
> or <CFSCRIPT> when there are many of than) but I have seen
people using
> Request.variable instead. Wich is best in terms of speedy and
safety?
>
> Thanks!
> Alex
>
>


______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to