<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: Cairngorm vs. Joe Berkovitz&#8217;s MVCS	</title>
	<atom:link href="https://jessewarden.com/2007/01/cairngorm-vs-joe-berkovitzs-mvcs.html/feed" rel="self" type="application/rss+xml" />
	<link>https://jessewarden.com/2007/01/cairngorm-vs-joe-berkovitzs-mvcs.html</link>
	<description>Software &#124; Fitness &#124; Gaming</description>
	<lastBuildDate>Tue, 26 May 2009 06:27:25 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: sathish		</title>
		<link>https://jessewarden.com/2007/01/cairngorm-vs-joe-berkovitzs-mvcs.html/comment-page-1#comment-174705</link>

		<dc:creator><![CDATA[sathish]]></dc:creator>
		<pubDate>Tue, 26 May 2009 06:27:25 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=1111#comment-174705</guid>

					<description><![CDATA[please help in solving above posted issue]]></description>
			<content:encoded><![CDATA[<p>please help in solving above posted issue</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: sathish		</title>
		<link>https://jessewarden.com/2007/01/cairngorm-vs-joe-berkovitzs-mvcs.html/comment-page-1#comment-174704</link>

		<dc:creator><![CDATA[sathish]]></dc:creator>
		<pubDate>Tue, 26 May 2009 06:26:55 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=1111#comment-174704</guid>

					<description><![CDATA[Hi Jesse,

 

I have seen ur article and ur comment on using ModuleLocator in Cairngorm Framework  â€¦ and it is really fantastic.

 

Actually Iâ€<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" />m too working on the same approach for my application development. But I have been struck with a problem that is, not able to load the Module in a ModuleLoader through this approach.

 

In my application I have the following files:

 

1)       CheckLogin.mxml â€“ Main Application Mxml contains the Services, Front Controller and a script (AppStarter)

2)       AppStarter.as â€“ It is the actionscript which extends the container to create the ModuleLoader to load the default LoginModule

3)       LoginEvent.as â€“ It is for defining the loginevent generated by the Login Button.

4)       LoginCommand.as â€“ It is for the executing after the event had fired, here I have called the Appstarter to load the Thanksmodule in the ModularLoader.

 

