<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>AaronHardy.com &#187; nimbus</title>
	<atom:link href="http://aaronhardy.com/tag/nimbus/feed/" rel="self" type="application/rss+xml" />
	<link>http://aaronhardy.com</link>
	<description>For all your Aaron Hardy needs.</description>
	<lastBuildDate>Fri, 20 Apr 2012 14:53:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Nimbus &#8211; Macro Commands</title>
		<link>http://aaronhardy.com/flex/nimbus-macro-commands/</link>
		<comments>http://aaronhardy.com/flex/nimbus-macro-commands/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 01:53:17 +0000</pubDate>
		<dc:creator>Aaron Hardy</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[complex commands]]></category>
		<category><![CDATA[macro commands]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[nimbus]]></category>
		<category><![CDATA[parallel command]]></category>
		<category><![CDATA[sequence command]]></category>
		<category><![CDATA[service calls]]></category>

		<guid isPermaLink="false">http://aaronhardy.com/?p=228</guid>
		<description><![CDATA[UPDATE: Since the writing of this post, I&#8217;ve converted to and fully endorse Robotlegs as my MVC framework of choice. I invite you to check it out. I have likewise since converted the concept of macro commands to Robotlegs in a extension called Macrobot. In my recent intro to Nimbus, I mentioned that one of [...]]]></description>
			<content:encoded><![CDATA[<hr/>
<b>UPDATE: Since the writing of this post, I&#8217;ve converted to and fully endorse Robotlegs as my MVC framework of choice. I invite you to <a href="http://www.robotlegs.org" target="_blank">check it out</a>.  I have likewise since converted the concept of macro commands to Robotlegs in a extension called <a href="https://github.com/Aaronius/robotlegs-utilities-Macrobot" target="_blank">Macrobot</a>.</b></p>
<hr/>
<p>In my recent <a href="/flex/nimbus-mvc-framework-intro/">intro to Nimbus</a>, I mentioned that one of the features of Nimbus is macro commands.  In complex applications, macro commands can be a huge time saver and allow you to have a lot of control over handling a group of service calls with minimal code.</p>
<p>Two types of macro commands exist.  The first is a SequenceCommand.  This means its subcommands will be executed sequentially.  In other words, the second subcommand won&#8217;t begin executing until the first subcommand has finished executing.  The SequenceCommand won&#8217;t be considered complete until the last subcommand has finished executing.</p>
<p>The other type of macro command is a ParallelCommand.  As you may have guessed, this means its subcommands will be executed in parallel.  In other words, the first command and second command will execute at the same time.  The ParallelCommand won&#8217;t be considered complete until all subcommands have finished executing.</p>
<p>Just as the synergy of the <a href="http://en.wikipedia.org/wiki/Planeteer" target="_blank">Planeteers</a> can work miracles, so can the synergy of the SequenceCommand and ParallelCommand.  Nesting macro commands can give some enhanced control as we&#8217;ll see here:<span id="more-228"></span></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package controller
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> nimbus.<span style="color: #006600;">commands</span>.<span style="color: #006600;">ParallelCommand</span>;
	<span style="color: #0066CC;">import</span> nimbus.<span style="color: #006600;">commands</span>.<span style="color: #006600;">SequenceCommand</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MyMacroCommand <span style="color: #0066CC;">extends</span> SequenceCommand
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> MyMacroCommand<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">subcommands</span> = <span style="color: #66cc66;">&#91;</span>
					<span style="color: #000000; font-weight: bold;">new</span> CommandA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,
					<span style="color: #000000; font-weight: bold;">new</span> ParallelCommand<span style="color: #66cc66;">&#40;</span>
							<span style="color: #66cc66;">&#91;</span>
							<span style="color: #000000; font-weight: bold;">new</span> CommandB<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,
							<span style="color: #000000; font-weight: bold;">new</span> CommandC<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
							<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>,
					<span style="color: #000000; font-weight: bold;">new</span> CommandD<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,
					<span style="color: #000000; font-weight: bold;">new</span> ParallelCommand<span style="color: #66cc66;">&#40;</span>
							<span style="color: #66cc66;">&#91;</span>
							<span style="color: #000000; font-weight: bold;">new</span> CommandE<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,
							<span style="color: #000000; font-weight: bold;">new</span> SequenceCommand<span style="color: #66cc66;">&#40;</span>
									<span style="color: #66cc66;">&#91;</span>
									<span style="color: #000000; font-weight: bold;">new</span> CommandF<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,
									<span style="color: #000000; font-weight: bold;">new</span> CommandG<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
									<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>,
							<span style="color: #000000; font-weight: bold;">new</span> CommandH<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,
							<span style="color: #000000; font-weight: bold;">new</span> CommandI<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
							<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>,
					<span style="color: #000000; font-weight: bold;">new</span> CommandJ<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
					<span style="color: #66cc66;">&#93;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>It&#8217;s probably easier to see what&#8217;s going on just by looking at the code, but here it is in narrative form:</p>
<p>CommandA executes. CommandA completes.  CommandB and CommandC execute.  Both of them complete in whatever order.  CommandD executes. CommandD completes. CommandE, CommandH, and CommandI execute.  While they&#8217;re executing, CommandF executes, CommandF completes, CommandG executes, and CommandG completes.  After CommandE, CommandH, CommandI, CommandF, and commandG all complete, CommandJ executes and then completes.</p>
<p>Note that these subcommands could also be macro commands of their own.  For example, CommandH could be extending ParallelCommand and executing several subcommands within itself.  Macro commands can be a very powerful tool when managing the order and timing of your application&#8217;s processes.  Bon appetit!</p>
]]></content:encoded>
			<wfw:commentRss>http://aaronhardy.com/flex/nimbus-macro-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nimbus &#8211; MVC Framework Intro</title>
		<link>http://aaronhardy.com/flex/nimbus-mvc-framework-intro/</link>
		<comments>http://aaronhardy.com/flex/nimbus-mvc-framework-intro/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 22:51:45 +0000</pubDate>
		<dc:creator>Aaron Hardy</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[macro]]></category>
		<category><![CDATA[model view controller]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[nimbus]]></category>
		<category><![CDATA[parallel]]></category>
		<category><![CDATA[redo]]></category>
		<category><![CDATA[sequence]]></category>
		<category><![CDATA[undo]]></category>

		<guid isPermaLink="false">http://aaronhardy.com/?p=221</guid>
		<description><![CDATA[UPDATE: Since the writing of this post, I&#8217;ve converted to and fully endorse Robotlegs as my MVC framework of choice. I invite you to check it out. For those who don&#8217;t know, Nimbus is a Flex MVC framework (or micro-architecture for the technically-inclined). Sponsored by Rain, we develop it primarily for use on our applications [...]]]></description>
			<content:encoded><![CDATA[<hr/>
<b>UPDATE: Since the writing of this post, I&#8217;ve converted to and fully endorse Robotlegs as my MVC framework of choice. I invite you to <a href="http://www.robotlegs.org" target="_blank">check it out</a>.</b></p>
<hr/>
<p>For those who don&#8217;t know, <a href="http://code.google.com/p/nimbus-as3" target="_blank">Nimbus</a> is a Flex MVC framework (or micro-architecture for the technically-inclined).  Sponsored by <a href="http://mediarain.com" target="_blank">Rain</a>, we develop it primarily for use on our applications but make it available for public use and encourage the community to <a href="http://code.google.com/p/nimbus-as3" target="_blank">contribute</a>.</p>
<p>Nimbus pulls core concepts from <a href="http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm" target="_blank">Cairngorm</a> but is meant to cut out a lot of the plumbing developers groan about when they hear &#8220;Cairngorm.&#8221;  It&#8217;s light, but it&#8217;s not <a href="http://i260.photobucket.com/albums/ii22/shastymax/fluffy.jpg" target="_blank">fluffy</a>.  Baked in are those rare and tasty flavor morsels you thought only existed in those <a href="http://laparisiennecentre.com/blog/nfblog/wp-content/uploads/2007/07/confetticupcakes.JPG" target="_blank">Funfetti cupcakes</a> <a href="http://www.chaos.gwdg.de/~sinan/resimler/GRANDMA_KISS.GIF" target="_blank">your grandmother</a> bakes with love on your birthday.<span id="more-221"></span></p>
<p>Until the end of 2008, Nimbus had been shaped, re-shaped, patched, and plugged.  A complete re-write was merited so that&#8217;s what we did.  And really, what makes for a better Christmas than sitting down with your stocking stuffed with jelly beans and re-writing an MVC framework.  A few months later, the code is settling down along with the sugar and we&#8217;re ready for action.</p>
<p>Here are some features of Nimbus:</p>
<ul>
<li>Notification system of command completion so portions of the application can know when a command has finished executing.</li>
<li>Nestable &#8220;macro&#8221; commands.  Think &#8220;I want commands A and B to run in parallel, then C, then D and E in parallel, but inside D I want F and G to run sequentially&#8230;&#8221;</li>
<li>Undo/Redo functionality.</li>
<li>Progress feedback system.  You as a developer can associate a processing message with each command or macro command to provide feedback to users.</li>
<li>Interaction blocking system.  While commands are executing, easily disable user interaction to protect your service calls.</li>
<li>Combinable commands.  Ensure that similar command instances can be grouped appropriately in the undo/redo history.</li>
</ul>
<p><em><a href="/flex/the-best-flex-mvc-framework/">Nimbus may not be right for everyone</a>.  Call your system administrator if your scalability problem worsens or is not better within 7 to 10 days.  This may mean that there is another condition causing your RTE problems.  Do not take Nimbus with alcohol.  Call your system administrator right away if after taking Nimbus you are unable to walk, drive, eat, or engage in other activities.  In rare cases, severe allergic reactions can occur.  Most MVC frameworks carry some risk of dependency.  Do not use MVC frameworks for extended periods without first talking to your system administrator.  You are encouraged to report negative side effects of Nimbus.  Visit <a href="http://code.google.com/p/nimbus-as3" target="_blank">http://code.google.com/p/nimbus-as3</a> for more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://aaronhardy.com/flex/nimbus-mvc-framework-intro/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The best Flex MVC framework</title>
		<link>http://aaronhardy.com/flex/the-best-flex-mvc-framework/</link>
		<comments>http://aaronhardy.com/flex/the-best-flex-mvc-framework/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 02:26:32 +0000</pubDate>
		<dc:creator>Aaron Hardy</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[cairngorm]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[guasax]]></category>
		<category><![CDATA[mate]]></category>
		<category><![CDATA[model view controller]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[nimbus]]></category>
		<category><![CDATA[puremvc]]></category>

		<guid isPermaLink="false">http://aaronhardy.com/?p=68</guid>
		<description><![CDATA[UPDATE: Since the writing of this post, I&#8217;ve converted to and fully endorse Robotlegs as my MVC framework of choice. I invite you to check it out. Even so, the content of this post still remains relevant. There isn&#8217;t one.  At least not for everyone.  That&#8217;s the bottom line and hours of googling won&#8217;t change [...]]]></description>
			<content:encoded><![CDATA[<hr/>
<b>UPDATE: Since the writing of this post, I&#8217;ve converted to and fully endorse Robotlegs as my MVC framework of choice. I invite you to <a href="http://www.robotlegs.org" target="_blank">check it out</a>.  Even so, the content of this post still remains relevant.</b></p>
<hr/>
<p>There isn&#8217;t one.  At least not for everyone.  That&#8217;s the bottom line and hours of googling won&#8217;t change it.  I&#8217;ll explain what I mean&#8211;but first, here&#8217;s a real intro:</p>
<p><span id="more-68"></span></p>
<p>If you&#8217;re not acquainted with what MVC is and are interested in learning more, I&#8217;d recommend starting off with <a href="http://en.wikipedia.org/wiki/Model-view-controller" target="_blank">Wikipedia&#8217;s Model-view-controller entry</a>.   Simply put, MVC is a pattern of keeping portions of code where they belong, especially when it comes to code dealing with the model (data), view (user interface), and controller (operations/communication).  While MVC can simply be a development process or how a developer thinks while creating an application, communities of developers have often formed frameworks, or basic code structures, whereon a developer can base his/her code when creating an application.  They&#8217;re not always necessary, but many developers have favored frameworks because they <strong><em>help</em></strong> enforce good coding practices, eliminate &#8220;boiler-plate code&#8221; (repetitive code needed in each application), and create standards whereby developers can easily catch up to speed when joining a new, unfamiliar project.</p>
<p>With Flex, it seems there are more MVC architectures than there are developers.  There are plenty to choose from and their implementation can vary widely.  With so many frameworks, the inevitable question seems to always pop up: Which is the best one?  To truly find an answer, you have to consider who&#8217;s asking the question.</p>
<p>For a great illustration of this point, take a look at <a href="http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm" target="_blank">Cairngorm</a>, the most widely-used Flex MVC framework.  It&#8217;s supported by Adobe so many developers naturally gravitate toward it.  It also uses, by most accounts, great programming principles.  By great principles I mean the ones you might learn in a programming theory computer science course.  And just as you might expect for feedback from students in a programming theory course, you can expect similar responses from developers who use Cairngorm.  Most of the time, such developers appreciate the fact that such a framework exists and that it promotes good coding principles.  However, if you ask them if they actually enjoy developing with Cairngorm, you&#8217;ll usually hear a an animate &#8220;no.&#8221;  Why?  Because theory does not always mean practicality or productivity.  This is even more true when dealing with projects of varying complexity, timeframe, maintenance, and team size.</p>
<p>The most often-heard complaint about Cairngorm is that it requires too much code duplication.  For most development teams (including my own,) this is certainly true.  The various layers, from the Cairngorm events, to the controller, to the commands, to the delegate, require a lot of code duplication for little gain&#8230;<em>for us</em>.  For those with large systems, heterogenous backend services, high employee turnover, long-term maintenance, or other such attributes (what Adobe consultants might be dealing with,) such a framework may be exactly the ticket.  When it comes down to it, your choice of MVC framework should come down to what drives <em>your</em> bottom line, not what others consider to be good theory or what works for them.</p>
<p>Because of this disparity in needs vs. fulfillment, each MVC framework is going to have a bucketload of both good reviews and bad reviews.  Some frameworks may be better than others at solving problems for the greatest number of developers.  In such a case, ask yourself if a good generic solution is really better than a not-as-good customized solution.  What may be &#8220;not-as-good&#8221; for others may be exactly what you need.</p>
<p>Many other questions can help pinpoint what you&#8217;re really looking for in a framework.  Does one framework have a strong following that will fix bugs and implement functionality when needed?  How much is this development community worth?  Is the framework too heavy for your application&#8217;s simple needs?  Can your application really take advantage of a large number of code layers or does it make sense to cut out the plumbing?  How difficult will it be for new hires to grasp the application&#8217;s architecture?  Are you handing the application off to a team that&#8217;s acquainted with a specific framework?  Are your developers skilled enough to recognize when they&#8217;re writing spaghetti code or do they need strong guidance and tight restrictions from the get-go?</p>
<p>To sum up and repeat what I&#8217;ve said before, there is no <em>best </em>Flex MVC framework.  First determine what your development team really needs and then find the framework that best fulfills those needs.</p>
<p>So you may be wondering what my team over at <a href="http://www.mediarain.com/" target="_blank">Rain</a> chose for our MVC needs.  After researching and evaluating Cairngorm, PureMVC, Mate, Guasax, and Fake, amongst others, we decided to go with a solution built in-house and customized for <em>our </em>needs.  It&#8217;s based off Cairngorm with a couple layers cut out as well as a few features tossed in (such as undoable commands.)  Good luck on your quest to find &#8220;the best&#8221; Flex MVC framework!</p>
]]></content:encoded>
			<wfw:commentRss>http://aaronhardy.com/flex/the-best-flex-mvc-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

