I can't agree with the statement "goes without saying" as too often I have
to say it.  I have seen so many bad implementations of CFC that clobber
variables left right and centre that it really annoys me and ,
disappointingly it is allowed in the language.

I have taken over projects that I have cringed a the code because of really
bad practises and some really dumb thing being done in CFCs so I tend to be
of the opinion that it is always better to repeat it .  But yes,  more so
for new programmers so that they get into good habits

Cheers,
Simon

On 04/06/07, Andrew Scott <[EMAIL PROTECTED]> wrote:
>
> Simon CFC's go without saying, as there will be problems if you do not
> scope variables with the var scope anyway. just an FYI to any new
> developers.
>
>
> On 6/4/07, Simon Haddon <[EMAIL PROTECTED]> wrote:
> >
> > Hi Grant,
> >
> > The choice is really down to your programming style.  I have come from a
> > C / Pascal / PLSQL / Java background and have learned to be very dogmatic
> > and methodical with my programming style.  As a team leader I insist that
> > all variables are either declared at the start of a template or to use
> > cfparam if expected and that logical default are set.  I find the best part
> > of this approach is that all variables are defined in 1 place and it helps
> > with referencing which variables should exist and what their default values
> > should be.  I also find that it reduces the number of variables being used
> > as you have a reference point at the top of the template to check for what
> > is available an why it exists.
> >
> > I am the same in CFCs where I expect that all arguments are defined and
> > either set to required or defaulted with a logical default value. I also
> > expect that all local variables are defined (which is even more important in
> > methods as local variables.
> >
> > Still, having said that.  Each to their own
> >
> > Cheers,
> > Simon
> >
> > On 04/06/07, grant <[EMAIL PROTECTED] > wrote:
> > >
> > > Hi All
> > >
> > > My patchy memory keeps nagging at me not to use isDefined().
> > > Am I off-base or do I remember something about it being best-practice
> > > to avoid isDefined()?
> > >
> > > Who's got the low-down?
> > > Grant
> > >
> > >
> > >
> >
> >
> > --
> > Cheers
> > Simon Haddon
> > www.aegeon.com.au
> > Phone: +613  8676 4223
> > Mobile: 0404 998 273
> > > >
> >


-- 
Cheers
Simon Haddon

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to