<?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: ARP: Controller vs. Glorified Hashmap	</title>
	<atom:link href="https://jessewarden.com/2005/08/arp-controller-vs-glorified-hashmap.html/feed" rel="self" type="application/rss+xml" />
	<link>https://jessewarden.com/2005/08/arp-controller-vs-glorified-hashmap.html</link>
	<description>Software &#124; Fitness &#124; Gaming</description>
	<lastBuildDate>Thu, 24 Nov 2005 13:42:04 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Lost		</title>
		<link>https://jessewarden.com/2005/08/arp-controller-vs-glorified-hashmap.html/comment-page-1#comment-2826</link>

		<dc:creator><![CDATA[Lost]]></dc:creator>
		<pubDate>Thu, 24 Nov 2005 13:42:04 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=852#comment-2826</guid>

					<description><![CDATA[Please could someone help me out?  I&#039;ve gone done the road of loading external swfs to keep things as modular as possible, but I now have no idea how to register the swf with the Application. There seems to be a lot of high level discussion on the ARP mailing list, but no one is actually giving concrete examples.

Many thanks.


]]></description>
			<content:encoded><![CDATA[<p>Please could someone help me out?  I&#8217;ve gone done the road of loading external swfs to keep things as modular as possible, but I now have no idea how to register the swf with the Application. There seems to be a lot of high level discussion on the ARP mailing list, but no one is actually giving concrete examples.</p>
<p>Many thanks.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Grant Davies		</title>
		<link>https://jessewarden.com/2005/08/arp-controller-vs-glorified-hashmap.html/comment-page-1#comment-2825</link>

		<dc:creator><![CDATA[Grant Davies]]></dc:creator>
		<pubDate>Mon, 22 Aug 2005 22:18:21 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=852#comment-2825</guid>

					<description><![CDATA[actually my system controller is a glorified hashmap/event dispatcher but my other controllers are &#039;real&#039; controllers :)]]></description>
			<content:encoded><![CDATA[<p>actually my system controller is a glorified hashmap/event dispatcher but my other controllers are &#8216;real&#8217; controllers :)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Grant Davies		</title>
		<link>https://jessewarden.com/2005/08/arp-controller-vs-glorified-hashmap.html/comment-page-1#comment-2824</link>

		<dc:creator><![CDATA[Grant Davies]]></dc:creator>
		<pubDate>Mon, 22 Aug 2005 22:07:30 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=852#comment-2824</guid>

					<description><![CDATA[Jesse, 

oops, didn&#039;t mean to insult your controller :)

Why don&#039;t you make a controller tied to the business you are trying to perform and have a map between and event string and a command.  The reason I don&#039;t like my view&#039;s directly firing a command is sometimes my views get used over different applications, so the command that gets fired based on an event may change.

You could even throw up a controller on the fly when you create the particular view

controller = controllerFactory.getGetController();
controller.addCommand(&#039;login&#039;, loginCommand);
controller.addCommand(&#039;changePassword&#039;, changePasswordCommand);
view.addEventListener(controller);

I tend to have a few small controllers rather than one huge one. Plus in a real application most views don&#039;t exist at compile time so you need a way to dynamically map events and commands.

One thing I&#039;m doing and I&#039;m still not sure its &#039;honest&#039; is allowing my command to publish business events not &#039;click&#039; but events like &#039;UserRolesLoaded&#039;;

For example: once the user has logged into my application I do a lot of preloading of data for performance, I want the user to take 1 hit after login to intialize the application.  I have to load a lot of stuff and for example, I load all the possible roles a user can be assigned to (its a role based authorization administration system).  So after they login my application dispatches a &#039;getAllRoles&#039; event which is mapped to the GetAllRoles command, once this command has finished it dispatches a &#039;UserRolesLoaded&#039; event.  This issue I have here is I don&#039;t really want my application as a &#039;listener&#039; of the command, I actually want some &#039;system events&#039; to be global so instead of my command 
displatching the event my master controller does  

e.g

SystemController.getInstance.dispatchEvent({type:&#039;UserRolesLoaded&#039;});

So now my applcation can do this :
SystemController.getInstance.addEventListener(&#039;UserRolesLoaded&#039;, Delegetate.create(this, onRolesLoaded);

I hope this is clear but what I think I have is something loosely coupled but also not too heavy.  The only issue I have now is my commands are sometimes invoked from a view and sometimes due to a system event so inside my command I have to check if viewref is null before doing anything as sometimes there may not be a viewRef.

I think I&#039;ve got basically what you did with your ARP extensions I just didn&#039;t find the view being tightly coupled to a command like your extensions would work for the type of projects I do where I do have a lot of view re-use but commands change often.]]></description>
			<content:encoded><![CDATA[<p>Jesse, </p>
<p>oops, didn&#8217;t mean to insult your controller :)</p>
<p>Why don&#8217;t you make a controller tied to the business you are trying to perform and have a map between and event string and a command.  The reason I don&#8217;t like my view&#8217;s directly firing a command is sometimes my views get used over different applications, so the command that gets fired based on an event may change.</p>
<p>You could even throw up a controller on the fly when you create the particular view</p>
<p>controller = controllerFactory.getGetController();<br />
controller.addCommand(&#8216;login&#8217;, loginCommand);<br />
controller.addCommand(&#8216;changePassword&#8217;, changePasswordCommand);<br />
view.addEventListener(controller);</p>
<p>I tend to have a few small controllers rather than one huge one. Plus in a real application most views don&#8217;t exist at compile time so you need a way to dynamically map events and commands.</p>
<p>One thing I&#8217;m doing and I&#8217;m still not sure its &#8216;honest&#8217; is allowing my command to publish business events not &#8216;click&#8217; but events like &#8216;UserRolesLoaded&#8217;;</p>
<p>For example: once the user has logged into my application I do a lot of preloading of data for performance, I want the user to take 1 hit after login to intialize the application.  I have to load a lot of stuff and for example, I load all the possible roles a user can be assigned to (its a role based authorization administration system).  So after they login my application dispatches a &#8216;getAllRoles&#8217; event which is mapped to the GetAllRoles command, once this command has finished it dispatches a &#8216;UserRolesLoaded&#8217; event.  This issue I have here is I don&#8217;t really want my application as a &#8216;listener&#8217; of the command, I actually want some &#8216;system events&#8217; to be global so instead of my command<br />
displatching the event my master controller does  </p>
<p>e.g</p>
<p>SystemController.getInstance.dispatchEvent({type:&#8217;UserRolesLoaded&#8217;});</p>
<p>So now my applcation can do this :<br />
SystemController.getInstance.addEventListener(&#8216;UserRolesLoaded&#8217;, Delegetate.create(this, onRolesLoaded);</p>
<p>I hope this is clear but what I think I have is something loosely coupled but also not too heavy.  The only issue I have now is my commands are sometimes invoked from a view and sometimes due to a system event so inside my command I have to check if viewref is null before doing anything as sometimes there may not be a viewRef.</p>
<p>I think I&#8217;ve got basically what you did with your ARP extensions I just didn&#8217;t find the view being tightly coupled to a command like your extensions would work for the type of projects I do where I do have a lot of view re-use but commands change often.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: JesterXL		</title>
		<link>https://jessewarden.com/2005/08/arp-controller-vs-glorified-hashmap.html/comment-page-1#comment-2823</link>

		<dc:creator><![CDATA[JesterXL]]></dc:creator>
		<pubDate>Sat, 20 Aug 2005 21:01:16 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=852#comment-2823</guid>

					<description><![CDATA[Thanks mate... I guess I&#039;m so excited I&#039;ve finally reached a point where I enjoy working with my code; I don&#039;t hate it.  To me, that&#039;s a pinnacle I&#039;ve been wanting to reach for years now.  I, frankly, don&#039;t know what else to do at this piont, but what I&#039;ve been doing, and that&#039;s keep improving (or making perceived improvements) on my current workflow.]]></description>
			<content:encoded><![CDATA[<p>Thanks mate&#8230; I guess I&#8217;m so excited I&#8217;ve finally reached a point where I enjoy working with my code; I don&#8217;t hate it.  To me, that&#8217;s a pinnacle I&#8217;ve been wanting to reach for years now.  I, frankly, don&#8217;t know what else to do at this piont, but what I&#8217;ve been doing, and that&#8217;s keep improving (or making perceived improvements) on my current workflow.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: jeremy		</title>
		<link>https://jessewarden.com/2005/08/arp-controller-vs-glorified-hashmap.html/comment-page-1#comment-2822</link>

		<dc:creator><![CDATA[jeremy]]></dc:creator>
		<pubDate>Sat, 20 Aug 2005 18:42:25 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=852#comment-2822</guid>

					<description><![CDATA[hi jesse,

i took a very alike approach that you handle the whole app with one Application class (which contains many views), but i do have many view-controller pairs (usaually i see those pair as some kind of windows form) although they may be combined in one class (in flash).

I don&#039;t think it&#039;s wrong to &#039;bend&#039; the approach since framework are there to help us get the things done, as long as it works. (personaly i have a very-heavily-bent-ARP-alike framework, with Application and Form template class doing all the underlying stuff, but what matters is that framework helped me to gain productivity by 2-5 times :-)]]></description>
			<content:encoded><![CDATA[<p>hi jesse,</p>
<p>i took a very alike approach that you handle the whole app with one Application class (which contains many views), but i do have many view-controller pairs (usaually i see those pair as some kind of windows form) although they may be combined in one class (in flash).</p>
<p>I don&#8217;t think it&#8217;s wrong to &#8216;bend&#8217; the approach since framework are there to help us get the things done, as long as it works. (personaly i have a very-heavily-bent-ARP-alike framework, with Application and Form template class doing all the underlying stuff, but what matters is that framework helped me to gain productivity by 2-5 times :-)</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
