<?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"
	>
<channel>
	<title>Comments on: Flex View Component Techniques in MXML &#38; AS</title>
	<atom:link href="http://blog.tsclausing.com/post/28/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.tsclausing.com/post/28</link>
	<description>Personal &#38; Professional Blog of T. Scot Clausing // Adobe Flex Consultant in Nashville, TN</description>
	<pubDate>Fri, 10 Sep 2010 20:38:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Jon Cruz</title>
		<link>http://blog.tsclausing.com/post/28#comment-360</link>
		<dc:creator>Jon Cruz</dc:creator>
		<pubDate>Thu, 18 Jun 2009 20:58:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tsclausing.com/post/28#comment-360</guid>
		<description>Thanks for sharing this.  Very well written.  

Just a note to others reading this, you also get a lot of info/insight from the comments within the code, (the Pros/Cons sections are concise).

View Source is your friend.</description>
		<content:encoded><![CDATA[<p>Thanks for sharing this.  Very well written.  </p>
<p>Just a note to others reading this, you also get a lot of info/insight from the comments within the code, (the Pros/Cons sections are concise).</p>
<p>View Source is your friend.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anoop</title>
		<link>http://blog.tsclausing.com/post/28#comment-192</link>
		<dc:creator>Anoop</dc:creator>
		<pubDate>Wed, 05 Nov 2008 12:53:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tsclausing.com/post/28#comment-192</guid>
		<description>Intersting article. i am also planning to do the same but my requirement to create a eclipse kind of custmizable perspective where i have view and editor both in one container so most of the time I would prefer AS and it should be reusbale so i will make this as a component and then i can reuse that in .mxml. any other suggestion which u would like to share.</description>
		<content:encoded><![CDATA[<p>Intersting article. i am also planning to do the same but my requirement to create a eclipse kind of custmizable perspective where i have view and editor both in one container so most of the time I would prefer AS and it should be reusbale so i will make this as a component and then i can reuse that in .mxml. any other suggestion which u would like to share.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: T. Scot Clausing</title>
		<link>http://blog.tsclausing.com/post/28#comment-39</link>
		<dc:creator>T. Scot Clausing</dc:creator>
		<pubDate>Fri, 29 Feb 2008 22:02:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tsclausing.com/post/28#comment-39</guid>
		<description>Tink,

I enjoyed your original post and I appreciate your reply to mine.  

In response to paragraph 3 "It has been known ...":
- Yep.  I should have made that clear.  Thanks.

And paragraph 4 "The simple and code-in-front classes I have never used, but wouldn’t it mean ...":
1) Designers and developers need to agree on two things: what events the view dispatches, and what properties the view will make accessible.  Then they can each do their job independently.  This works well for me - thoughts?

2) I am only interested in preserving the base MXML component or layout for reuse because I actually do reuse these across applications at times.  In my experience, the logic has been specific to an application and framework and will rarely if ever be reused in full.

But still, if you wanted to swap base views and use the same logic (when would you do this?) it may make more sense for the views to extend the logic instead of duplicating code ... but then you're back at the 'code-behind' problem.  Do you have an elegant solution?

3) View helpers:
I'll add that to the list.  In the meantime &lt;a href="http://weblogs.macromedia.com/paulw/archives/2007/11/presentation_pa_4.cfm" rel="nofollow"&gt;here's an article&lt;/a&gt; with a good example in an interesting series.

&lt;strong&gt;Update:&lt;/strong&gt; view helper example added to the application.</description>
		<content:encoded><![CDATA[<p>Tink,</p>
<p>I enjoyed your original post and I appreciate your reply to mine.  </p>
<p>In response to paragraph 3 &#8220;It has been known &#8230;&#8221;:<br />
- Yep.  I should have made that clear.  Thanks.</p>
<p>And paragraph 4 &#8220;The simple and code-in-front classes I have never used, but wouldn’t it mean &#8230;&#8221;:<br />
1) Designers and developers need to agree on two things: what events the view dispatches, and what properties the view will make accessible.  Then they can each do their job independently.  This works well for me - thoughts?</p>
<p>2) I am only interested in preserving the base MXML component or layout for reuse because I actually do reuse these across applications at times.  In my experience, the logic has been specific to an application and framework and will rarely if ever be reused in full.</p>
<p>But still, if you wanted to swap base views and use the same logic (when would you do this?) it may make more sense for the views to extend the logic instead of duplicating code &#8230; but then you&#8217;re back at the &#8216;code-behind&#8217; problem.  Do you have an elegant solution?</p>
<p>3) View helpers:<br />
I&#8217;ll add that to the list.  In the meantime <a href="http://weblogs.macromedia.com/paulw/archives/2007/11/presentation_pa_4.cfm" rel="nofollow">here&#8217;s an article</a> with a good example in an interesting series.</p>
<p><strong>Update:</strong> view helper example added to the application.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tink</title>
		<link>http://blog.tsclausing.com/post/28#comment-38</link>
		<dc:creator>Tink</dc:creator>
		<pubDate>Fri, 29 Feb 2008 20:07:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tsclausing.com/post/28#comment-38</guid>
		<description>It's interesting to see all these techniques discussed. One point i'd like to make is on "Meet ‘code-behind’ (View extends Logic, MXML &#38; AS)".

"This technique requires two classes: one abstract ActionScript class containing logic and one concrete MXML class containing view code which extends, or inherits from, the logic class."

It has to be known that this method does not let you create a logic class (i.e. a class that only contains logic), it has to be a View class (i.e. extend a UIComponent), so that the MXML class can successfully extend the AS and be added to the displayList. Yes it has logic in it, which results in a base class that is a mix of logic and view.

The simple and code-in-front classes I have never used, but wouldn't it mean a designer would need to know about all your classes and what they do, to be able to use them further down the line in other MXML classes. It's also less portable IMO and could end up creating lots of duplicate code. I.E the logic now extends a particular view class (i.e. TinkScrollBar, surely the logic now can't be used with the ScotScrollBar without changes being made, at a minimum the class the logic extends would need to be changed, which would leave you with a load of classes that have the same content but just extend a different base class?

Also not mentioned is the idea of ViewHelpers, i.e. using composition for the logic (the falldown here meaning that you can't make the method protected or private).</description>
		<content:encoded><![CDATA[<p>It&#8217;s interesting to see all these techniques discussed. One point i&#8217;d like to make is on &#8220;Meet ‘code-behind’ (View extends Logic, MXML &amp; AS)&#8221;.</p>
<p>&#8220;This technique requires two classes: one abstract ActionScript class containing logic and one concrete MXML class containing view code which extends, or inherits from, the logic class.&#8221;</p>
<p>It has to be known that this method does not let you create a logic class (i.e. a class that only contains logic), it has to be a View class (i.e. extend a UIComponent), so that the MXML class can successfully extend the AS and be added to the displayList. Yes it has logic in it, which results in a base class that is a mix of logic and view.</p>
<p>The simple and code-in-front classes I have never used, but wouldn&#8217;t it mean a designer would need to know about all your classes and what they do, to be able to use them further down the line in other MXML classes. It&#8217;s also less portable IMO and could end up creating lots of duplicate code. I.E the logic now extends a particular view class (i.e. TinkScrollBar, surely the logic now can&#8217;t be used with the ScotScrollBar without changes being made, at a minimum the class the logic extends would need to be changed, which would leave you with a load of classes that have the same content but just extend a different base class?</p>
<p>Also not mentioned is the idea of ViewHelpers, i.e. using composition for the logic (the falldown here meaning that you can&#8217;t make the method protected or private).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
