<?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: The Mediator Design Pattern: A Minimalist Example</title>
	<atom:link href="http://www.as3dp.com/2008/07/07/the-mediator-design-pattern-a-minimalist-example/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.as3dp.com/2008/07/07/the-mediator-design-pattern-a-minimalist-example/</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: William B. Sanders</title>
		<link>http://www.as3dp.com/2008/07/07/the-mediator-design-pattern-a-minimalist-example/comment-page-1/#comment-2767</link>
		<dc:creator>William B. Sanders</dc:creator>
		<pubDate>Wed, 05 Aug 2009 02:44:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=68#comment-2767</guid>
		<description>Hi Rolf,

Lots of food for thought there. Even given the event driven nature of AS3, you still have lots of possibilities for the Mediator in certain types of Flash/Flex applications. Why not use some of your background with the Mediator and enter the Golden Lunch Bucket Contest #3?

Kindest regards,
Bill</description>
		<content:encoded><![CDATA[<p>Hi Rolf,</p>
<p>Lots of food for thought there. Even given the event driven nature of AS3, you still have lots of possibilities for the Mediator in certain types of Flash/Flex applications. Why not use some of your background with the Mediator and enter the Golden Lunch Bucket Contest #3?</p>
<p>Kindest regards,<br />
Bill</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rolf vreijdenberger</title>
		<link>http://www.as3dp.com/2008/07/07/the-mediator-design-pattern-a-minimalist-example/comment-page-1/#comment-2766</link>
		<dc:creator>rolf vreijdenberger</dc:creator>
		<pubDate>Tue, 04 Aug 2009 10:57:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=68#comment-2766</guid>
		<description>Hi Bill,

nice article.

The mediator pattern is all about communication. In your article you use the observer pattern with the mediator, which is a good implementation, but actually, they compete as &#039;communication&#039; patterns.

Observer/event based &#039;communication&#039; patterns provide the loosest coupling, as they imply no knowledge at all of the user/client of the object. 

A mediator pattern uses knowledge about the mediator, thereby making the class that knows about the mediator tightly coupled to the mediator. Since the mediator itself is actually in most cases a very specific implementation (probably the Document class in flash, or a form of facade inside the application (a subapp), it is hard to make this pattern totally reusable. Especially when you call methods on the mediator that are mediator specific, such as &quot;mediator.update(light, cn);&quot;. While &#039;update&#039; is a pretty generic name for a method, it&#039;s still specific for this implementation with the current method signature.

I would propose to do the dependency injection to the mediator at construction time: new Colleague(mediator);, as it serves no purpose to do so later, the setter method to inject the mediator will more probably than not be non-reuasable.

Furthermore, I&#039;d like to add that mediator is a form of doing callbacks on an object, which is just a form of delegation. Nothing new here, but it might provide a little more insight in the pattern.

Your closing comment is very true &quot;After spending a good deal of time with this pattern, I can see its functionality as well as its limitations.&quot; I used to work a lot with mediators, but since flash&#039;s event driven nature in as3, it&#039;s kind of awkward to use this design pattern as opposed to the built in event/observer style of communication in flash.</description>
		<content:encoded><![CDATA[<p>Hi Bill,</p>
<p>nice article.</p>
<p>The mediator pattern is all about communication. In your article you use the observer pattern with the mediator, which is a good implementation, but actually, they compete as &#8216;communication&#8217; patterns.</p>
<p>Observer/event based &#8216;communication&#8217; patterns provide the loosest coupling, as they imply no knowledge at all of the user/client of the object. </p>
<p>A mediator pattern uses knowledge about the mediator, thereby making the class that knows about the mediator tightly coupled to the mediator. Since the mediator itself is actually in most cases a very specific implementation (probably the Document class in flash, or a form of facade inside the application (a subapp), it is hard to make this pattern totally reusable. Especially when you call methods on the mediator that are mediator specific, such as &#8220;mediator.update(light, cn);&#8221;. While &#8216;update&#8217; is a pretty generic name for a method, it&#8217;s still specific for this implementation with the current method signature.</p>
<p>I would propose to do the dependency injection to the mediator at construction time: new Colleague(mediator);, as it serves no purpose to do so later, the setter method to inject the mediator will more probably than not be non-reuasable.</p>
<p>Furthermore, I&#8217;d like to add that mediator is a form of doing callbacks on an object, which is just a form of delegation. Nothing new here, but it might provide a little more insight in the pattern.</p>
<p>Your closing comment is very true &#8220;After spending a good deal of time with this pattern, I can see its functionality as well as its limitations.&#8221; I used to work a lot with mediators, but since flash&#8217;s event driven nature in as3, it&#8217;s kind of awkward to use this design pattern as opposed to the built in event/observer style of communication in flash.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Sanders</title>
		<link>http://www.as3dp.com/2008/07/07/the-mediator-design-pattern-a-minimalist-example/comment-page-1/#comment-1510</link>
		<dc:creator>Bill Sanders</dc:creator>
		<pubDate>Fri, 06 Feb 2009 16:37:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=68#comment-1510</guid>
		<description>Hi Regard,

Take a look at the State Design Pattern for navigation too. Each state can be set up to affect all other states as well. In fact, that might be a good project for this blog.

Thanks for your comment,
Bill</description>
		<content:encoded><![CDATA[<p>Hi Regard,</p>
<p>Take a look at the State Design Pattern for navigation too. Each state can be set up to affect all other states as well. In fact, that might be a good project for this blog.</p>
<p>Thanks for your comment,<br />
Bill</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rigard Kruger</title>
		<link>http://www.as3dp.com/2008/07/07/the-mediator-design-pattern-a-minimalist-example/comment-page-1/#comment-1508</link>
		<dc:creator>Rigard Kruger</dc:creator>
		<pubDate>Fri, 06 Feb 2009 07:49:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=68#comment-1508</guid>
		<description>I haven&#039;t read much of the other patterns here, but this one seems like it would be quite good (and perhaps more appropriate) to manage a navigation setup, where different button states affect the other buttons (ie. on rollover of one menu item in the navigation, all the other buttons alpha out, or something along those lines)?</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t read much of the other patterns here, but this one seems like it would be quite good (and perhaps more appropriate) to manage a navigation setup, where different button states affect the other buttons (ie. on rollover of one menu item in the navigation, all the other buttons alpha out, or something along those lines)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bookmarks about Actionscript</title>
		<link>http://www.as3dp.com/2008/07/07/the-mediator-design-pattern-a-minimalist-example/comment-page-1/#comment-744</link>
		<dc:creator>Bookmarks about Actionscript</dc:creator>
		<pubDate>Wed, 17 Sep 2008 22:00:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=68#comment-744</guid>
		<description>[...] - bookmarked by 6 members originally found by evilenvygirl on 2008-09-12  The Mediator Design Pattern: A Minimalist Example  http://www.as3dp.com/2008/07/07/the-mediator-design-pattern-a-minimalist-example/ - bookmarked by [...]</description>
		<content:encoded><![CDATA[<p>[...] &#8211; bookmarked by 6 members originally found by evilenvygirl on 2008-09-12  The Mediator Design Pattern: A Minimalist Example  <a href="http://www.as3dp.com/2008/07/07/the-mediator-design-pattern-a-minimalist-example/" rel="nofollow">http://www.as3dp.com/2008/07/07/the-mediator-design-pattern-a-minimalist-example/</a> &#8211; bookmarked by [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ДТП причиняют меньший вред, чем автомобильные выхлопы</title>
		<link>http://www.as3dp.com/2008/07/07/the-mediator-design-pattern-a-minimalist-example/comment-page-1/#comment-643</link>
		<dc:creator>ДТП причиняют меньший вред, чем автомобильные выхлопы</dc:creator>
		<pubDate>Tue, 08 Jul 2008 14:46:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=68#comment-643</guid>
		<description>[...] The Mediator Design Pattern: A Minimalist Example [...]</description>
		<content:encoded><![CDATA[<p>[...] The Mediator Design Pattern: A Minimalist Example [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Кто настоящие родители украинской инфляции - УНИАН</title>
		<link>http://www.as3dp.com/2008/07/07/the-mediator-design-pattern-a-minimalist-example/comment-page-1/#comment-642</link>
		<dc:creator>Кто настоящие родители украинской инфляции - УНИАН</dc:creator>
		<pubDate>Tue, 08 Jul 2008 13:14:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=68#comment-642</guid>
		<description>[...] The Mediator Design Pattern: A Minimalist Example [...]</description>
		<content:encoded><![CDATA[<p>[...] The Mediator Design Pattern: A Minimalist Example [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
