Aidan Whitehall wrote:
> 
> > In essence, refering to variables outside the scope of a tag
> > is analogous to using global variables in other languages, something
> > that was frowned upon in the books I read and the courses I took.
> > The proper way, then, would be to explicitly pass all necessary
> > parameters to a tag, and eliminate the uncertainty.
> 
> ....and double your workload.
> 
> Well, OK... maybe that's a slight exaggeration    ;-)

  Well, theoretically, if you rely on global variables, your 
tags have limited re-use, because that global variable needs 
to be defined before you call it.
  If you do all your work in-house development shop, you are in 
essence building a 'library' of code that can be re-used for 
other projects for your company.

  If you are a consultant, then you probably do not own the code 
you are writing.  You cannot jump from 'project to project' and take 
your code with you.  However, as a consultant, aren't they paying you
to 'do it right'?  Presumably someone down the line can re-use your 
code even if it isn't you.

  The one remaining thing I have to say on the subject is to make 
sure you do not use global (application) variables as a replacement 
for local (instance) variables.
  Back in them there school days, a teacher once told us that once 
we get out into the real world we'll find that most people will code 
using global variables because they don't understand how to use local 
variables.  (That has not been the case in most instances, thank god)

-- 
Jeff Houser | mailto:[EMAIL PROTECTED]
AIM: Reboog711  | ICQ: 5246969 | Phone: 860-229-2781
--
Instant Cold Fusion 4.5  | ISBN: 0-07-213238-8   
Due out 3rd Quarter 2001
--
DotComIt, LLC
database driven web data using ColdFusion, Lotus Notes/Domino
--
Half of the Alternative Folk Acoustic Duo called Far Cry Fly 
http://www.farcryfly.com | http://www.mp3.com/FarCryFly
--
Promise me no dead end streets, and I'll guarantee we'll have a road

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        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