My application loads the Default Module (Login Module) properly and on submitting the event it fires properly and dispatches it to the Login Command, the Command also executes the method in the AppStarter for loading the Module in the ModuleLoader, here in this area I didnâ€<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" />t find any response at all. It doesnâ€<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" />t load the New Module I have specified to load in the Loader.]]></description>
			<content:encoded><![CDATA[<p>Hi Jesse,</p>
<p>I have seen ur article and ur comment on using ModuleLocator in Cairngorm Framework  â€¦ and it is really fantastic.</p>
<p>Actually Iâ€™m too working on the same approach for my application development. But I have been struck with a problem that is, not able to load the Module in a ModuleLoader through this approach.</p>
<p>In my application I have the following files:</p>
<p>1)       CheckLogin.mxml â€“ Main Application Mxml contains the Services, Front Controller and a script (AppStarter)</p>
<p>2)       AppStarter.as â€“ It is the actionscript which extends the container to create the ModuleLoader to load the default LoginModule</p>
<p>3)       LoginEvent.as â€“ It is for defining the loginevent generated by the Login Button.</p>
<p>4)       LoginCommand.as â€“ It is for the executing after the event had fired, here I have called the Appstarter to load the Thanksmodule in the ModularLoader.</p>
<p>My application loads the Default Module (Login Module) properly and on submitting the event it fires properly and dispatches it to the Login Command, the Command also executes the method in the AppStarter for loading the Module in the ModuleLoader, here in this area I didnâ€™t find any response at all. It doesnâ€™t load the New Module I have specified to load in the Loader.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Peter		</title>
		<link>https://jessewarden.com/2007/01/cairngorm-vs-joe-berkovitzs-mvcs.html/comment-page-1#comment-19003</link>

		<dc:creator><![CDATA[Peter]]></dc:creator>
		<pubDate>Mon, 15 Oct 2007 05:00:18 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=1111#comment-19003</guid>

					<description><![CDATA[Jesse,

Check out Cliff Hall&#039;s PureMVC (http://puremvc.org/). It&#039;s cleaner and lighter then Cairngorm. PureMVC solves many of the Cairngorm singleton problems.]]></description>
			<content:encoded><![CDATA[<p>Jesse,</p>
<p>Check out Cliff Hall&#8217;s PureMVC (<a href="http://puremvc.org/" rel="nofollow ugc">http://puremvc.org/</a>). It&#8217;s cleaner and lighter then Cairngorm. PureMVC solves many of the Cairngorm singleton problems.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: JesterXL		</title>
		<link>https://jessewarden.com/2007/01/cairngorm-vs-joe-berkovitzs-mvcs.html/comment-page-1#comment-4085</link>

		<dc:creator><![CDATA[JesterXL]]></dc:creator>
		<pubDate>Mon, 05 Feb 2007 08:19:16 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=1111#comment-4085</guid>

					<description><![CDATA[If the module.swf is being loaded from the same domain (security sandbox), no, they should not embed the same Cairngorm classes.  They can use them, you&#039;ll just use the load externs trick where the compiler generates the classes the module uses, and then you then use that file as the compiler&#039;s exclude, as &lt;a href=&quot;http://livedocs.macromedia.com/flex/201/html/modular_083_4.html&quot; rel=&quot;nofollow&quot;&gt;shown here&lt;/a&gt;.

So, you can still bind to the ModelLocator, but not actually have the ModelLocator compiled into the Module.swf.

The tricky thing here, however, is the Event classes.  Assuming your application has &lt;a href=&quot;http://livedocs.macromedia.com/flex/201/html/modular_083_5.html#172500&quot; rel=&quot;nofollow&quot;&gt;trust&lt;/a&gt; with the module, you have a few options.

First, you could simply just use Modules for their GUI portions, meaning, the GUI code &#038; controls that make it up are what is being &#039;loaded later&#039;, and thus taking advantage of modules in that it&#039;s not loaded up front.  Your Event classes to trigger Cairngorm Commands could be in the same externalized file, meaning the main application compiles the class in, and the Module will just use that one when it loads in. 

Second, you could only embed the Use cases (Events + Command classes) in the module.  When it loads, it&#039;ll have to register it&#039;s Event&#039;s with Commands to run in the Controller.  While this is nice in that further classes are abstracted to the module, you have a danger of a module &#039;leaving it&#039;s mess&#039; when it leaves.  This means, Garbage Collection may not collect everything, or even the module since some classes that reference it may still exist.  This is dangerous, but if you watch your self, you can take most advantage of what Modules have to offer.

Third option is to go with the contract concept (interfaces), and extend the main ones they give you with talking to modules.  You basically write an interface that &#039;knows&#039; about Cairngorm stuff, and the Module has the same thing.  When the Module is loaded, it tells the shell application the Events &#038; Commands it would like to register.  When the Module is unloaded, this contract ensures that the Module &#039;checks out&#039;.  Remember the &lt;a href=&quot;http://www.imdb.com/title/tt0080455/&quot; rel=&quot;nofollow&quot;&gt;Blue&#039;s Brothers&lt;/a&gt;, when Jake leaves prison and get&#039;s his personal possessions on the way out, each being checked on a form all formal?  It&#039;s the same process with modules.  If they are &#039;Cairngorm Modules&#039;, they will have the same interface the shell has, and both can &#039;check in classes&#039; and &#039;check out classes&#039; to ensure the Garbage Collector can do his job.  When you get here, check your coat at the door.  When you leave, don&#039;t forget your coat.

Fourth option is do #3, but have Modules know nothing about Cairngorm.  Instead, they just emit events, similar to how a Button emits a click event.  The Module loader, or whatever class is loading in the modules, is responsible for running Cairngorm events via the CairngormEventDispatcher.  That way, Modules have nothing to do with Cairngorm.  This is kind of hard, though, because as your Modules increase in scope, you&#039;ll start to want a framework.  Fine line.

Fifth option is to use #4, but allow ModelLocator to be used by the Module for data-binding purposes.  An OOP purist would stick to #4, though.

Me?  I&#039;d use #3 and #4.  Convention &#038; contracts rock the mic.


]]></description>
			<content:encoded><![CDATA[<p>If the module.swf is being loaded from the same domain (security sandbox), no, they should not embed the same Cairngorm classes.  They can use them, you&#8217;ll just use the load externs trick where the compiler generates the classes the module uses, and then you then use that file as the compiler&#8217;s exclude, as <a href="http://livedocs.macromedia.com/flex/201/html/modular_083_4.html" rel="nofollow">shown here</a>.</p>
<p>So, you can still bind to the ModelLocator, but not actually have the ModelLocator compiled into the Module.swf.</p>
<p>The tricky thing here, however, is the Event classes.  Assuming your application has <a href="http://livedocs.macromedia.com/flex/201/html/modular_083_5.html#172500" rel="nofollow">trust</a> with the module, you have a few options.</p>
<p>First, you could simply just use Modules for their GUI portions, meaning, the GUI code &amp; controls that make it up are what is being &#8216;loaded later&#8217;, and thus taking advantage of modules in that it&#8217;s not loaded up front.  Your Event classes to trigger Cairngorm Commands could be in the same externalized file, meaning the main application compiles the class in, and the Module will just use that one when it loads in. </p>
<p>Second, you could only embed the Use cases (Events + Command classes) in the module.  When it loads, it&#8217;ll have to register it&#8217;s Event&#8217;s with Commands to run in the Controller.  While this is nice in that further classes are abstracted to the module, you have a danger of a module &#8216;leaving it&#8217;s mess&#8217; when it leaves.  This means, Garbage Collection may not collect everything, or even the module since some classes that reference it may still exist.  This is dangerous, but if you watch your self, you can take most advantage of what Modules have to offer.</p>
<p>Third option is to go with the contract concept (interfaces), and extend the main ones they give you with talking to modules.  You basically write an interface that &#8216;knows&#8217; about Cairngorm stuff, and the Module has the same thing.  When the Module is loaded, it tells the shell application the Events &amp; Commands it would like to register.  When the Module is unloaded, this contract ensures that the Module &#8216;checks out&#8217;.  Remember the <a href="http://www.imdb.com/title/tt0080455/" rel="nofollow">Blue&#8217;s Brothers</a>, when Jake leaves prison and get&#8217;s his personal possessions on the way out, each being checked on a form all formal?  It&#8217;s the same process with modules.  If they are &#8216;Cairngorm Modules&#8217;, they will have the same interface the shell has, and both can &#8216;check in classes&#8217; and &#8216;check out classes&#8217; to ensure the Garbage Collector can do his job.  When you get here, check your coat at the door.  When you leave, don&#8217;t forget your coat.</p>
<p>Fourth option is do #3, but have Modules know nothing about Cairngorm.  Instead, they just emit events, similar to how a Button emits a click event.  The Module loader, or whatever class is loading in the modules, is responsible for running Cairngorm events via the CairngormEventDispatcher.  That way, Modules have nothing to do with Cairngorm.  This is kind of hard, though, because as your Modules increase in scope, you&#8217;ll start to want a framework.  Fine line.</p>
<p>Fifth option is to use #4, but allow ModelLocator to be used by the Module for data-binding purposes.  An OOP purist would stick to #4, though.</p>
<p>Me?  I&#8217;d use #3 and #4.  Convention &amp; contracts rock the mic.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Chris		</title>
		<link>https://jessewarden.com/2007/01/cairngorm-vs-joe-berkovitzs-mvcs.html/comment-page-1#comment-4084</link>

		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Mon, 05 Feb 2007 05:17:44 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=1111#comment-4084</guid>

					<description><![CDATA[Great article.
Just picking up on Cairngorm/flex and this was very helpful to see it compared to Joe&#039;s MVC.

I&#039;m sure its in the works, but neither framework has really talked about best practices with the new mx:Modules.  For example, does each module have its own model locator, its own services?  How should the front controller learn about the module&#039;s events/commands and register them.  Any ideas or advice?]]></description>
			<content:encoded><![CDATA[<p>Great article.<br />
Just picking up on Cairngorm/flex and this was very helpful to see it compared to Joe&#8217;s MVC.</p>
<p>I&#8217;m sure its in the works, but neither framework has really talked about best practices with the new mx:Modules.  For example, does each module have its own model locator, its own services?  How should the front controller learn about the module&#8217;s events/commands and register them.  Any ideas or advice?</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
