<?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: ActionScript 3.0 Design Pattern Contest: The Golden Lunch Bucket Awards!</title>
	<atom:link href="http://www.as3dp.com/2009/04/25/actionscript-30-design-pattern-contest-the-golden-lunch-bucket-awards/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.as3dp.com/2009/04/25/actionscript-30-design-pattern-contest-the-golden-lunch-bucket-awards/</link>
	<description>OOP Techniques for Flash and Flex Developers</description>
	<lastBuildDate>Mon, 26 Jul 2010 13:40:37 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Marcel</title>
		<link>http://www.as3dp.com/2009/04/25/actionscript-30-design-pattern-contest-the-golden-lunch-bucket-awards/comment-page-1/#comment-2302</link>
		<dc:creator>Marcel</dc:creator>
		<pubDate>Mon, 04 May 2009 23:30:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=880#comment-2302</guid>
		<description>Gotcha,  Obviously, this work is done with the client...and later in the examples the decorators are pushed into an array. Which are always easy to manipulate.  Thanks for the clarity William.  I&#039;ve read the whole book but this book must be read at least 4 times for a tortoise like me.</description>
		<content:encoded><![CDATA[<p>Gotcha,  Obviously, this work is done with the client&#8230;and later in the examples the decorators are pushed into an array. Which are always easy to manipulate.  Thanks for the clarity William.  I&#8217;ve read the whole book but this book must be read at least 4 times for a tortoise like me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: todd</title>
		<link>http://www.as3dp.com/2009/04/25/actionscript-30-design-pattern-contest-the-golden-lunch-bucket-awards/comment-page-1/#comment-2292</link>
		<dc:creator>todd</dc:creator>
		<pubDate>Sat, 02 May 2009 15:22:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=880#comment-2292</guid>
		<description>Sorry, in a UI can we add text for scorekeeping for a game?  It would&#039;t be adding and removing items, but my decorator implementation is creating a game like scenario and I wanted to keep track of a score.</description>
		<content:encoded><![CDATA[<p>Sorry, in a UI can we add text for scorekeeping for a game?  It would&#8217;t be adding and removing items, but my decorator implementation is creating a game like scenario and I wanted to keep track of a score.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: todd</title>
		<link>http://www.as3dp.com/2009/04/25/actionscript-30-design-pattern-contest-the-golden-lunch-bucket-awards/comment-page-1/#comment-2291</link>
		<dc:creator>todd</dc:creator>
		<pubDate>Sat, 02 May 2009 14:00:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=880#comment-2291</guid>
		<description>I think the clarity of the movement might have been lost because in the example the same circle was created in three different places (granted with different colors), but the places were done through the different drawing api locations.  

However, that said, it is a contest and we could have come up with this on our own.  Thanks for the helper code, it is clear.</description>
		<content:encoded><![CDATA[<p>I think the clarity of the movement might have been lost because in the example the same circle was created in three different places (granted with different colors), but the places were done through the different drawing api locations.  </p>
<p>However, that said, it is a contest and we could have come up with this on our own.  Thanks for the helper code, it is clear.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William B. Sanders</title>
		<link>http://www.as3dp.com/2009/04/25/actionscript-30-design-pattern-contest-the-golden-lunch-bucket-awards/comment-page-1/#comment-2290</link>
		<dc:creator>William B. Sanders</dc:creator>
		<pubDate>Sat, 02 May 2009 09:41:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=880#comment-2290</guid>
		<description>Hi Josh,

The little example is to show how you could create a many instances of a concrete decorator as you want and move them so that you could position them in such a way that they would not be exactly in the same position. So, you really wouldn&#039;t be modifying the concrete decorator; rather you&#039;d be placing the results in another Shape instance in a different position.

Take care,
Bil</description>
		<content:encoded><![CDATA[<p>Hi Josh,</p>
<p>The little example is to show how you could create a many instances of a concrete decorator as you want and move them so that you could position them in such a way that they would not be exactly in the same position. So, you really wouldn&#8217;t be modifying the concrete decorator; rather you&#8217;d be placing the results in another Shape instance in a different position.</p>
<p>Take care,<br />
Bil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://www.as3dp.com/2009/04/25/actionscript-30-design-pattern-contest-the-golden-lunch-bucket-awards/comment-page-1/#comment-2288</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Sat, 02 May 2009 00:06:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=880#comment-2288</guid>
		<description>Oh ok,

I just thought we couldn&#039;t modifiy the component at all from the client other than creating it.

Thanks for clearing that up,
Josh</description>
		<content:encoded><![CDATA[<p>Oh ok,</p>
<p>I just thought we couldn&#8217;t modifiy the component at all from the client other than creating it.</p>
<p>Thanks for clearing that up,<br />
Josh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William B. Sanders</title>
		<link>http://www.as3dp.com/2009/04/25/actionscript-30-design-pattern-contest-the-golden-lunch-bucket-awards/comment-page-1/#comment-2284</link>
		<dc:creator>William B. Sanders</dc:creator>
		<pubDate>Fri, 01 May 2009 17:18:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=880#comment-2284</guid>
		<description>Hi Todd,

You&#039;ll have to forget the text for now; however, in looking at the reply to Josh&#039;s query, you have the clue how to create lots of instances and move them around.

Best regards,
Bill

(BTW--It&#039;s Bill -- not William. I have to use the same name as the one on the book. However, it&#039;s Bill.)</description>
		<content:encoded><![CDATA[<p>Hi Todd,</p>
<p>You&#8217;ll have to forget the text for now; however, in looking at the reply to Josh&#8217;s query, you have the clue how to create lots of instances and move them around.</p>
<p>Best regards,<br />
Bill</p>
<p>(BTW&#8211;It&#8217;s Bill &#8212; not William. I have to use the same name as the one on the book. However, it&#8217;s Bill.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William B. Sanders</title>
		<link>http://www.as3dp.com/2009/04/25/actionscript-30-design-pattern-contest-the-golden-lunch-bucket-awards/comment-page-1/#comment-2283</link>
		<dc:creator>William B. Sanders</dc:creator>
		<pubDate>Fri, 01 May 2009 17:15:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=880#comment-2283</guid>
		<description>Hi Josh,

You can make as many instances as you want in the Client. Here&#039;s a clue:

import flash.display.Shape;
------------------

private var mover:Shape=new Shape();

------------------
block = new ConcreteDecorator3(block);
addChild(block.getFigure());
			
mover = block.getFigure();
mover.x=-100, mover.y=10;
addChild(mover);

Take care,
Bill</description>
		<content:encoded><![CDATA[<p>Hi Josh,</p>
<p>You can make as many instances as you want in the Client. Here&#8217;s a clue:</p>
<p>import flash.display.Shape;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>private var mover:Shape=new Shape();</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
block = new ConcreteDecorator3(block);<br />
addChild(block.getFigure());</p>
<p>mover = block.getFigure();<br />
mover.x=-100, mover.y=10;<br />
addChild(mover);</p>
<p>Take care,<br />
Bill</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: todd</title>
		<link>http://www.as3dp.com/2009/04/25/actionscript-30-design-pattern-contest-the-golden-lunch-bucket-awards/comment-page-1/#comment-2281</link>
		<dc:creator>todd</dc:creator>
		<pubDate>Fri, 01 May 2009 13:36:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=880#comment-2281</guid>
		<description>Thanks for that simplicity William.  I am one of those learning, but I was just wondering about the parameters thing.  It is mostly because of Josh&#039;s post.  I wanted to have the ability to put text out, and put a single concrete Decorator at multiple locations.  But I am learning so thanks for the contest.</description>
		<content:encoded><![CDATA[<p>Thanks for that simplicity William.  I am one of those learning, but I was just wondering about the parameters thing.  It is mostly because of Josh&#8217;s post.  I wanted to have the ability to put text out, and put a single concrete Decorator at multiple locations.  But I am learning so thanks for the contest.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://www.as3dp.com/2009/04/25/actionscript-30-design-pattern-contest-the-golden-lunch-bucket-awards/comment-page-1/#comment-2280</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Fri, 01 May 2009 11:34:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=880#comment-2280</guid>
		<description>Hey hey,

What if we want multiple of the same component? Creating duplicate concrete components just with different x,y co-ordinates doesn&#039;t seem like good practice?

Thanks,
Josh</description>
		<content:encoded><![CDATA[<p>Hey hey,</p>
<p>What if we want multiple of the same component? Creating duplicate concrete components just with different x,y co-ordinates doesn&#8217;t seem like good practice?</p>
<p>Thanks,<br />
Josh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William B. Sanders</title>
		<link>http://www.as3dp.com/2009/04/25/actionscript-30-design-pattern-contest-the-golden-lunch-bucket-awards/comment-page-1/#comment-2279</link>
		<dc:creator>William B. Sanders</dc:creator>
		<pubDate>Fri, 01 May 2009 10:05:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=880#comment-2279</guid>
		<description>Hi Todd,

I see your point about mentioning parameters and then disallowing them in the contest. Sorry for the confusion.

Here&#039;s the point. The purpose of the contest is not to re-write the decorator per se. Rather it is to focus on just those elements in the design &lt;em&gt;that are meant to be changed&lt;/em&gt;. In the case of the Decorator pattern, the concrete components and decorators are the change elements. You can add more; keep the same ones and change them or some combination of the above. The purpose of all of the design patterns is to arrange the components so that change comes easily where you want it to come.

When you begin changing the signature, the effects ripple through the whole program, and that defeats the purpose of the pattern. You want to be able to change certain things without disrupting the entire program. Yes, I could have made a more complex signature that would have provided more runtime flexibility, but it would have been more difficult to understand for those who are just learning the Decorator for the first time. The Lunch Bucket examples on this blog are a combination of simplicity and practicality to reveal what the pattern is meant to do. If I err on the example, I tend to do so on the side of simplicity. That can be frustrating for some, but my hope is that a larger group of people  will see possibilities beyond the example itself. 

So, for now, all changes are to a Shape—any Shape— and in the concrete component or concrete decorator. Likewise, you can add more concrete components and concrete decorators. However, you&#039;ve given me an idea for another post that deals with more sophisticated operations that might be added to concrete components and decorators.

Kindest regards,
Bill</description>
		<content:encoded><![CDATA[<p>Hi Todd,</p>
<p>I see your point about mentioning parameters and then disallowing them in the contest. Sorry for the confusion.</p>
<p>Here&#8217;s the point. The purpose of the contest is not to re-write the decorator per se. Rather it is to focus on just those elements in the design <em>that are meant to be changed</em>. In the case of the Decorator pattern, the concrete components and decorators are the change elements. You can add more; keep the same ones and change them or some combination of the above. The purpose of all of the design patterns is to arrange the components so that change comes easily where you want it to come.</p>
<p>When you begin changing the signature, the effects ripple through the whole program, and that defeats the purpose of the pattern. You want to be able to change certain things without disrupting the entire program. Yes, I could have made a more complex signature that would have provided more runtime flexibility, but it would have been more difficult to understand for those who are just learning the Decorator for the first time. The Lunch Bucket examples on this blog are a combination of simplicity and practicality to reveal what the pattern is meant to do. If I err on the example, I tend to do so on the side of simplicity. That can be frustrating for some, but my hope is that a larger group of people  will see possibilities beyond the example itself. </p>
<p>So, for now, all changes are to a Shape—any Shape— and in the concrete component or concrete decorator. Likewise, you can add more concrete components and concrete decorators. However, you&#8217;ve given me an idea for another post that deals with more sophisticated operations that might be added to concrete components and decorators.</p>
<p>Kindest regards,<br />
Bill</p>
]]></content:encoded>
	</item>
</channel>
</rss>
