<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
	>
<channel>
	<title>Comments on: We Don’t Need No Stinkin’ Singletons: Why to Avoid the Singleton Pattern in ActionScript 3.0 Programming</title>
	<atom:link href="http://www.as3dp.com/2008/11/26/we-don%e2%80%99t-need-no-stinkin%e2%80%99-singletons-why-to-avoid-the-singleton-pattern-in-actionscript-30-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.as3dp.com/2008/11/26/we-don%e2%80%99t-need-no-stinkin%e2%80%99-singletons-why-to-avoid-the-singleton-pattern-in-actionscript-30-programming/</link>
	<description>OOP Techniques for Flash and Flex Developers</description>
	<lastBuildDate>Wed, 10 Mar 2010 17:32:01 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: AS3 Design anti-Pattern, Singleton, 反对……单态模式（单件，单例）</title>
		<link>http://www.as3dp.com/2008/11/26/we-don%e2%80%99t-need-no-stinkin%e2%80%99-singletons-why-to-avoid-the-singleton-pattern-in-actionscript-30-programming/comment-page-1/#comment-1871</link>
		<dc:creator>AS3 Design anti-Pattern, Singleton, 反对……单态模式（单件，单例）</dc:creator>
		<pubDate>Tue, 24 Mar 2009 12:11:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=299#comment-1871</guid>
		<description>[...] We Don’t Need No Stinkin’ Singletons: Why to Avoid the Singleton Pattern in ActionScript 3.0 Pro... Any attempt to improve the Singleton is like making the black mamba more deadly. The point is not to improve it but to avoid it. [...]</description>
		<content:encoded><![CDATA[<p>[...] We Don’t Need No Stinkin’ Singletons: Why to Avoid the Singleton Pattern in ActionScript 3.0 Pro&#8230; Any attempt to improve the Singleton is like making the black mamba more deadly. The point is not to improve it but to avoid it. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The much dreaded Singleton at Controul</title>
		<link>http://www.as3dp.com/2008/11/26/we-don%e2%80%99t-need-no-stinkin%e2%80%99-singletons-why-to-avoid-the-singleton-pattern-in-actionscript-30-programming/comment-page-1/#comment-1715</link>
		<dc:creator>The much dreaded Singleton at Controul</dc:creator>
		<pubDate>Fri, 27 Feb 2009 04:48:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=299#comment-1715</guid>
		<description>[...] it&#8217;s almost scary. Singletons are crucified all over the place, and whilst there are very sound theoretical reasons to avoid abusing the pattern, we all know that Singletons are rather useful in everyday [...]</description>
		<content:encoded><![CDATA[<p>[...] it&#8217;s almost scary. Singletons are crucified all over the place, and whilst there are very sound theoretical reasons to avoid abusing the pattern, we all know that Singletons are rather useful in everyday [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Sanders</title>
		<link>http://www.as3dp.com/2008/11/26/we-don%e2%80%99t-need-no-stinkin%e2%80%99-singletons-why-to-avoid-the-singleton-pattern-in-actionscript-30-programming/comment-page-1/#comment-926</link>
		<dc:creator>Bill Sanders</dc:creator>
		<pubDate>Fri, 05 Dec 2008 21:04:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=299#comment-926</guid>
		<description>Hi Gavin,

The design patterns in GoF hardly hang on the Singleton. (Keep in mind that &#039;singleton&#039; is a single instance of a class (no problem), and &#039;Singleton&#039; is the design pattern.) Assuming that you&#039;re referring to the Singleton design pattern, the problem centers around the global nature of the design as noted.

Rather than using the Singleton, my key focus is on the Client. Some of the design patterns include the Client as part of the design and others include it as implied (such as the Visitor which I&#039;m currently working on.) Still others give no clue in the class diagram where the Client sends initial requests. However, for me the key connection is the relationship between the Client and the design pattern and a Singleton simply causes problem. I&#039;ve added a diagram at the bottom on the original post to show my thinking on the issue.

Thank you for bringing up this issue. It was one of the many that led to my own head scratching concerning the Singleton.

Kindest regards,
Bill

</description>
		<content:encoded><![CDATA[<p>Hi Gavin,</p>
<p>The design patterns in GoF hardly hang on the Singleton. (Keep in mind that &#8217;singleton&#8217; is a single instance of a class (no problem), and &#8216;Singleton&#8217; is the design pattern.) Assuming that you&#8217;re referring to the Singleton design pattern, the problem centers around the global nature of the design as noted.</p>
<p>Rather than using the Singleton, my key focus is on the Client. Some of the design patterns include the Client as part of the design and others include it as implied (such as the Visitor which I&#8217;m currently working on.) Still others give no clue in the class diagram where the Client sends initial requests. However, for me the key connection is the relationship between the Client and the design pattern and a Singleton simply causes problem. I&#8217;ve added a diagram at the bottom on the original post to show my thinking on the issue.</p>
<p>Thank you for bringing up this issue. It was one of the many that led to my own head scratching concerning the Singleton.</p>
<p>Kindest regards,<br />
Bill</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: localToGlobal &#187; Blog Archive &#187; news review -&#62; 48th week of 2008</title>
		<link>http://www.as3dp.com/2008/11/26/we-don%e2%80%99t-need-no-stinkin%e2%80%99-singletons-why-to-avoid-the-singleton-pattern-in-actionscript-30-programming/comment-page-1/#comment-924</link>
		<dc:creator>localToGlobal &#187; Blog Archive &#187; news review -&#62; 48th week of 2008</dc:creator>
		<pubDate>Fri, 05 Dec 2008 15:07:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=299#comment-924</guid>
		<description>[...] &gt; We Don’t Need No Stinkin’ Singletons:Why to Avoid the Singleton Pattern in ActionScript 3.0... [...]</description>
		<content:encoded><![CDATA[<p>[...] &gt; We Don’t Need No Stinkin’ Singletons:Why to Avoid the Singleton Pattern in ActionScript 3.0&#8230; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gavin</title>
		<link>http://www.as3dp.com/2008/11/26/we-don%e2%80%99t-need-no-stinkin%e2%80%99-singletons-why-to-avoid-the-singleton-pattern-in-actionscript-30-programming/comment-page-1/#comment-923</link>
		<dc:creator>Gavin</dc:creator>
		<pubDate>Fri, 05 Dec 2008 11:36:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=299#comment-923</guid>
		<description>I am still not clear on what the alternative is to a singleton. You could use statics but that makes the problem even worse because you can inherit/override a singleton&#039;s members. What implications does this have for something like the facade? Also a domain wide single point of entry and not responsible for state, a singleton feels like the logical choice here ... I am still confused as to exactly why this is bad and I see it impacting greatly on how we should approach GoF based patterns in general. What are your thoughts on this?</description>
		<content:encoded><![CDATA[<p>I am still not clear on what the alternative is to a singleton. You could use statics but that makes the problem even worse because you can inherit/override a singleton&#8217;s members. What implications does this have for something like the facade? Also a domain wide single point of entry and not responsible for state, a singleton feels like the logical choice here &#8230; I am still confused as to exactly why this is bad and I see it impacting greatly on how we should approach GoF based patterns in general. What are your thoughts on this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Sanders</title>
		<link>http://www.as3dp.com/2008/11/26/we-don%e2%80%99t-need-no-stinkin%e2%80%99-singletons-why-to-avoid-the-singleton-pattern-in-actionscript-30-programming/comment-page-1/#comment-921</link>
		<dc:creator>Bill Sanders</dc:creator>
		<pubDate>Thu, 04 Dec 2008 18:39:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=299#comment-921</guid>
		<description>Hi Nick,

I&#039;m glad to hear the post was helpful. Right now I&#039;m working on the Visitor pattern, and it is a nice return to a pattern that is very helpful and intriguing at the same time.

Take care,
Bill</description>
		<content:encoded><![CDATA[<p>Hi Nick,</p>
<p>I&#8217;m glad to hear the post was helpful. Right now I&#8217;m working on the Visitor pattern, and it is a nice return to a pattern that is very helpful and intriguing at the same time.</p>
<p>Take care,<br />
Bill</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Wiggill</title>
		<link>http://www.as3dp.com/2008/11/26/we-don%e2%80%99t-need-no-stinkin%e2%80%99-singletons-why-to-avoid-the-singleton-pattern-in-actionscript-30-programming/comment-page-1/#comment-920</link>
		<dc:creator>Nick Wiggill</dc:creator>
		<pubDate>Thu, 04 Dec 2008 15:53:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=299#comment-920</guid>
		<description>Bill,

Excellent article.

I decided not to use Singletons a while back due to the inelegance and all the attached problems these AS3 &quot;workarounds&quot; create. But I had still not entirely made up my mind about them and probably would have gone back to trying to use them again.

Frankly, it&#039;s a load off my mind to get some very solid reasons as to why not to use them -- with the static variables simile being the solid rock at the core of your argument, IMO.

Thanks for sharing.</description>
		<content:encoded><![CDATA[<p>Bill,</p>
<p>Excellent article.</p>
<p>I decided not to use Singletons a while back due to the inelegance and all the attached problems these AS3 &#8220;workarounds&#8221; create. But I had still not entirely made up my mind about them and probably would have gone back to trying to use them again.</p>
<p>Frankly, it&#8217;s a load off my mind to get some very solid reasons as to why not to use them &#8212; with the static variables simile being the solid rock at the core of your argument, IMO.</p>
<p>Thanks for sharing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Sanders</title>
		<link>http://www.as3dp.com/2008/11/26/we-don%e2%80%99t-need-no-stinkin%e2%80%99-singletons-why-to-avoid-the-singleton-pattern-in-actionscript-30-programming/comment-page-1/#comment-915</link>
		<dc:creator>Bill Sanders</dc:creator>
		<pubDate>Sat, 29 Nov 2008 10:35:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=299#comment-915</guid>
		<description>Hi Tyler,

I suppose it&#039;s easier to think of using global variables instead of a Singleton. Had I suggested we never use global variables, I doubt that anyone would have cared. It would be one of those &lt;em&gt;tell us something we don&#039;t know&lt;/em&gt; reactions. Because the Singleton is a global variable wrapped in a design pattern, we tend to get riled up.

I&#039;m glad the post makes sense to you. Thanks for participating in the discussion.

Kindest regards,
Bill</description>
		<content:encoded><![CDATA[<p>Hi Tyler,</p>
<p>I suppose it&#8217;s easier to think of using global variables instead of a Singleton. Had I suggested we never use global variables, I doubt that anyone would have cared. It would be one of those <em>tell us something we don&#8217;t know</em> reactions. Because the Singleton is a global variable wrapped in a design pattern, we tend to get riled up.</p>
<p>I&#8217;m glad the post makes sense to you. Thanks for participating in the discussion.</p>
<p>Kindest regards,<br />
Bill</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Sanders</title>
		<link>http://www.as3dp.com/2008/11/26/we-don%e2%80%99t-need-no-stinkin%e2%80%99-singletons-why-to-avoid-the-singleton-pattern-in-actionscript-30-programming/comment-page-1/#comment-914</link>
		<dc:creator>Bill Sanders</dc:creator>
		<pubDate>Sat, 29 Nov 2008 10:20:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=299#comment-914</guid>
		<description>Hi Arjan,

Don&#039;t feel bad about still learning best practices in OOP. As soon as I stop learning, it&#039;s not going to be fun any more. (And I plan on a lot more fun!)

Many developers have the same question that you have: If not a Singleton, then what? Miško Hevery has a good article on that question and provides answers. Take a look at:

http://misko.hevery.com/2008/08/21/where-have-all-the-singletons-gone/

It doesn&#039;t specifically address a manager class, but it does address similar issues.

Take care,
Bill</description>
		<content:encoded><![CDATA[<p>Hi Arjan,</p>
<p>Don&#8217;t feel bad about still learning best practices in OOP. As soon as I stop learning, it&#8217;s not going to be fun any more. (And I plan on a lot more fun!)</p>
<p>Many developers have the same question that you have: If not a Singleton, then what? Miško Hevery has a good article on that question and provides answers. Take a look at:</p>
<p><a href="http://misko.hevery.com/2008/08/21/where-have-all-the-singletons-gone/" rel="nofollow">http://misko.hevery.com/2008/08/21/where-have-all-the-singletons-gone/</a></p>
<p>It doesn&#8217;t specifically address a manager class, but it does address similar issues.</p>
<p>Take care,<br />
Bill</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tyler Egeto</title>
		<link>http://www.as3dp.com/2008/11/26/we-don%e2%80%99t-need-no-stinkin%e2%80%99-singletons-why-to-avoid-the-singleton-pattern-in-actionscript-30-programming/comment-page-1/#comment-913</link>
		<dc:creator>Tyler Egeto</dc:creator>
		<pubDate>Fri, 28 Nov 2008 17:07:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=299#comment-913</guid>
		<description>Very good read. I&#039;ve never thought about it before, but your reasoning, and the facts presented in the other linked articles makes perfect sense. I often use one singleton in most large applications to manage the current state, but that definitely has a large coupling effect.Good food for thought, thanks!</description>
		<content:encoded><![CDATA[<p>Very good read. I&#8217;ve never thought about it before, but your reasoning, and the facts presented in the other linked articles makes perfect sense. I often use one singleton in most large applications to manage the current state, but that definitely has a large coupling effect.Good food for thought, thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
