> > In the Macromedia Press/Ben Forta Advanced ColdFusion MX
> > book, he has a fair amount of text and examples related to
> > the usage of the THIS scope (chapter 17).  I was just curious
> > what the rationale was back then when that was written (my
> > copy is copyright 2003) to show examples related to THIS, but
> > almost no examples of what is commonly known today to be best
> > practice (variables scope, et al).  Was that just plain
> > 'wrong' in the book, was it wishful thinking, or has CFMX
> > changed to where that was right then but wrong now?
>
> It was never right. However, I suspect that this wasn't given so much
> thought at the time, since most CF developers had little or no experience
> with OO.

Before the 6.1 upgrade the variables scope was broken, being directely
accessible from outside the CFC (a common workaround was to use the
"unnamed" scope instead). Maybe this issue played a role as well at the time
of writing.



> One should never ascribe the word of God to the hand of man for exactly
this
> reason. In any case, the official MM courseware takes the same tack, so
> everytime it's taught we have to spend quite a bit of time talking about
why
> public member variables are bad.

Same for the CFML/HTML version of the Pet Market. Actually, you can even
spot quite a bunch of missing "var" inside methods there. It's a shame,
since there are other aspects of it that I fund interesting.

----------------------------
Massimo Foti
DW tools: http://www.massimocorner.com
CF tools:  http://www.olimpo.ch/tmt/
----------------------------



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at 
[EMAIL PROTECTED]

Reply via email to