<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Naming CFC Instance Variables</title>
	<atom:link href="http://www.barneyb.com/barneyblog/2005/06/19/naming-cfc-instance-variables/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.barneyb.com/barneyblog/2005/06/19/naming-cfc-instance-variables/</link>
	<description>Thoughts, rants, and even some code from the mind of Barney Boisvert.</description>
	<lastBuildDate>Thu, 11 Sep 2014 09:58:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Barney</title>
		<link>https://www.barneyb.com/barneyblog/2005/06/19/naming-cfc-instance-variables/comment-page-1/#comment-140</link>
		<dc:creator>Barney</dc:creator>
		<pubDate>Tue, 21 Jun 2005 14:13:29 +0000</pubDate>
		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=99#comment-140</guid>
		<description>Whoops.  You&#039;re correct, of course, Sean.  CFPROPERTY should be used to document variables in the &#039;this&#039; scope.  I was completely off base on that one, and can offer no excuse other than I might have been tired.
</description>
		<content:encoded><![CDATA[<p>Whoops.  You're correct, of course, Sean.  CFPROPERTY should be used to document variables in the 'this' scope.  I was completely off base on that one, and can offer no excuse other than I might have been tired.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Corfield</title>
		<link>https://www.barneyb.com/barneyblog/2005/06/19/naming-cfc-instance-variables/comment-page-1/#comment-139</link>
		<dc:creator>Sean Corfield</dc:creator>
		<pubDate>Tue, 21 Jun 2005 00:24:20 +0000</pubDate>
		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=99#comment-139</guid>
		<description>&quot;you should never put anything directly into the &#039;variables&#039; scope in a CFC except public data fields that are clearly documented with CFPROPERTY&quot;

I totally disagree with that. First off, &#039;variables&#039; scope is protected, not public. Using CFPROPERTY to document non-public data is also very misleading. CFPROPERTY is supposed to be used for public data fields in a CFC that acts as a return type in a web service. That&#039;s it.

What I would suggest is that if you are writing a CFC that you expect people to extend, you need to think very carefully about what you put in the (protected) &#039;variables&#039; scope since it will be visible to any CFCs that extend yours.

Using variables.my.* or variables.instance.* is a good idea since it will separate the data space form the function space.</description>
		<content:encoded><![CDATA[<p>"you should never put anything directly into the 'variables' scope in a CFC except public data fields that are clearly documented with CFPROPERTY"</p>
<p>I totally disagree with that. First off, 'variables' scope is protected, not public. Using CFPROPERTY to document non-public data is also very misleading. CFPROPERTY is supposed to be used for public data fields in a CFC that acts as a return type in a web service. That's it.</p>
<p>What I would suggest is that if you are writing a CFC that you expect people to extend, you need to think very carefully about what you put in the (protected) 'variables' scope since it will be visible to any CFCs that extend yours.</p>
<p>Using variables.my.* or variables.instance.* is a good idea since it will separate the data space form the function space.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barney</title>
		<link>https://www.barneyb.com/barneyblog/2005/06/19/naming-cfc-instance-variables/comment-page-1/#comment-138</link>
		<dc:creator>Barney</dc:creator>
		<pubDate>Mon, 20 Jun 2005 15:09:47 +0000</pubDate>
		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=99#comment-138</guid>
		<description>Yeah, I do the same thing.  ;)  It&#039;s &quot;slidable&quot; if you&#039;re the sole user of your component, because you control both sides, and can manipulate either one to rectify any collisions.  But if you&#039;re distributing your code, that&#039;s no longer the case, so you have to be extra careful to not give your end users trouble.</description>
		<content:encoded><![CDATA[<p>Yeah, I do the same thing.  ;)  It's "slidable" if you're the sole user of your component, because you control both sides, and can manipulate either one to rectify any collisions.  But if you're distributing your code, that's no longer the case, so you have to be extra careful to not give your end users trouble.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Rinehart</title>
		<link>https://www.barneyb.com/barneyblog/2005/06/19/naming-cfc-instance-variables/comment-page-1/#comment-137</link>
		<dc:creator>Joe Rinehart</dc:creator>
		<pubDate>Mon, 20 Jun 2005 12:31:53 +0000</pubDate>
		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=99#comment-137</guid>
		<description>Hey Barney,

I&#039;m not sure I 100% agree.

While I agree that it&#039;s definitely a best practice to put instance data into a specific &quot;scope&quot;, such as variables.instance, there are times when a component has members that aren&#039;t necessarily parts of its instance or state.  I&#039;ve both put these directly into variables and put them in another &#039;special&#039; scope.</description>
		<content:encoded><![CDATA[<p>Hey Barney,</p>
<p>I'm not sure I 100% agree.</p>
<p>While I agree that it's definitely a best practice to put instance data into a specific "scope", such as variables.instance, there are times when a component has members that aren't necessarily parts of its instance or state.  I've both put these directly into variables and put them in another 'special' scope.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
