<?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>Really Aced &#187; puremvc</title>
	<atom:link href="http://blog.sommestad.net/tag/puremvc/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sommestad.net</link>
	<description>Web and Cocoa development through the eyes of Kristofer Sommestad, a SWAD developer.</description>
	<lastBuildDate>Sun, 23 Jan 2011 12:21:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Using the Swiz MVC framework for Flex</title>
		<link>http://blog.sommestad.net/2009/09/using-the-swiz-mvc-framework-for-flex/</link>
		<comments>http://blog.sommestad.net/2009/09/using-the-swiz-mvc-framework-for-flex/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 09:27:08 +0000</pubDate>
		<dc:creator>esset</dc:creator>
				<category><![CDATA[Flash & Flex]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[puremvc]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[swiz]]></category>

		<guid isPermaLink="false">http://blog.sommestad.net/?p=130</guid>
		<description><![CDATA[In my post a few days ago, I mentioned that that Scott Delap and his team were using the Swiz MVC framework. I decided to try it out, and I have to say it looks quite promising. The Swiz tagline is &#8220;Brutally simple micro-architecture for Rich Internet Application development with Adobe Flex&#8221;, and it was [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://blog.sommestad.net/2009/09/presentation-on-creating-an-online-multiplayer-game-lobby-in-flex-air/">my post</a> a few days ago, I mentioned that that <a href="http://www.infoq.com/author/Scott-Delap">Scott Delap</a> and his team were using the <a href="http://code.google.com/p/swizframework/">Swiz MVC framework</a>. I decided to try it out, and I have to say it looks quite promising. The Swiz tagline is &#8220;Brutally simple micro-architecture for Rich Internet Application development with Adobe Flex&#8221;, and it was actually pretty easy to set up. The framework is similar to the way Java Spring works with autowiring, so if you&#8217;re familiar with that you&#8217;ll probably like Swiz.</p>
<p>I&#8217;ve only read the docs and tried the demo out so far, but it&#8217;s a very interesting candidate for future Flex projects. It&#8217;s quite easy to separate the views and controllers from the business logic and using both MXML and ActionScript views seems to work fine. Swiz really gets the job done.</p>
<h3>Seems better than PureMVC</h3>
<p>I&#8217;ve tested the <a href="http://www.puremvc.org">PureMVC framework</a> earlier and kind of liked it, but developing with PureMVC gets quite repetitive and you produce quite a lot of boilerplate code. I like it better when the MVC framework easily guides you towards a proper structure, without having to do too much work to get there.</p>
<p>Also, there seem to be pretty good community activity in the <a href="http://code.google.com/p/swizframework/">Swiz Google Code project</a>.</p>
<p>It seems like the best MVC framework candidate so far!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sommestad.net/2009/09/using-the-swiz-mvc-framework-for-flex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Presentation on creating an online multiplayer game lobby in Flex &amp; Air</title>
		<link>http://blog.sommestad.net/2009/09/presentation-on-creating-an-online-multiplayer-game-lobby-in-flex-air/</link>
		<comments>http://blog.sommestad.net/2009/09/presentation-on-creating-an-online-multiplayer-game-lobby-in-flex-air/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 13:38:37 +0000</pubDate>
		<dc:creator>esset</dc:creator>
				<category><![CDATA[Flash & Flex]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[asunit]]></category>
		<category><![CDATA[blaze ds]]></category>
		<category><![CDATA[flexmonkey]]></category>
		<category><![CDATA[flexunit]]></category>
		<category><![CDATA[fluint]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[graniteds]]></category>
		<category><![CDATA[hessian]]></category>
		<category><![CDATA[lcds]]></category>
		<category><![CDATA[LiveCycleDS]]></category>
		<category><![CDATA[mxml]]></category>
		<category><![CDATA[puremvc]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[swiz]]></category>
		<category><![CDATA[weborb]]></category>
		<category><![CDATA[wysiwyg]]></category>

		<guid isPermaLink="false">http://blog.sommestad.net/?p=117</guid>
		<description><![CDATA[I came across a really interesting presentation from Scott Delap on InfoQ: Scott Delap shares his experience creating a lobby interface for an online game using Flex&#38;Air. He details on related technologies used, available tooling and frameworks pros&#38;cons, remoting options, unit, functional and load testing approach used. To sum it up, it&#8217;s a good and [...]]]></description>
			<content:encoded><![CDATA[<p>I came across a <a href="http://www.infoq.com/presentations/Flex-Air-in-the-Trenches-Scott-Delap">really interesting presentation</a> from <a href="http://www.infoq.com/author/Scott-Delap">Scott Delap</a> on <a href="http://www.infoq.com">InfoQ</a>:</p>
<blockquote><p>Scott Delap shares his experience creating a lobby interface for an online game using Flex&amp;Air. He details on related technologies used, available tooling and frameworks pros&amp;cons, remoting options, unit, functional and load testing approach used.</p></blockquote>
<p>To sum it up, it&#8217;s a good and elaborate presentation from a Java developer&#8217;s perspective, with reflections from a online multiplayer game development project. I enjoyed the full hour of watching it! <img src='http://blog.sommestad.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>They&#8217;ve dealt with many of the questions we have and their conclusions are very interesting.</p>
<h3>Presentation summary</h3>
<p>I&#8217;ve summarized the most interesting contents of the presentation. They&#8217;re actually notes taken during the presentation, so please forgive any poor language or formatting:</p>
<blockquote>
<ul>
<li>The Flex Builder WYSIWYG actually works, which isn&#8217;t common at all</li>
<li> MVC in Flex is pretty much MVc, where the controller and view are sort of bundled together</li>
<li> When choosing an MVC framework, <a href="http://code.google.com/p/swizframework/">Swiz</a> turned out to be most interesting (among likes of <a href="http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm">Cairngorm</a>, <a href="http://puremvc.org/">PureMVC</a> etc). Swiz is similar to Spring with auto-wiring. Also supports Dependency Injection, Command Chains, and has MXML support even for non-views (i.e. for wiring the M:s, V:s and C:s).</li>
</ul>
<p><strong>Their MVC implementation:</strong></p>
<ul>
<li>MXML for the views</li>
<li>ActionScript for the controllers</li>
<li>Remoting interfaces + specific back-end implementation</li>
<li> Swiz wiring it all up</li>
<li> They found no real reasons to use a &#8220;big MVC framework&#8221;, whereas Swiz did the job well enough</li>
</ul>
<p><strong>Remoting</strong></p>
<p>Looked at several candidates, where <a href="http://www.themidnightcoders.com/products/weborb-for-java/overview.html">WebORB</a>, <a href="http://hessian.caucho.com/">Hessian</a>, <a href="http://xmpp.org/">XMPP</a>, <a href="http://www.graniteds.org/">GraniteDS</a>, Rest not weren&#8217;t considered enough for various reasons. Also evaluated <a href="http://opensource.adobe.com/wiki/display/blazeds/BlazeDS/">BlazeDS</a>, which doesn&#8217;t scale and has no NIO support.<br />
Best candidate: <strong><a href="http://www.adobe.com/products/livecycle/dataservices/">LiveCycleDS</a> -</strong> supports NIO, RTMP and lots of connections:</p>
<ul>
<li>Good for remoting Java &lt;&gt; Actionscript and easy to integrate</li>
<li>Some Java &lt;&gt; ActionScript translations a bit problematic, i.e. enums and null values</li>
<li> Some lack of documentation when it comes to messaging</li>
</ul>
<p><strong>Unit testing</strong></p>
<ul>
<li> Evaluated <a href="http://asunit.org/">ASUnit</a>, <a href="http://opensource.adobe.com/wiki/display/flexunit/FlexUnit">FlexUnit</a>, DpUnit/Fluint</li>
<li> Chose <a href="http://code.google.com/p/fluint/">Fluint</a>, but could just as well have chosen FlexUnit. Unit testing Utilities, Controllers, Remoting Services with Mocks</li>
</ul>
<p><strong>Functional testing</strong></p>
<ul>
<li> <a href="http://code.google.com/p/flexmonkey/">FlexMonkey</a> not working properly with AIR and had a bit of lag</li>
<li> Wrote a stripped-down version of Selenium</li>
</ul>
<p><strong>Load testing</strong><br />
Currently no good way of performing load testing.</p>
<ul>
<li>Hard to simulate 1000:s of users</li>
<li> No really good tool for load testing at the moment</li>
</ul>
<p><strong>Final thoughts on Flex</strong></p>
<ul>
<li> MXML works as advertised</li>
<li>Easy to do complex things</li>
</ul>
</blockquote>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 380px; width: 1px; height: 1px;">http://opensource.adobe.com/wiki/display/blazeds/BlazeDS/</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.sommestad.net/2009/09/presentation-on-creating-an-online-multiplayer-game-lobby-in-flex-air/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Testing the PureMVC framework</title>
		<link>http://blog.sommestad.net/2009/03/testing-the-puremvc-framework-2/</link>
		<comments>http://blog.sommestad.net/2009/03/testing-the-puremvc-framework-2/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 09:36:21 +0000</pubDate>
		<dc:creator>esset</dc:creator>
				<category><![CDATA[Flash & Flex]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[puremvc]]></category>

		<guid isPermaLink="false">http://reallyaced.wordpress.com/?p=19</guid>
		<description><![CDATA[Objective Testing the PureMVC framework. Evaluation I decided to test using the PureMVC framework in a small application in order to find its pros and cons. As I had tested setting up the framework once before (in another project), it wasn&#8217;t really a big deal installing it and creating my first classes. Also, after having [...]]]></description>
			<content:encoded><![CDATA[<h3>Objective</h3>
<p>Testing the PureMVC framework.</p>
<h3>Evaluation</h3>
<p>I decided to test using the PureMVC framework in a small application in order to find its pros and cons.</p>
<p>As I had tested setting up the framework once before (in another project), it wasn&#8217;t really a big deal installing it and creating my first classes. Also, after having spent a few hours reading the PureMVC documentation and best practices, I already had knowledge on how the system worked.<strong> </strong></p>
<h3>Result</h3>
<p>After completing the application, I&#8217;ve found both pros and cons with the implementation of PureMVC.<br />
(Please note that I haven&#8217;t taken other pros/cons to consideration here, such as how often the framework is updated, community size etc.)</p>
<h3>Pros</h3>
<ul>
<li> A clear structure for Models, Views and Controllers &#8211; the roles of each part is quite easy to understand and make use of.</li>
<li> Good use of Controller part of MVC, which usually is difficult to put in the AS equation. In PureMVC, the Controller is a &#8220;Command&#8221; instructing the application on what to do next (i.e. to register Proxies/Mediators).</li>
<li> Good and clear separation of &#8220;true&#8221; View and Model via Proxy and Mediator &#8211; makes it easier to let the View actually &#8220;be a View&#8221; and Model &#8220;be a Model&#8221;. The View component (i.e. an actual MovieClip) is manipulated through the Mediator and the Model (i.e. a data object, such as a Player) is manipulated through a Proxy. This ensures that no logic is misplaced in the View component.</li>
<li> Nice being able to access Proxies, Mediators etc through the ApplicationFacade from wherever. Allows for Commands to be quite complicated if needed.</li>
</ul>
<h3>Cons</h3>
<ul>
<li> All Mediators, Proxies and Commands are registered using a unique key. Hence, there are some difficulties keeping track of Mediators/Views (&#8220;M-V&#8221;) that are unique for the Proxy&#8217;s data object, i.e. the M-V of a certain &#8220;Player&#8221; with a certain &#8220;id&#8221;. Perhaps M-V:s should only be implemented for functionality that will only require a single instance of its type?</li>
<li> Could be troublesome to keep track of the dependencies etc in the notification system, although the references can quite easily be searched using an IDE. This is probably an issue no matter which system being used.</li>
</ul>
<h3>Other observations (not necessarily to be considered as either pros or cons)&#8217;</h3>
<ul>
<li> The PureMVC &#8220;pattern&#8221; needs to be implemented all the way, meaning that the view (component) cannot contain any functionality to affect the world outside of it. A mediator&#8217;s &#8220;view component&#8221; must be completely isolated.</li>
<li> Setting up a new class requires some manual labor (as some classes needs to be extended/interfaces implemented), i.e. specifying which events to listen to and how it affects the class</li>
</ul>
<h3>What do I need to know to get started?</h3>
<p>It takes a little effort to learn the system and understand what its parts do; i.e. what a Mediator is and how it correlates to the actual View. But once you understand the system, it&#8217;s really easy to create new classes for your application.</p>
<p>A few vital things that need to be understood before using PureMVC (I&#8217;ll try to sum it up, but the official docs are recommended):</p>
<ul>
<li> What are Notifications? All Mediators, Proxies and Commands listen to notifications specified by the user. If a certain Mediator should display a message at a certain time, it will listen for a notification of that type.</li>
<li> What the Mediator is and why it&#8217;s being used: it&#8217;s basically a layer to the actual View (MovieClip), handling all functionality related to the other parts of the application (i.e. outside of the View)</li>
<li> What the Proxy is and why it&#8217;s being used: works in the same way as a Mediator, but in a more simpler way. Manipulates the &#8220;true&#8221; model object, which could be a domain object such as a &#8220;Player&#8221; or &#8220;Table&#8221; in a card game application.</li>
<li> Where is the Controller? The controller is implemented as a Command, meaning that it&#8217;s invoked when a certain notification is sent. Once invoked, it has no function until the notification is sent again.</li>
</ul>
<h3>Conclusion</h3>
<p>In my point of view, PureMVC is a good framework to use for MVC applications. It can get a bit complex with boilerplate code, though.</p>
<h3>References</h3>
<ul>
<li><a href="http://puremvc.org/">PureMVC homepage</a></li>
<li><a href="https://admin.adobe.acrobat.com/_a200985228/p12266504/">ASUnit creators hold seminar about their quest for the best AS MVC framework</a></li>
<li><a href="http://www.as3dp.com/2007/12/27/minimalist-mvc-example-using-the-puremvc-framework/">http://www.as3dp.com/2007/12/27/minimalist-mvc-example-using-the-puremvc-framework/</a></li>
<li> <a title="Cairngorm" href="http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm">http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.sommestad.net/2009/03/testing-the-puremvc-framework-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

