<?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 Chain of Responsibility Design Pattern: Decoupling Request and Request Handler</title>
	<atom:link href="http://www.as3dp.com/2008/01/14/actionscript-30-chain-of-responsibility-design-pattern-decoupling-request-and-request-handler/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.as3dp.com/2008/01/14/actionscript-30-chain-of-responsibility-design-pattern-decoupling-request-and-request-handler/</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: Thomas Vervest</title>
		<link>http://www.as3dp.com/2008/01/14/actionscript-30-chain-of-responsibility-design-pattern-decoupling-request-and-request-handler/comment-page-1/#comment-2305</link>
		<dc:creator>Thomas Vervest</dc:creator>
		<pubDate>Wed, 06 May 2009 10:47:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/2008/01/14/actionscript-30-chain-of-responsibility-design-pattern-decoupling-request-and-request-handler/#comment-2305</guid>
		<description>A really awesome [thing] about this design is that your concrete handlers don&#039;t have to be final. I used this in a program using different notification types, but some notifications needed to trigger multiple actions. So what I did was make a CoR and passing the notification event through the entire chain, each handler triggering if the notification type matched. This made a great reusable mechanism, because it&#039;s really easy to implement new handlers and a user-based config, allowing users to disable certain triggers (just leave them out of the chain :D)</description>
		<content:encoded><![CDATA[<p>A really awesome [thing] about this design is that your concrete handlers don&#8217;t have to be final. I used this in a program using different notification types, but some notifications needed to trigger multiple actions. So what I did was make a CoR and passing the notification event through the entire chain, each handler triggering if the notification type matched. This made a great reusable mechanism, because it&#8217;s really easy to implement new handlers and a user-based config, allowing users to disable certain triggers (just leave them out of the chain :D)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Sanders</title>
		<link>http://www.as3dp.com/2008/01/14/actionscript-30-chain-of-responsibility-design-pattern-decoupling-request-and-request-handler/comment-page-1/#comment-1548</link>
		<dc:creator>Bill Sanders</dc:creator>
		<pubDate>Mon, 09 Feb 2009 10:07:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/2008/01/14/actionscript-30-chain-of-responsibility-design-pattern-decoupling-request-and-request-handler/#comment-1548</guid>
		<description>Hi Rigard,

That is a very interesting idea. You would effectively use the CoR pattern as a filter (well, let&#039;s face it; that&#039;s what it is) to load assets with different properties. The filtering effect would determine what kind of loading and display methods you would use. Wow! I really like that idea.

Thank you very much,
Bill</description>
		<content:encoded><![CDATA[<p>Hi Rigard,</p>
<p>That is a very interesting idea. You would effectively use the CoR pattern as a filter (well, let&#8217;s face it; that&#8217;s what it is) to load assets with different properties. The filtering effect would determine what kind of loading and display methods you would use. Wow! I really like that idea.</p>
<p>Thank you very much,<br />
Bill</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rigard Kruger</title>
		<link>http://www.as3dp.com/2008/01/14/actionscript-30-chain-of-responsibility-design-pattern-decoupling-request-and-request-handler/comment-page-1/#comment-1545</link>
		<dc:creator>Rigard Kruger</dc:creator>
		<pubDate>Mon, 09 Feb 2009 08:15:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/2008/01/14/actionscript-30-chain-of-responsibility-design-pattern-decoupling-request-and-request-handler/#comment-1545</guid>
		<description>I imagine this kind of thing being very useful in an assets managing class. Various classes in your project may want to load assets, but the assets they load are all different (and at times they may not even know the kind of asset they are loading - if they are receiving the asset url from a proxy class that loaded an external xml, for example). So the client would make a request for the asset, and the asset managing class would pass the request to different handlers (eg. JPEGHandler, SWFHandler, FontHandler, XMLHandler etc.) until the asset is loaded correctly and then passed back to the client.

The difficulty I foresee would be how to effectively manage the communication between the parties, as event dispatching could be tricky. Does this make sense, and do you have any suggestions on how that communication would run?</description>
		<content:encoded><![CDATA[<p>I imagine this kind of thing being very useful in an assets managing class. Various classes in your project may want to load assets, but the assets they load are all different (and at times they may not even know the kind of asset they are loading &#8211; if they are receiving the asset url from a proxy class that loaded an external xml, for example). So the client would make a request for the asset, and the asset managing class would pass the request to different handlers (eg. JPEGHandler, SWFHandler, FontHandler, XMLHandler etc.) until the asset is loaded correctly and then passed back to the client.</p>
<p>The difficulty I foresee would be how to effectively manage the communication between the parties, as event dispatching could be tricky. Does this make sense, and do you have any suggestions on how that communication would run?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Sanders</title>
		<link>http://www.as3dp.com/2008/01/14/actionscript-30-chain-of-responsibility-design-pattern-decoupling-request-and-request-handler/comment-page-1/#comment-414</link>
		<dc:creator>Bill Sanders</dc:creator>
		<pubDate>Tue, 15 Jan 2008 12:50:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/2008/01/14/actionscript-30-chain-of-responsibility-design-pattern-decoupling-request-and-request-handler/#comment-414</guid>
		<description>Hi Timbot,

Thanks man. I&#039;m trying not to go off half-cocked on these new (to me) DPs.

When working on CoR, I kept thinking that there&#039;s a lot of different ways that this can be done, and my solution is only one of many. Chandima and I welcome lots of different ideas, and if you could generate a sample CoR with your idea, we could put it up for discussion.

Also, I think it would be helpful to work with requests that involved different kinds of request objects. Numeric requests are pretty simple (that&#039;s why I used one!) and I don&#039;t think it&#039;d be too difficult to cook up something interesting if any readers here would be interested in playing around with some ideas.

Bill</description>
		<content:encoded><![CDATA[<p>Hi Timbot,</p>
<p>Thanks man. I&#8217;m trying not to go off half-cocked on these new (to me) DPs.</p>
<p>When working on CoR, I kept thinking that there&#8217;s a lot of different ways that this can be done, and my solution is only one of many. Chandima and I welcome lots of different ideas, and if you could generate a sample CoR with your idea, we could put it up for discussion.</p>
<p>Also, I think it would be helpful to work with requests that involved different kinds of request objects. Numeric requests are pretty simple (that&#8217;s why I used one!) and I don&#8217;t think it&#8217;d be too difficult to cook up something interesting if any readers here would be interested in playing around with some ideas.</p>
<p>Bill</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timbot</title>
		<link>http://www.as3dp.com/2008/01/14/actionscript-30-chain-of-responsibility-design-pattern-decoupling-request-and-request-handler/comment-page-1/#comment-413</link>
		<dc:creator>Timbot</dc:creator>
		<pubDate>Tue, 15 Jan 2008 05:45:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/2008/01/14/actionscript-30-chain-of-responsibility-design-pattern-decoupling-request-and-request-handler/#comment-413</guid>
		<description>This is a great explanation.  Well done!
The handlers remind me of a singly-linked list, and the request class makes me think of a value object.  Perhaps you could employ a linked list where each node held a reference to a handler that could be applied to the request.
In this way, you could insert of remove handlers from the chain of responsibility at runtime.  (Of course, you could add such functionality to the handler superclass as well.  I think either would be good solutions yes?)
-t.</description>
		<content:encoded><![CDATA[<p>This is a great explanation.  Well done!<br />
The handlers remind me of a singly-linked list, and the request class makes me think of a value object.  Perhaps you could employ a linked list where each node held a reference to a handler that could be applied to the request.<br />
In this way, you could insert of remove handlers from the chain of responsibility at runtime.  (Of course, you could add such functionality to the handler superclass as well.  I think either would be good solutions yes?)<br />
-t.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
