Andy: You are correct that is the best practice for scoping -- though, I thought my document said the same thing ;) Can you let me know what part of my doc seemed to contradict that, so I can fix it?
In regards to returning "THIS" From your init() method -- others have pointed out the ability to do "chaining", but more specifically it makes your init() method mirror the behavior of calling "init()" on a java object instantiated in CFML (which is why we use the word "init" in the first place). - Nathan > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Andy Ousterhout > Sent: Tuesday, March 16, 2004 5:23 AM > To: [EMAIL PROTECTED] > Subject: RE: [CFCDev] RFC, CFC Best Practices > > > Nathan, > > I thought the best practices for variable naming was: > > instance.foo Private data shared that needs to stay set > for the life of > the object > var.foo Method-specific temporary variables > required only during a single > call of that method > this.foo Publicly available data, which is > discouraged. Can someone > provide case when use of THIS is recommended? > > I do not understand returning "THIS" from the init? What purpose > does this > serve? > > Andy > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Nathan Dintenfass > Sent: Monday, March 15, 2004 10:38 PM > To: [EMAIL PROTECTED] > Subject: [CFCDev] RFC, CFC Best Practices > > > I've noticed that many of the best practices talked about on this list are > not as widely known as I would have thought. What's worse, most of the > basic best practices related to CFCs are not well documented or are > documented in disparate places. > > I'm trying to capture a concise list of CFC best practices that everyone > coding CFCs should be aware of (if not follow). > > Perhaps some of y'all have comments/additions/criticisms, which > I'd welcome: > > http://www.dintenfass.com/cfcbestpractices/ > > ---------------------------------------------------------- > 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 > www.mail-archive.com/[EMAIL PROTECTED] > > > > ---------------------------------------------------------- > 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 www.mail-archive.com/[EMAIL PROTECTED] ---------------------------------------------------------- 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 www.mail-archive.com/[EMAIL PROTECTED]