<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Thinking in Code &#187; Design</title>
	<atom:link href="http://www.michelboudreau.com/category./design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michelboudreau.com</link>
	<description>Michel Boudreau&#039;s Personal Blog</description>
	<lastBuildDate>Wed, 25 Apr 2012 20:18:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Introducing The New Flex Logo</title>
		<link>http://www.michelboudreau.com/2012/02/02/introducing-the-new-flex-logo/</link>
		<comments>http://www.michelboudreau.com/2012/02/02/introducing-the-new-flex-logo/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 02:15:06 +0000</pubDate>
		<dc:creator>Michel Boudreau</dc:creator>
				<category><![CDATA[Apache Flex]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[logo]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[professional]]></category>
		<category><![CDATA[voting]]></category>

		<guid isPermaLink="false">http://www.michelboudreau.com/?p=828</guid>
		<description><![CDATA[The people have spoken!  The votes have been tallied and ...]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">The people have spoken!  The votes have been tallied and the winning entry is displayed below.  It is still in the process of being tweaked (typography, colors, etc), but it will still stay very close to the logo shown.  I personally <em>love</em> the new logo; it&#8217;s very professional yet playful which is exactly what Flex is.  I can&#8217;t wait to see this logo in all things related Flex.</p>
<p style="text-align: center;"><a href="http://www.michelboudreau.com/wp-content/uploads/2012/02/apache_flex_black_bg1.jpg"><img class="aligncenter  wp-image-836" title="apache_flex_black_bg" src="http://www.michelboudreau.com/wp-content/uploads/2012/02/apache_flex_black_bg1.jpg" alt="" width="482" height="212" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelboudreau.com/2012/02/02/introducing-the-new-flex-logo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Presenter vs. Mediator</title>
		<link>http://www.michelboudreau.com/2011/05/19/presenter-vs-mediator/</link>
		<comments>http://www.michelboudreau.com/2011/05/19/presenter-vs-mediator/#comments</comments>
		<pubDate>Thu, 19 May 2011 21:48:15 +0000</pubDate>
		<dc:creator>Michel Boudreau</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[design patterns]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[front-end]]></category>
		<category><![CDATA[Jens Halm]]></category>
		<category><![CDATA[lab49]]></category>
		<category><![CDATA[mediator]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[parsley]]></category>
		<category><![CDATA[presenter]]></category>
		<category><![CDATA[robotlegs]]></category>

		<guid isPermaLink="false">http://www.michelboudreau.com/?p=693</guid>
		<description><![CDATA[This discussion has raged on for some time. Both are ...]]></description>
			<content:encoded><![CDATA[<p>This discussion has raged on for  some time.  Both are fairly common patterns used for front-end development; it&#8217;s a new take on the classic MVC pattern.  Recently, the argument has been re-ignited by the choice between two great application frameworks for Flex: <a href="http://www.robotlegs.org/" target="_blank">RobotLegs</a> and <a href="http://www.spicefactory.org/parsley/" target="_blank">Parsley</a>.</p>
<p><span id="more-693"></span></p>
<p>I will say this right away, I&#8217;m biased towards Parsley and have advocated its use for over a year and a half now.  It has time and time again proven itself a reliable, robust and rapid framework for application development.  Its track record is quite impressive;  It was used to build some of the world&#8217;s largest Flex applications.  Jens Halm, the creator of Parsley, has done a wonderful job at making his framework extensible, fast and optimized for both Flash and Flex.  Robotlegs is also a good framework, don&#8217;t get me wrong, it just doesn&#8217;t capture me as much and it&#8217;s not optimized for Flex (pure Actionscript), but  in the end it comes down to your development preference.</p>
<p>Now to ask the question, which pattern we use for our project? <a href="http://en.wikipedia.org/wiki/Model-view-presenter" target="_blank">Presenter</a> or <a href="http://en.wikipedia.org/wiki/Mediator_pattern" target="_blank">Mediator</a>?  Parsley is built around the Presenter pattern while RobotLegs uses Mediator.  Simply speaking, the difference between the two is fairly minimal, but can affect your project quite a bit.  Here&#8217;s a quick diagram on how they work:</p>
<p><a href="http://www.michelboudreau.com/wp-content/uploads/2011/05/StandardsDesignPatterns.png"><img class="aligncenter size-full wp-image-733" title="Standards&amp;DesignPatterns" src="http://www.michelboudreau.com/wp-content/uploads/2011/05/StandardsDesignPatterns.png" alt="" width="455" height="325" /></a></p>
<p>If you remember your UML class diagrams, you would see that a Mediator can only have one View, while the View can have many Mediators.  In this case, the Mediator is the &#8216;man-in-the-middle&#8217; since nobody else knows about it; its sole purpose is to listen to the View and give it data.  The View communicates with the Mediator through events to which the Mediator acts upon.  One thing I like about this pattern is that it forces developers to use a proper &#8220;data in, events out&#8221; methodology and separates the concerns of the business from the View.  This also creates decoupled components since there&#8217;s no hard dependency in the View; it could still fully function if it is moved into another project.</p>
<p>For the Presenter, things are a bit different since the View knows about it.  The Presenter is there to just present data which is easily binded within the View, but this is problematic since it&#8217;s coupling your View to that Presenter and even the model (data).  However, you don&#8217;t need to use events within the View to communicate to your Presenter since you can access its public functions directly.  It&#8217;s easier to use this method because it limits the code needed to communicate between the View and the Presenter, but it&#8217;s coupling your View.</p>
<p>In the diagram, you might have noticed that with a Mediator pattern you can have a View with several Mediators and even reuse the Mediators on other Views.  This makes the <em>Mediator more of a View based pattern</em>.  The Presenter however doesn&#8217;t care and a View can have multiple Presenters which can (and should) be reused across multiple Views to display the data they need.  This makes the <em>Presenter more of a data based pattern</em> since it&#8217;s job is to give access to data and manage it.</p>
<p>There you have it.  One thing to remember is that patterns are meant to help you develop, not make it harder.   Since I love Parsley so much and had a need for a Mediator pattern for a project (needed to decouple the component) and Parsley only provides a Presenter pattern, I extended the framework to include a Mediator tag. <a href="https://github.com/mboudreau/Parsley-Mediator" target="_blank"> It&#8217;s completely open source and now on GitHub</a>.  Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelboudreau.com/2011/05/19/presenter-vs-mediator/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Post Parsley BYOL Workshop Summary</title>
		<link>http://www.michelboudreau.com/2011/02/08/post-parsley-byol-workshop-summary/</link>
		<comments>http://www.michelboudreau.com/2011/02/08/post-parsley-byol-workshop-summary/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 19:22:36 +0000</pubDate>
		<dc:creator>Michel Boudreau</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Mike's Flex Channel]]></category>
		<category><![CDATA[Workshop]]></category>
		<category><![CDATA[beginner]]></category>
		<category><![CDATA[bring your own laptop]]></category>
		<category><![CDATA[byol]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[lab49]]></category>
		<category><![CDATA[new york]]></category>
		<category><![CDATA[parsley]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ustream]]></category>
		<category><![CDATA[workshop]]></category>

		<guid isPermaLink="false">http://www.michelboudreau.com/?p=678</guid>
		<description><![CDATA[Last night I held a Parsley Bring Your Own Laptop ...]]></description>
			<content:encoded><![CDATA[<p>Last night I held a Parsley Bring Your Own Laptop Workshop, part of the <a href="http://www.meetup.com/New-York-Flex-Meetup/" target="_blank">New York Flex Meetup</a>.  We had a very good attendance (around 26 people) considering how niche the topic is.  I&#8217;d like to thank everyone for participating to this event and to help us reach 100 members.  It is with your continued involvement that we&#8217;ll reach 200 by year&#8217;s end.</p>
<p><a href="http://www.michelboudreau.com/wp-content/uploads/2011/02/IMG_20110207_183733.jpg"><img class="aligncenter size-medium wp-image-680" title="IMG_20110207_183733" src="http://www.michelboudreau.com/wp-content/uploads/2011/02/IMG_20110207_183733-300x224.jpg" alt="" width="300" height="224" /></a><span id="more-678"></span></p>
<p>As usual, we&#8217;ve recorded the workshop on UStream.  You can follow along using the <a href="http://www.michelboudreau.com/wp-content/uploads/2011/02/ParsleyWorkshop.zip">pre-made workshop files</a> or you can skip right to the end and get the <a href="http://www.michelboudreau.com/wp-content/uploads/2011/02/ParsleyWorkshop-Full.zip">completed workshop files</a>.  I hope that this helps anyone out there trying to learn Parsley for their next project.</p>
<p>I&#8217;d also like to thank <a href="http://www.lab49.com" target="_blank">Lab49</a> for their continued sponsorship of the New York Flex Meetup and events such as these.  As well as <a href="http://www.adobe.com" target="_blank">Adobe </a>for providing 2 Flash Builder 4 Premium licenses and <a href="http://shanky.org/" target="_blank">Shashank Tawari</a> for giving 3 <a href="http://www.amazon.com/AdvancED-Flex-4-Shashank-Tiwari/dp/1430224835/ref=sr_1_1?ie=UTF8&amp;qid=1297193254&amp;sr=8-1" target="_blank">AdvancED Flex 4</a> books to give away at the event.</p>
<div class="oembed oembed-video oembed-ustream-tv oembed-video-ustream-tv"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="296" id="utv274940" name="utv_n_69740"><param name="flashvars" value="loc=%2F&amp;autoplay=false&amp;vid=12537357&amp;locale=en_US" /><param name="wmode" value="opaque" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.ustream.tv/flash/viewer.swf" /><embed flashvars="loc=%2F&amp;autoplay=false&amp;vid=12537357&amp;locale=en_US" width="480" height="296" wmode="opaque" allowfullscreen="true" allowscriptaccess="always" id="utv274940" name="utv_n_69740" src="http://www.ustream.tv/flash/viewer.swf" type="application/x-shockwave-flash" /></object></div>
]]></content:encoded>
			<wfw:commentRss>http://www.michelboudreau.com/2011/02/08/post-parsley-byol-workshop-summary/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flex/Actionscript UML Tool: UML4AS</title>
		<link>http://www.michelboudreau.com/2010/08/18/flexactionscript-uml-tool-uml4as/</link>
		<comments>http://www.michelboudreau.com/2010/08/18/flexactionscript-uml-tool-uml4as/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 19:08:39 +0000</pubDate>
		<dc:creator>Michel Boudreau</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[as]]></category>
		<category><![CDATA[CodeSync]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[lab49]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[uml]]></category>
		<category><![CDATA[uml4as]]></category>

		<guid isPermaLink="false">http://www.michelboudreau.com/?p=389</guid>
		<description><![CDATA[Anyone remember Saffron?  I was never certain if this project ...]]></description>
			<content:encoded><![CDATA[<p>Anyone remember <a href="http://www.michelboudreau.com/2010/04/30/saffron-is-still-alive/" target="_blank">Saffron</a>?  I was never certain if this project was ever going to come to fruition, so lately I was thinking excessively about making my own.  I started searching for inspiration in other UML tools so I could design a better user interface.  Low and behold, I stumble across <a href="http://www.uml4as.com" target="_blank">UML4AS</a>, a brand spanking new project that does just what I was planning of doing.</p>
<p>It integrates completely with Eclipse (and Flash Builder) and has this neat feature called CodeSync that makes sure your model and code is always persisted between each other.  In other words, everything works together in an integrated workflow to save you time.</p>
<p>I&#8217;ll have to dig deeper, try this out on projects and do a complete review.  In the meantime, please support this initiative by registering and posting on the forum.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelboudreau.com/2010/08/18/flexactionscript-uml-tool-uml4as/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parsley Model-View-Mediator Architecture</title>
		<link>http://www.michelboudreau.com/2010/07/12/parsley-model-view-mediator-architecture/</link>
		<comments>http://www.michelboudreau.com/2010/07/12/parsley-model-view-mediator-architecture/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 04:52:43 +0000</pubDate>
		<dc:creator>Michel Boudreau</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[design pattern]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[Jens Halm]]></category>
		<category><![CDATA[lab49]]></category>
		<category><![CDATA[mediator]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[parsley]]></category>

		<guid isPermaLink="false">http://www.michelboudreau.com/?p=295</guid>
		<description><![CDATA[For those who have used Parsley as their application framework ...]]></description>
			<content:encoded><![CDATA[<p>For those who have used Parsley as their application framework knows just how powerful it can be. However, there is something that has annoyed me slightly over time.</p>
<p style="text-align: left;">When I&#8217;m designing a system, I always try to use proper Flex practices. Practices like using MVC to separate components and business logic, making components truly encapsulated and reusable, etc.  The problem that I find with Parsley is that it only allows you to use Injection based views for its MVC architecture; the View knows something, either a Presenter or a Model, and it&#8217;s always injected in by the Context.&nbsp; The problem is, if you have several projects that need the same components but different frameworks, you can&#8217;t freely interchange those components between projects since the view is tightly intertwined with the Parsley injection.</p>
<p style="text-align: left;"><span id="more-295"></span>A way to solve this by using the Mediator pattern (The View knows nothing, but the Mediator knows about the View) because it makes your view extremely portable between projects and forces the developers to use better practices since the only way to communicate with the Mediator is through events.<a href="http://www.michelboudreau.com/wp-content/uploads/2010/07/mediator.png"><img class="aligncenter size-full wp-image-344" title="Mediator Pattern" src="http://www.michelboudreau.com/wp-content/uploads/2010/07/mediator.png" alt="" width="415" height="220" /></a></p>
<p style="text-align: left;">Luckily, Parsley has several extension points which you can insert custom classes to change or add functionality.&nbsp; This gave me an opportunity to create my own parsley tag aptly named &#8216;Mediator&#8217;.&nbsp; What this allowed me to do is to create a Mediator class that is controlled by Parsley and when the view is created; an event would get dispatched from the View and Parsley would then create a Mediator class and inject the view into it.&nbsp; This way, the view never knows anything about the framework which leaves the components to be freely interchangeable between projects.</p>
<p><span style="color: #ff0000;">WARNING: The following code only works with <a href="http://www.spicefactory.org/parsley/download.php" target="_blank">Parsley 2.3 and higher</a>.&nbsp; I made it this way because some major changes have been made to the extension points in 2.3.</span></p>
<p>You can <a href="http://www.michelboudreau.com/wp-content/uploads/2010/07/ParsleyMediatorExample.zip">download the sample application</a> I made and look at the files. All you really need is the <a href="http://www.michelboudreau.com/wp-content/uploads/2010/07/Mediator.zip">Mediator</a> library swc and put it in your project.&nbsp; Then you need to specify that you Parsley context will use this Mediator extension by doing the following.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- Initialize Parsley like you would normally --&gt;
&lt;spicefactory:ContextBuilder config=&quot;{Config}&quot;&gt;
	&lt;!-- Except add the mediator configuration within it --&gt;
	&lt;!-- Alternatively, you can use Mediator.initialize(); instead of the mxml tag --&gt;
	&lt;mediator:Mediator /&gt;
&lt;/spicefactory:ContextBuilder&gt;
</pre>
<p>And that&#8217;s it.  By including the Mediator class within your Context, Parsley knows how to change the extension point for it to work.</p>
<p><strong>UPDATE: </strong>Instead of giving you the raw files, I&#8217;ve packaged them in an easy to use library.&nbsp; You can now find the <a href="http://www.michelboudreau.com/wp-content/uploads/2010/07/ParsleyMediator.zip">source for the library here</a>.</p>
<p><strong>UPDATE 2: </strong> I&#8217;ve updated the files for the latest 2.3M3 changes in Parsley.</p>
<p><strong>UPDATE 3:</strong> <a href="http://www.spicefactory.org/parsley/download.php" target="_blank">Parsley 2.3</a> came out recently and I&#8217;m happy to say that my Mediator still works.</p>
<p><strong>UPDATE 4: </strong>Parsley 2.4 is out and I&#8217;ve updated the mediator and added it to <a href="https://github.com/mboudreau/Parsley-Mediator" target="_blank">GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelboudreau.com/2010/07/12/parsley-model-view-mediator-architecture/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/45 queries in 0.016 seconds using disk: basic
Object Caching 530/682 objects using disk: basic

Served from: www.michelboudreau.com @ 2012-05-21 06:45:31 -->
