<?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>Tom Cornilliac &#187; Frameworks</title>
	<atom:link href="http://www.tomcornilliac.com/category/frameworks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tomcornilliac.com</link>
	<description>Flex, AIR and Rich Internet Goodness</description>
	<lastBuildDate>Wed, 17 Jun 2009 15:40:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Artemis is dead, long live Merapi!</title>
		<link>http://www.tomcornilliac.com/2008/02/artemis-is-dead-long-live-merapi/</link>
		<comments>http://www.tomcornilliac.com/2008/02/artemis-is-dead-long-live-merapi/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 17:26:27 +0000</pubDate>
		<dc:creator>Tom Cornilliac</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Artemis]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Merapi]]></category>

		<guid isPermaLink="false">http://www.cornilliac.com/blog/?p=50</guid>
		<description><![CDATA[We knew it was coming but we didn&#8217;t know when or in what form. Adam Flater just posted that the Artemis project has officially been reborn as the Merapi project. The list of contributors looks impressive, including both developers and designers. For those of you not familiar with Artemis Merapi, it&#8217;s a framework for connecting [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://adamflater.blogspot.com/2008/02/meet-merapi.html' title='Merapi Logo'><img src='http://www.cornilliac.com/blog/wp-content/uploads/2008/02/merapilogo300.thumbnail.jpg' alt='Merapi Logo' align='right'/></a></p>
<p>We knew <a href="http://adamflater.blogspot.com/2008/01/future-of-artemis.html">it was coming</a> but we didn&#8217;t know when or in what form. <a href="http://adamflater.blogspot.com">Adam Flater</a> just posted that the Artemis project has officially been reborn as the <a href="http://adamflater.blogspot.com/2008/02/meet-merapi.html">Merapi project</a>. The list of contributors looks impressive, including both developers and designers.</p>
<p>For those of you not familiar with <del datetime="2008-02-05T16:59:19+00:00">Artemis</del> Merapi, it&#8217;s a framework for connecting Adobe AIR applications to the desktop using Java technology. Merapi picks-up where the AIR 1.0 runtime drops off, in that while AIR can read and write from the native file system it cannot launch native applications or interact with the shell. </p>
<p>Merapi has huge potential and I&#8217;m looking forward discovering what&#8217;s possible when we can combine the power of Java with the richness and ubiquity of Adobe AIR. These are exciting times indeed!</p>
<p>By the way&#8230;looks like the namesake might be <a href="http://en.wikipedia.org/wiki/Mount_Merapi">a mountain in Java Indonesia</a></p>
<p><em>Edit:<br />
Andrew Powell has also <a href="http://www.infoaccelerator.net/index.cfm?event=showEntry&#038;entryId=EA90DA24-FF30-C9A3-ADC312077D259100">posted a few words about Merapi</a> and a few more about why they chose the name. (02/05/08  09:37am PST)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomcornilliac.com/2008/02/artemis-is-dead-long-live-merapi/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Handling deferred view component creation within the PureMVC framework</title>
		<link>http://www.tomcornilliac.com/2008/01/handling-deferred-view-component-creation-within-the-puremvc-framework/</link>
		<comments>http://www.tomcornilliac.com/2008/01/handling-deferred-view-component-creation-within-the-puremvc-framework/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 19:24:15 +0000</pubDate>
		<dc:creator>Tom Cornilliac</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[PureMVC]]></category>

		<guid isPermaLink="false">http://www.cornilliac.com/blog/?p=44</guid>
		<description><![CDATA[For my last AIR project and my current Flex project I&#8217;ve been using the PureMVC ActionScript framework. It&#8217;s a solid framework and on the whole I&#8217;m enjoying working with it. When using PureMVC for Flex and AIR development one of the questions I see consistently is how to create mediators for deferred components. In other [...]]]></description>
			<content:encoded><![CDATA[<p> For my last AIR project and my current Flex project I&#8217;ve been using the <a href="http://www.puremvc.org">PureMVC</a> ActionScript framework. It&#8217;s a solid framework and on the whole I&#8217;m enjoying working with it. When using PureMVC for Flex and AIR development one of the questions I see consistently is how to create mediators for deferred components. In other words, if the view of your app uses a view stack how do you handle creating mediators on the children of the viewstack that are not created yet?  <span id="more-44"></span></p>
<p>PureMVC uses mediators for all communication from the model and controller to the view. Out of the box PureMVC normally creates the view mediators after creationComplete has fired and the model has been initialized. The reason for this is that mediators require a reference to a view component to work. In order to construct a mediator you first need an object or view component to pass to the constructor.</p>
<p>There are basically three different ways to handle this, two of which I don&#8217;t recommend using.</p>
<p><strong>1. <u>Use dummy objects to initialize mediators</u></strong><br />
<strong> </strong>If you know that your view component is not on the stage yet you could still create it&#8217;s mediator by passing a POASO (plain old actionscript object) to it&#8217;s constructor. I have two problems with this solution; One you&#8217;re unnecessarily using memory and two you have not treated the whole problem, you still need some type of event schema to reinitialize the mediator once the component has been created. <strong>I don&#8217;t recommend using this solution.</strong></p>
<p><strong>2. <u>Use creationPolicy=&#8221;all&#8221; to avoid deferred views</u><br />
</strong>By default components like ViewStack and TabNavigator on create their top level children at runtime. The remainder are created as the user navigates to them. You can use the creationPolicy=&#8221;all&#8221; attribute to override this behavior. This causes the application to create all the view components at runtime. <strong>This is a terrible idea and I cannot recommend it. </strong>What you are in effect saying to your user is &#8220;I don&#8217;t care about your memory or performance because I&#8217;m to lazy to code a decent solution&#8221; I know this is a bit dramatic but I hate when people use this attribute.</p>
<p><strong>3. <u>Use a custom Event subclass</u><br />
</strong>The idea here is to create an event subclass that the application mediator or another mediator can listen for and use to create new mediators. This event class has an extra property which holds a reference to the newly created component, other mediators can use this reference to construct a mediator for the component. This approach not only keeps your memory footprint smaller but it allows you to easily create and destroy mediators. <strong>Here&#8217;s an example of an Event subclass:</strong></p>
<p>You create your own constant names based on the event type you want your mediator to listen for.</p>
<p>[as]<br />
package com.tomcornilliac.myproject.events<br />
{<br />
	import flash.events.Event;</p>
<p>   	public class ComponentCreationEvent extends Event<br />
   	{<br />
      	// Publically accessible properties<br />
      	public var component:Object;</p>
<p>		//Constants used for routing withing PureMVC mediators<br />
		public static const SOME_EVENT:String = &#8220;gatewayCreated&#8221;;<br />
		public static const SOME_OTHER_EVENT:String = &#8220;gatewayStackCreated&#8221;;</p>
<p>		public function ComponentCreationEvent(type:String, component:Object, bubbles:Boolean=false, cancelable:Boolean=false)<br />
		{<br />
			super(type, bubbles, cancelable);<br />
			//Probably should have a getter/setter for this property<br />
			this.component = component;<br />
		}</p>
<p>		//You must override the clone method<br />
		override public function clone():Event<br />
		{<br />
			return new ComponentCreationEvent(type, component, bubbles, cancelable);<br />
		}<br />
	}<br />
}<br />
[/as]</p>
<p>An instance of this event is dispatched from your view component with a reference to its self. <em>Note that &#8220;bubbles&#8221; is set to true, this is required for the event to make it up the chain to whatever mediator is listening.</em><br />
[xml]<br />
<?xml version="1.0" encoding="utf-8"?></p>
<p><mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"<br />
	width="100%" height="100%" creationComplete="init(event)"></p>
<p>	<mx:Metadata><br />
		[Event(name="gatewayCreated", type="org.deschutes.grizzly.events.ComponentCreationEvent")]<br />
	</mx:Metadata></p>
<p>	<mx:Script><br />
		<![CDATA[<br />
			import com.tomcornilliac.myproject.events.ComponentCreationEvent;</p>
<p>			private function init(e:Event):void<br />
			{<br />
				dispatchEvent(new ComponentCreationEvent(ComponentCreationEvent.GATEWAY_CREATED, this, true));<br />
			}<br />
		]]&gt;<br />
	</mx:Script></p>
<p></mx:Canvas><br />
[/xml]</p>
<p>The listening mediator (in this case the ApplictionMediator) will respond to the event and create and register a new mediator for the newly created view component. Now it&#8217;s important to note that while I&#8217;m using the ApplicationMediator in this example, you can use any mediator you want, so long as the event will bubble-up to it.</p>
<p>[as]<br />
package com.tomcornilliac.myproject.view<br />
{<br />
	import com.tomcornilliac.myproject.events.ComponentCreationEvent;<br />
	import com.tomcornilliac.myproject.view.components.SomeComponent;<br />
	import org.puremvc.interfaces.IMediator;<br />
	import org.puremvc.interfaces.INotification;<br />
	import org.puremvc.patterns.mediator.Mediator;</p>
<p>	public class ApplicationMediator extends Mediator implements IMediator<br />
	{<br />
		//Canonical name of the mediator<br />
		public static const NAME:String = &#8216;ApplicationMediator&#8217;;</p>
<p>		//Constructor<br />
		public function ApplicationMediator(viewComponent:Object)<br />
		{<br />
			super(viewComponent);</p>
<p>			/**<br />
			 * Setup event listeners for components created dynamically<br />
			 */<br />
			 app.addEventListener(ComponentCreationEvent.SOME_EVENT, createNewMediator);<br />
		}</p>
<p>		private function createNewMediator(e:ComponentCreationEvent):void<br />
		{<br />
			//Create the new Mediator and initialize it with the component from our event<br />
			var mediator:SomeComponentMediator = new SomeComponentMediator(e.component);<br />
			//Register the mediator with the Application Facade<br />
			facade.registerMediator(mediator)<br />
			//That&#8217;s it now your view component is hooked-up and ready to handle I/O<br />
		}</p>
<p>		&#8230;.other methods<br />
[/as]</p>
<p>This technique is not only good for component creation but you could just as easily create a custom ComponentDestructionEvent and use it to remove Mediators off the stack when no longer needed. </p>
<p>If you would like more information about the PureMVC framework I encourage you to <a href="http://www.puremvc.org">visit the PureMVC web site</a>. The documentation is excellent and there&#8217;s even a training course to help you on your way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomcornilliac.com/2008/01/handling-deferred-view-component-creation-within-the-puremvc-framework/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Diving into MachBlog</title>
		<link>http://www.tomcornilliac.com/2007/01/diving-into-machblog/</link>
		<comments>http://www.tomcornilliac.com/2007/01/diving-into-machblog/#comments</comments>
		<pubDate>Tue, 16 Jan 2007 17:42:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Frameworks]]></category>

		<guid isPermaLink="false">http://tomcornilliac.netfirms.com/blog/?p=39</guid>
		<description><![CDATA[I work with Model-Glue and Coldspring regularly but I have yet to take time to evaluate the Mach-II framework. After listening to Matt Woodward and Peter J. Farrell talk-up the MachBlog beta on CF Weekly I thought to myself MachBlog would be a golden opportunity to evaluate Mach-II. Not only that but since I&#39;ve decide [...]]]></description>
			<content:encoded><![CDATA[<p>I work with Model-Glue and Coldspring regularly but I have yet to take time to evaluate the Mach-II framework. After listening to Matt Woodward and Peter J. Farrell talk-up the MachBlog beta on CF Weekly I thought to myself MachBlog would be a golden opportunity to evaluate Mach-II. Not only that but since I&#39;ve decide to start blogging in 2007 MachBlog will meet that need as well. So if you&#39;re not reading this post from your favorite feed aggregator then your looking at MachBlog (Beta 1 at the time of writing).</p>
<p>First impressions&#8230;So far I&#39;m really impressed with MachBlog. Matt was kind enough to let me have read access to the Alpha code so I&#39;ve got a bit of a jump start preping for the beta. Skinning is an especially nice feature. MachBlog comes with three skin choices but with very little effort you can create your own skin.&nbsp; I created my own skin based on an open-source design from openwebdesign.org. For a beta product MachBlog is suprisingly feature rich. Administration contains the usual suspects: Entry, Category, Comment, Trackback, Aggregator, User and Subscription admin. I have yet to find myself in the Db tweaking data.</p>
<p>What&#39;s missing IMO&#8230;No XMLRPC support (yet). Matt mentioned in an email that XMLRPC support is in the future plans.</p>
<p>MachBlog is billed as a reference application for the use of Mach-II and ColdSpring. Matt and Peter have accomplished that and a lot more. If learning Mach-II, ColdSpring or OO techniques is on your radar MachBlog is an excellent place to start.</p>
<p>I&#39;m excited to learn a ton about Mach-II from this app!&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomcornilliac.com/2007/01/diving-into-machblog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
