<?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; framework</title>
	<atom:link href="http://www.michelboudreau.com/tags/framework/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>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>Flash Player 3D</title>
		<link>http://www.michelboudreau.com/2010/11/01/flash-player-3d/</link>
		<comments>http://www.michelboudreau.com/2010/11/01/flash-player-3d/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 17:04:28 +0000</pubDate>
		<dc:creator>Michel Boudreau</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Adobe Max]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[alternativa]]></category>
		<category><![CDATA[flare]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[gpu]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[lab49]]></category>
		<category><![CDATA[molehill]]></category>
		<category><![CDATA[render]]></category>
		<category><![CDATA[Sebastian Marketsmueller]]></category>

		<guid isPermaLink="false">http://www.michelboudreau.com/?p=562</guid>
		<description><![CDATA[One of the big showcases of Adobe Max was the ...]]></description>
			<content:encoded><![CDATA[<p>One of the big showcases of Adobe Max was the possibility for the Flash Player to write directly to the video card using an API.  They&#8217;re calling it Flash 3D, but it&#8217;s not just limited to 3D.  It&#8217;ll be embedded directly into the next version of Flash Player, codename Molehill.</p>
<p><span id="more-562"></span>This is very exciting news for many reasons, but not only for game developer;  Flash and Flex developers could use the technology to their advantage.  With a full graphic API at your disposal that can write directly to the GPU, a developer could go a little crazy.  Most people think games when they hear 3D, but since we can write directly to the hardware, it also means more complex graphs or animations that doesn&#8217;t eat up CPU resources.</p>
<p>When the demos were shown, the graphics were impressive.  PS2 type of 3d quality and very smooth.  In some of the better examples shown (a driving game), the polygon count was over 100k but the CPU utilization was only 1%.  If this was software rendered instead, the polygon count would have had trouble going over 10k and the CPU would be fully utilized to keep up.</p>
<p>However, this new API means another learning curve to the whole process and not only on the software front, but also on the hardware front.  A developer needs to understand how Flash communicates with the hardware to be effective.  For instance, the GPU cannot render over normal display list graphics.  This is a limitation that is very important to know.  The short answer for the reason of this limitation is to reduce system bus congestion; you wouldn&#8217;t want to send over information to the GPU, render it, send it back to flash, overlay on top and send it back to the GPU.  It&#8217;s only one way, hence a UI can be overlaid on top of a 3D rendered scene, but not vice versa.  Also, since this is hardware based, there is no &#8216;retained&#8217; mode of rendering.  What this means is that the 3d stage gets re-rendered every frame, unlike the normal display list which only gets re-rendered when something changes.</p>
<p>When wanting to create your scene, you need to add a new class to the stage called Stage3D.  This is an object that runs separately from the normal stage (and display list).  You then need to add a context to that stage, and draw whatever you want to that context.  It&#8217;s pretty easy, but remember this is a very low-level API.  You&#8217;ll able to just draw a 3D object with it, for that you need a 3D framework that will draw all the triangles properly.  For that, there are many out there that are already taking advantage of Flash 3d, like <a href="http://alternativaplatform.com/en/" target="_blank">Alternativa </a>and <a href="http://www.flare3d.com" target="_blank">Flare</a>.</p>
<p>A cool feature about Flash 3D is that it can render to many rendering layers like DirectX 9 (and up), OpenGL 1.3, OpenGL ES2 (for mobile) or just plain old software rendering.  This can be set manually or Flash can choose automatically which one is best.  This is particularly important if you&#8217;re making games that are played by both desktop and mobile.</p>
<p>You can also use Adobe&#8217;s &#8220;Graphic Assembly Language&#8221; to make your own low-level code for the video card and do some funky things that you wouldn&#8217;t be able to out of the box.  It&#8217;s a very nice extension for hardcore hardware developers.</p>
<p>For now, Adobe is only concentrating on the rendering aspect of it, but are thinking of adding more features that would make development even easier, like support for 3D audio, physics and other gaming features.  All of this will be coming out with the next version of Flash Player in mid 2011 with a beta to be released &#8220;soon&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelboudreau.com/2010/11/01/flash-player-3d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prepping Flash for War</title>
		<link>http://www.michelboudreau.com/2010/03/22/prepping-flash-for-war/</link>
		<comments>http://www.michelboudreau.com/2010/03/22/prepping-flash-for-war/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 15:44:41 +0000</pubDate>
		<dc:creator>Michel Boudreau</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[cairngorm]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[lab49]]></category>
		<category><![CDATA[macromedia]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.michelboudreau.com/?p=258</guid>
		<description><![CDATA[Flash vs Silverlight vs HTML5; a no-holds barred grudge match ...]]></description>
			<content:encoded><![CDATA[<p>Flash vs Silverlight vs HTML5; a no-holds barred grudge match is brewing in this industry.  It will divide developers and companies where there was little contention in the past.  I doubt that this will end in a fatality, but the injuries will most likely fall to Adobe because of its current dominance in the field.  Each technology has its pros and cons, and multiple providers can co-exist, but companies need a reason to choose one over another. I predict most of the debate will be based around the development process; ease of development, quick prototyping, effectiveness of tools offered, development environments, unit testing, system integration, as well as application design and planning. If a company can make great applications in less time, it means that they can make more money.</p>
<p><span id="more-258"></span>I’m a fan of Flash, but like most things in life, it isn’t perfect.  Flex and Actionscript have been an integral part of my career and I would like them to continue to be so.  I would like to touch on certain concepts that I think would add more value to the current software offerings and in turn give Adobe an edge over the competition.</p>
<p>Time is an important asset for a company, which is why increasing development efficiency will be a key factor in winning this war. I&#8217;m talking about reducing the compiler time, making it smarter and bug free, and adding 64bit support to utilise workstation performance. This improvement can save valuable minutes or even hours depending on the developer.</p>
<p>Speaking of development efficiency, I also suggest that Flash Builder starts supporting Linux.  Adobe doesn&#8217;t even have to officially support it, just make sure the eclipse plug-in can work in a Linux environment with or without design view (I personally never use it).  The <a href="http://bugs.adobe.com/jira/browse/FB-19053" target="_blank">feature request</a> for having Flash Builder on Linux is one of the most popular requests on the Adobe bug tracker.</p>
<p>Irritations while using Flash products also need to be eliminated. I personally enjoy development work (geek alert!), but when something doesn&#8217;t work like expected, it frustrates me to no end. The Flex framework is fairly good at doing exactly that; it’s supposed to save time, and it does, but there are some components that have been buggy ever since its inception and they aren&#8217;t being fixed.</p>
<p>The next point is cause for debate between developers, in the end it comes down to preference, but it needs to be addressed. Of course, I&#8217;m talking about Cairngorm &#8211; or more specifically your decision to support it. I personally don&#8217;t think MVC is the pattern to use when handling a Flex application, and other developers in the community agree; hence the creation of several new open<del datetime="2010-03-29T13:45" cite="mailto:Michel%20Boudreau">-</del><ins datetime="2010-03-29T13:45" cite="mailto:Michel%20Boudreau"> </ins>source frameworks. It seems to me that Adobe is playing favorites with Cairngorm and could instead use that development effort in a more productive way.  Adobe should work on enhancing the Flash API and opening up doors to allow third party frameworks to improve their usability.</p>
<p>With complex applications come crucial new ways to design the flow and interaction within the system.  For that, a developer needs tools to show this visually.  Tools like wireframe UI timeline or UML round-trip engineering can combine both design and functionality in a uniform way that all developers can understand.  A lot could be learned from Java and their tools: e.g. offering code hot-swapping to greatly reduce debugging time.</p>
<p>If Adobe is serious about creating a developer language, then a more complex language needs to be their goal.  Multiple-inheritance, polymorphism, overloading, enumerators, abstract classes, destructors, private constructors, decimal data type, threading support &#8211; these are only a few of the things that Actionscript is lacking. Some would argue that there are a lot more. I&#8217;m not saying it&#8217;s a bad language, after all, it does do what it&#8217;s supposed to do, but with bigger systems come more architectural complexities that the current language cannot support.</p>
<p>A common topic when debating Silverlight vs Flex is the lack of multi-threading.  I really do hope that this will be implemented in the next iteration of the language because the possibilities it would open would be mind-blowing.  Imagine a system that can execute complex algorithms and computations without disrupting the user experience; that would be a major improvement! Heck, even if the language doesn&#8217;t give developers access to threads, just allowing the player to run different threads for visual components and for computations would be a great improvement.</p>
<p>Let me leave you with this: I&#8217;ve been a fan of Adobe since I was a kid, and I still am. If any business is capable of surmounting the upcoming challenge, it will be Adobe. I believe that the community surrounding this product will be a key factor in this war; if Adobe listens and responds to our suggestions, only great things can happen. <del datetime="2010-03-29T13:45" cite="mailto:Michel%20Boudreau"></del></p>
<p>Speaking of community, I invite all developers and designers to debate and comment on this topic. I think it is one that will be talked about for quite some time to come.  I&#8217;d also like to thank <a href="http://joemorrison.org/blog/" target="_blank">Joe Morrison</a>, a Director at Lab49, for letting me bounce ideas off of him.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelboudreau.com/2010/03/22/prepping-flash-for-war/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mate Flex Framework</title>
		<link>http://www.michelboudreau.com/2009/09/08/mate-flex-framework/</link>
		<comments>http://www.michelboudreau.com/2009/09/08/mate-flex-framework/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 02:04:27 +0000</pubDate>
		<dc:creator>Michel Boudreau</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[mate]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[mxml]]></category>
		<category><![CDATA[swiz]]></category>

		<guid isPermaLink="false">http://www.michelboudreau.com/?p=151</guid>
		<description><![CDATA[In my quest to continually improve my Flex skills, I&#8217;m ...]]></description>
			<content:encoded><![CDATA[<p>In my quest to continually improve my Flex skills, I&#8217;m always on the lookout for new technologies, open source projects and frameworks.  One of them particularly caught my eye when it came out and I haven&#8217;t been able to touch it until recently.</p>
<p><span id="more-151"></span></p>
<p>Ever since I started developing Flex, the only real Enterprise level framework out there that was tried and trusted was Cairngorm.  It tries (emphasis on tries) to implement an <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller" target="_blank">MVC</a> pattern in your projects so that it&#8217;s easier to manage and reuse your code.  However, something I&#8217;ve noticed over the years is that Adobe Consulting, the people that made Cairngorm, are not exactly great developers.  This is very apparent with the framework they put out because even though they say that it&#8217;s an MVC framework, it is not.  It&#8217;s very far from a good MVC pattern, but since it was the only one out there, a lot of developers didn&#8217;t have a choice other than creating a new one from scratch.</p>
<p>Fortunately, this has recently changed with a plethora of new frameworks that actually do implement MVC properly.  The two most notable are <a href="http://code.google.com/p/swizframework/" target="_blank">Swiz</a> and <a href="http://mate.asfusion.com/" target="_blank">Mate</a>.  Both are really good, however only Mate utilizes Flex to its full potential since most of it can be done with MXML.  It makes it very easy to use and actually quite fun to code with.</p>
<p>In the spirit of supporting and using this fine open source project, I registered another channel on <a href="irc://irc.freenode.net/">Freenode</a> called <a href="irc://irc.freenode.net/flex-mate">#flex-mate</a>.  This would be an open discussion channel about the Mate framework.  If you&#8217;re in any way related to the Mate framework, I strongly suggest you come visit the channel and support this amazing project.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelboudreau.com/2009/09/08/mate-flex-framework/feed/</wfw:commentRss>
		<slash:comments>0</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/28 queries in 0.012 seconds using disk: basic
Object Caching 473/550 objects using disk: basic

Served from: www.michelboudreau.com @ 2012-05-21 07:17:39 -->
