<?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&#8217;s ViewLocator &#038; ViewHelpers Explained for Flash Developers	</title>
	<atom:link href="https://jessewarden.com/2005/11/cairngorms-viewlocator-viewhelpers-explained-for-flash-developers.html/feed" rel="self" type="application/rss+xml" />
	<link>https://jessewarden.com/2005/11/cairngorms-viewlocator-viewhelpers-explained-for-flash-developers.html</link>
	<description>Software &#124; Fitness &#124; Gaming</description>
	<lastBuildDate>Mon, 05 Jan 2009 11:00:45 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: John		</title>
		<link>https://jessewarden.com/2005/11/cairngorms-viewlocator-viewhelpers-explained-for-flash-developers.html/comment-page-1#comment-146713</link>

		<dc:creator><![CDATA[John]]></dc:creator>
		<pubDate>Mon, 05 Jan 2009 11:00:45 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=903#comment-146713</guid>

					<description><![CDATA[http://weblogs.macromedia.com/paulw/archives/2007/11/presentation_pa_4.html]]></description>
			<content:encoded><![CDATA[<p><a href="http://weblogs.macromedia.com/paulw/archives/2007/11/presentation_pa_4.html" rel="nofollow ugc">http://weblogs.macromedia.com/paulw/archives/2007/11/presentation_pa_4.html</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: nwebb		</title>
		<link>https://jessewarden.com/2005/11/cairngorms-viewlocator-viewhelpers-explained-for-flash-developers.html/comment-page-1#comment-4405</link>

		<dc:creator><![CDATA[nwebb]]></dc:creator>
		<pubDate>Wed, 18 Jul 2007 10:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=903#comment-4405</guid>

					<description><![CDATA[First, sorry for digging up such a very old post(!) - there doesn&#039;t seem to be a great deal of info posted about ViewHelpers. 

I was wondering whether ViewHelpers were correct if used in this scenario:

If my Command sets some data on the Model, I can make changes in my View easily (because I can bind the View to the Model), but what if I want to do something to the View, but I am not setting any values on the model? 

(note: Should there ever be such a scenario, or does this mean I am using a Command where I shouldn&#039;t?)

As the Command should not know anything about the View I considered using ViewHelpers. Thoughts welcomed.]]></description>
			<content:encoded><![CDATA[<p>First, sorry for digging up such a very old post(!) &#8211; there doesn&#8217;t seem to be a great deal of info posted about ViewHelpers. </p>
<p>I was wondering whether ViewHelpers were correct if used in this scenario:</p>
<p>If my Command sets some data on the Model, I can make changes in my View easily (because I can bind the View to the Model), but what if I want to do something to the View, but I am not setting any values on the model? </p>
<p>(note: Should there ever be such a scenario, or does this mean I am using a Command where I shouldn&#8217;t?)</p>
<p>As the Command should not know anything about the View I considered using ViewHelpers. Thoughts welcomed.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Doug Keen		</title>
		<link>https://jessewarden.com/2005/11/cairngorms-viewlocator-viewhelpers-explained-for-flash-developers.html/comment-page-1#comment-3045</link>

		<dc:creator><![CDATA[Doug Keen]]></dc:creator>
		<pubDate>Wed, 02 Nov 2005 18:23:22 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=903#comment-3045</guid>

					<description><![CDATA[Grant... I&#039;m right there with you.  I did essentially the same thing on a fairly large Flex project (using Cairngorm) that was recently completed.  In working with a team of 3 concurrently developing the same Flex app, the event-driven view approach seemed to work much better than a ViewHelper/ViewLocator approach.  We actually started with the latter, and ended up refactoring to the former.

We also avoided use of the ViewHelper for the views&#039; &#039;helper methods&#039; (data-refresh logic, etc).  Instead, we put the script in a separate file with the same name as the MXML file, but having the &#039;.as&#039; extension.  Then we just did a &#060;mx:Script source=&#039;&#060;&#060;scriptFile&#062;&#062;&#039; /&#062; to include that script file into the MXML file.  This worked out well, because you avoid any overhead (although tiny) of registering the ViewHelper with the ViewLocator.  Also, your script file, when included directly into the MXML file, becomes part of the same class as your MXML components, so all the UI components in the MXML are local (no more &#039;view.___&#039; references), which also means you can make all your helper methods private.  This results in a nice convention... UI component layout is in your MXML files, UI component interaction, event handling logic, and data refresh logic is in your AS files.


]]></description>
			<content:encoded><![CDATA[<p>Grant&#8230; I&#8217;m right there with you.  I did essentially the same thing on a fairly large Flex project (using Cairngorm) that was recently completed.  In working with a team of 3 concurrently developing the same Flex app, the event-driven view approach seemed to work much better than a ViewHelper/ViewLocator approach.  We actually started with the latter, and ended up refactoring to the former.</p>
<p>We also avoided use of the ViewHelper for the views&#8217; &#8216;helper methods&#8217; (data-refresh logic, etc).  Instead, we put the script in a separate file with the same name as the MXML file, but having the &#8216;.as&#8217; extension.  Then we just did a &lt;mx:Script source='&lt;&lt;scriptFile&gt;&gt;&#8217; /&gt; to include that script file into the MXML file.  This worked out well, because you avoid any overhead (although tiny) of registering the ViewHelper with the ViewLocator.  Also, your script file, when included directly into the MXML file, becomes part of the same class as your MXML components, so all the UI components in the MXML are local (no more &#8216;view.___&#8217; references), which also means you can make all your helper methods private.  This results in a nice convention&#8230; UI component layout is in your MXML files, UI component interaction, event handling logic, and data refresh logic is in your AS files.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: JesterXL		</title>
		<link>https://jessewarden.com/2005/11/cairngorms-viewlocator-viewhelpers-explained-for-flash-developers.html/comment-page-1#comment-3044</link>

		<dc:creator><![CDATA[JesterXL]]></dc:creator>
		<pubDate>Wed, 02 Nov 2005 17:28:43 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=903#comment-3044</guid>

					<description><![CDATA[Yeah, I stole ModelLocator for use in ARP a long time ago, very easily seeing it&#039;s value.

ViewHelpers, however, will take a project using them for me to really grasp their value.]]></description>
			<content:encoded><![CDATA[<p>Yeah, I stole ModelLocator for use in ARP a long time ago, very easily seeing it&#8217;s value.</p>
<p>ViewHelpers, however, will take a project using them for me to really grasp their value.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Steven Webster		</title>
		<link>https://jessewarden.com/2005/11/cairngorms-viewlocator-viewhelpers-explained-for-flash-developers.html/comment-page-1#comment-3043</link>

		<dc:creator><![CDATA[Steven Webster]]></dc:creator>
		<pubDate>Wed, 02 Nov 2005 12:22:25 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=903#comment-3043</guid>

					<description><![CDATA[Jesse ... so glad you finally saw the light, a point release after we kinda stopped advocating you use View Helpers so much with Flex.

I maintain the value of the View Helper when developing RIA with Flash; for brevity (and since neither you nor I are building RIA with Flash much anymore ... welcome to the dark side by the way) I&#039;ll omit the discussion here.

With Flex however, we found people over-using View Helpers beyond their original intent.  Data-binding is a powerful mechanism in the Flex framework, that provides a neat way for our view to listen to the model.  With View Helpers, developers would tend to get procedural about their view ... using view helpers to set stuff on the view.  With data-binding however, the view observes the model, and updates when the model changes.

That&#039;s why we introduced the ModelLocator pattern; which isn&#039;t a Core J2EE Pattern that we borrowed into Cairngorm, but is a pattern we introduced specifically into Cairngorm for building RIA with Flex.  Using the ModelLocator, we have a singleton instance for State to be held, and for views to bind to that State.  Commands can manipulate the model, views can bind to the model, decoupling of model and view is achieved.

We still use View Helpers where we need to &#039;do stuff to the model before we render it in the view&#039;, but the need for these classes greatly reduces when you apply the ModelLocator strategy correctly.

In my recent talk at MAX, I went through the Cairngorm Store application (current build, not the build currently in public domain) and covered off all these patterns.  Just as soon as I&#039;ve presented the same talk at MAX Greater China in Hong Kong this month, I&#039;ll record it and put it online.]]></description>
			<content:encoded><![CDATA[<p>Jesse &#8230; so glad you finally saw the light, a point release after we kinda stopped advocating you use View Helpers so much with Flex.</p>
<p>I maintain the value of the View Helper when developing RIA with Flash; for brevity (and since neither you nor I are building RIA with Flash much anymore &#8230; welcome to the dark side by the way) I&#8217;ll omit the discussion here.</p>
<p>With Flex however, we found people over-using View Helpers beyond their original intent.  Data-binding is a powerful mechanism in the Flex framework, that provides a neat way for our view to listen to the model.  With View Helpers, developers would tend to get procedural about their view &#8230; using view helpers to set stuff on the view.  With data-binding however, the view observes the model, and updates when the model changes.</p>
<p>That&#8217;s why we introduced the ModelLocator pattern; which isn&#8217;t a Core J2EE Pattern that we borrowed into Cairngorm, but is a pattern we introduced specifically into Cairngorm for building RIA with Flex.  Using the ModelLocator, we have a singleton instance for State to be held, and for views to bind to that State.  Commands can manipulate the model, views can bind to the model, decoupling of model and view is achieved.</p>
<p>We still use View Helpers where we need to &#8216;do stuff to the model before we render it in the view&#8217;, but the need for these classes greatly reduces when you apply the ModelLocator strategy correctly.</p>
<p>In my recent talk at MAX, I went through the Cairngorm Store application (current build, not the build currently in public domain) and covered off all these patterns.  Just as soon as I&#8217;ve presented the same talk at MAX Greater China in Hong Kong this month, I&#8217;ll record it and put it online.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
