Out of interest,  'dacrau'  is that a translation of my username itndac?
Or david?


I agree now, I guess that I had read somewhere about leaving them
unscoped and remembered having done it for search forms for URL and FORM
submission this way...


Your last point about the order of the scopes is pretty succinct and
should be preached to all CF'ers as it pretty clearly sets out why you
should 99.9% of the time *always* use scopes


In my defence, please excuse me, I'm a convert from classic ASP and
sometimes the bad practices learned there seep into my CF stuff.... :-)


-dc

-----Original Message-----
From: Ubqtous [mailto:[EMAIL PROTECTED]
Sent: 13 November 2003 15:11
To: CF-Talk
Subject: Re: Best Practices


d,

On 11/13/2003 at 09:37, you wrote:

dacrau> sometimes better not to scope (admittedly not very
often)....


dacrau> i.e. a search form where parameters can come in either
the URL
dacrau> or FORM scope... what do you do... scope them out and
have
dacrau> double the coding work?


dacrau> what would be the best practice in that case?

I prefer to know which scope is providing a given value, so if I
had
to deal with allowing both scopes to affect the same code, I'd
use
something simple to check URL and FORM and assign a common local
variable accordingly.

Since URL and FORM are (or were last time I checked) 5th and 6th
in
the order of evaluation, I guess it's a matter of determining if
a few
lines of code to check each scope and assign a local variable
accordingly is better than making the server check scopes 1-4 on
each
request.

~ Ubqtous ~

  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to