<?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>publicreative lab &#187; Framework</title>
	<atom:link href="http://lab.publicreative.com/tag/framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://lab.publicreative.com</link>
	<description></description>
	<lastBuildDate>Tue, 27 Jul 2010 15:59:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PureMVC Twitter Feed Demo</title>
		<link>http://lab.publicreative.com/2009/05/puremvc-twitter-feed-demo/</link>
		<comments>http://lab.publicreative.com/2009/05/puremvc-twitter-feed-demo/#comments</comments>
		<pubDate>Wed, 13 May 2009 16:39:21 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[PureMVC]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://lab.publicreative.com/?p=122</guid>
		<description><![CDATA[<script type="text/javascript" src="http://lab.publicreative.com/wp-includes/js/jquery/jquery.js"></script><script type="text/javascript" src="http://lab.publicreative.com/wp-content/plugins/pb-embedflash/js/sbadapter/shadowbox-jquery.js"></script><script type="text/javascript" src="http://lab.publicreative.com/wp-content/plugins/pb-embedflash/js/shadowbox.js"></script><script type="text/javascript"><!--
window.onload = function() {var options ={assetURL:'',loadingImage:'http://lab.publicreative.com/wp-content/plugins/pb-embedflash/css/images/loading.gif',flvPlayer:'http://lab.publicreative.com/wp-content/plugins/pb-embedflash/swf/mediaplayer.swf',animate:true,animSequence:'wh',overlayColor:'#000',overlayOpacity:0.9,overlayBgImage:'http://lab.publicreative.com/wp-content/plugins/pb-embedflash/css/images/overlay-85.png',listenOverlay:true,autoplayMovies:true,showMovieControls:true,resizeDuration:0.35,fadeDuration:0.35,displayNav:true,continuous:false,displayCounter:true,counterType:'default',viewportPadding:20,handleLgImages:'resize',initialHeight:160,initialWidth:320,enableKeys:true,keysClose:['c', 'q', 27],keysPrev:['p', 37],keysNext:['n', 39],handleUnsupported:'',text: {cancel:'Cancel',loading: 'loading',close:'<span class="shortcut">C</span>lose',next:'<span class="shortcut">N</span>ext',prev:'<span class="shortcut">P</span>revious',errors:{single: 'You must install the <a href="{0}">{1}</a> browser plugin to view this content.',shared: 'You must install both the <a href="{0}">{1}</a> and <a href="{2}">{3}</a> browser plugins to view this content.',either: 'You must install either the <a href="{0}">{1}</a> or the <a href="{2}">{3}</a> browser plugin to view this content.'}}};Shadowbox.init(options);}
--></script>I’ve looked at many frameworks over the years including Cairngorm, Mate, Hive and Gaia to name a few.
None of them have ever really caught my attention enough to feel like I should invest time mastering it.
Enter testing out PureMVC. Obviously this is one of the heavyweights of open source frameworks. I’ve had passing looks at [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve looked at many frameworks over the years including <a href="http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm" target="_blank">Cairngorm</a>, <a href="http://mate.asfusion.com/" target="_blank">Mate</a>, <a href="http://code.google.com/p/as-hive/" target="_blank">Hive</a> and <a href="http://www.gaiaflashframework.com/" target="_blank">Gaia</a> to name a few.</p>
<p>None of them have ever really caught my attention enough to feel like I should invest time mastering it.</p>
<p>Enter testing out PureMVC. Obviously this is one of the heavyweights of open source frameworks. I’ve had passing looks at it in the past but never really got into it so thought I’d put together a basic twitter app to give it a go.</p>
<p>The following application simply searches Twitter for the terms “creative”,”inspired”,”amazing” and “bored”,”frustrated”,”stressed” then compares the two sets of positive and negative emotions in a graph to see how inspired the world is feeling at any point in time.</p>
<p><small>(Please open the article to see the flash file or player.)</small></p>
<p><span id="more-122"></span><br />
PureMVC does have a quite steep learning curve and just getting to the “Hello World” state does take quite a lot of code. But things are really starting to make sense and I feel like a more mature developer by using it as I can see how much this framework naturally encourages code re-use, scalability and separation of interests.</p>
<p>In my opinion the most important thing is getting your head around the roles and responsibilities of the Mediator, Proxy and Command classes. My understanding of each is as follows.</p>
<p>Proxy classes are cached by the Model and contain code that manipulates a portion of data. Each Proxy represents a data object that may be asynchronous or not and can expose all or part of the data object it represents.</p>
<p>Mediator classes interact with view components and are cached by the View. The Mediator classes interact with the rest of the system to update and respond to interaction to and from the view component it represents.</p>
<p>Commands are only created when needed and is where the logic of the application resides. You create maps to notifications in the Application Facade. When a notification is sent from somewhere in the system that is mapped, a Command instance is created and executed interacting with other actors in the system and sending further notifications as necessary. It can for instance interact with multiple Proxy classes manipulating data in each and send a notification when complete that multiple Mediators are listening to, updating their respective view components as required.</p>
<p>As this is my first experience using PureMVC, any feedback would be most welcome.</p>
<p>Apart from PureMVC there are a number of open source projects that I use and encourage you to investigate if you don’t use them already including:<br />
<a href="http://code.google.com/p/bulk-loader/" target="_blank">Bulkloader </a>for loading my external assets.<br />
<a href="http://blog.greensock.com/tweenliteas3/" target="_blank">TweenLite </a>for tweening.<br />
<a href="http://demonsterdebugger.com/" target="_blank">DeMonsterDebugger </a>for debugging (this is awesome!)<br />
<a href="http://twitterscript.googlecode.com/" target="_blank">Twitterscript </a>for Twitter API interface.</p>
<p>And <a href="http://lab.publicreative.com/host/twitterhead/src.zip">here </a>is the source.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.publicreative.com/2009/05/puremvc-twitter-feed-demo/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
