<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
	>
<channel>
	<title>Comments on: Design Pattern Principles for ActionScript 3.0: Program to an Interface; not an implementation</title>
	<atom:link href="http://www.as3dp.com/2009/02/14/design-pattern-principles-for-actionscript-30-program-to-an-interface-not-an-implementation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.as3dp.com/2009/02/14/design-pattern-principles-for-actionscript-30-program-to-an-interface-not-an-implementation/</link>
	<description>OOP Techniques for Flash and Flex Developers</description>
	<lastBuildDate>Mon, 26 Jul 2010 13:40:37 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bill Sanders</title>
		<link>http://www.as3dp.com/2009/02/14/design-pattern-principles-for-actionscript-30-program-to-an-interface-not-an-implementation/comment-page-1/#comment-1625</link>
		<dc:creator>Bill Sanders</dc:creator>
		<pubDate>Tue, 17 Feb 2009 10:30:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=685#comment-1625</guid>
		<description>Jesse, Neil and Tyler,

Getters and setters (or accessors &amp; mutators) seem to be everywhere outside of AS3, but when I really looked at some design patterns done in C#, I didn&#039;t see as many as expected. Like all of you, I too have pondered (or just felt queasy about) getters and setters. Suffice it to say that I don&#039;t use them that much, but it&#039;s more of a matter of overlooking them rather than any kind of campaign to ignore them.

I read Jesse&#039;s article (ArtOfWar site aka FlashBum?), but I feel very uneasy about adding too many public properties to any program or in an interface (abstract class). I keep thinking &quot;breaking encapsulation; must not do&quot; -- perhaps robotically so.

However, I think it is a crucially important topic, and we need to discuss it more. Shortly, we&#039;ll be looking at another design pattern principle — &lt;em&gt;open for extension but closed for modification&lt;/em&gt;, and I believe that would be a good place to get into it more.

@Jesse--pass my regards to the FCNY crew--Hank, Jean-Charles, Jim Kremens, Lisa, Robertson, Tyler and Oscar. I gotta get down there for one of your meet-ups.

Great comments from you all,
Bill</description>
		<content:encoded><![CDATA[<p>Jesse, Neil and Tyler,</p>
<p>Getters and setters (or accessors &#038; mutators) seem to be everywhere outside of AS3, but when I really looked at some design patterns done in C#, I didn&#8217;t see as many as expected. Like all of you, I too have pondered (or just felt queasy about) getters and setters. Suffice it to say that I don&#8217;t use them that much, but it&#8217;s more of a matter of overlooking them rather than any kind of campaign to ignore them.</p>
<p>I read Jesse&#8217;s article (ArtOfWar site aka FlashBum?), but I feel very uneasy about adding too many public properties to any program or in an interface (abstract class). I keep thinking &#8220;breaking encapsulation; must not do&#8221; &#8212; perhaps robotically so.</p>
<p>However, I think it is a crucially important topic, and we need to discuss it more. Shortly, we&#8217;ll be looking at another design pattern principle — <em>open for extension but closed for modification</em>, and I believe that would be a good place to get into it more.</p>
<p>@Jesse&#8211;pass my regards to the FCNY crew&#8211;Hank, Jean-Charles, Jim Kremens, Lisa, Robertson, Tyler and Oscar. I gotta get down there for one of your meet-ups.</p>
<p>Great comments from you all,<br />
Bill</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: localToGlobal &#187; Blog Archive &#187; news review -&#62; 7th week of 2009</title>
		<link>http://www.as3dp.com/2009/02/14/design-pattern-principles-for-actionscript-30-program-to-an-interface-not-an-implementation/comment-page-1/#comment-1619</link>
		<dc:creator>localToGlobal &#187; Blog Archive &#187; news review -&#62; 7th week of 2009</dc:creator>
		<pubDate>Mon, 16 Feb 2009 20:29:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=685#comment-1619</guid>
		<description>[...] &gt; Program to an Interface; not an implementation &#124; ActionScript 3 Design Patterns [...]</description>
		<content:encoded><![CDATA[<p>[...] &gt; Program to an Interface; not an implementation | ActionScript 3 Design Patterns [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tyler Egeto</title>
		<link>http://www.as3dp.com/2009/02/14/design-pattern-principles-for-actionscript-30-program-to-an-interface-not-an-implementation/comment-page-1/#comment-1615</link>
		<dc:creator>Tyler Egeto</dc:creator>
		<pubDate>Mon, 16 Feb 2009 17:26:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=685#comment-1615</guid>
		<description>&gt; What are your thoughts on putting public variables in interfaces as getters and setters?

I do this. In my opinion, if it is something that is critical to the interface, then it should be in there. That is all it really boils down to. The alternative would be to replace them with standard method calls, ie: getThatThing(), but at the end of that day, are they not doing exactly the same thing? It&#039;s a technique available to us, so I say use it.</description>
		<content:encoded><![CDATA[<p>&gt; What are your thoughts on putting public variables in interfaces as getters and setters?</p>
<p>I do this. In my opinion, if it is something that is critical to the interface, then it should be in there. That is all it really boils down to. The alternative would be to replace them with standard method calls, ie: getThatThing(), but at the end of that day, are they not doing exactly the same thing? It&#8217;s a technique available to us, so I say use it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nwebb</title>
		<link>http://www.as3dp.com/2009/02/14/design-pattern-principles-for-actionscript-30-program-to-an-interface-not-an-implementation/comment-page-1/#comment-1614</link>
		<dc:creator>nwebb</dc:creator>
		<pubDate>Mon, 16 Feb 2009 14:27:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=685#comment-1614</guid>
		<description>&gt; What are your thoughts on putting public variables in interfaces as getters and setters?

Good question, something I&#039;ve pondered too. I&#039;d also be interested to hear the views of others on this.

I&#039;ve never worked with a language that supports multiple inheritance but I don&#039;t think I would use (actual) interfaces much if AS3 had support for that and proper abstract classes.</description>
		<content:encoded><![CDATA[<p>&gt; What are your thoughts on putting public variables in interfaces as getters and setters?</p>
<p>Good question, something I&#8217;ve pondered too. I&#8217;d also be interested to hear the views of others on this.</p>
<p>I&#8217;ve never worked with a language that supports multiple inheritance but I don&#8217;t think I would use (actual) interfaces much if AS3 had support for that and proper abstract classes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse Freeman</title>
		<link>http://www.as3dp.com/2009/02/14/design-pattern-principles-for-actionscript-30-program-to-an-interface-not-an-implementation/comment-page-1/#comment-1610</link>
		<dc:creator>Jesse Freeman</dc:creator>
		<pubDate>Mon, 16 Feb 2009 02:50:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.as3dp.com/?p=685#comment-1610</guid>
		<description>Great post and something I have been implementing in all of my code lately. What are your thoughts on putting public variables in interfaces as getters and setters? This is not something really openly explained since AS 3 handles it&#039;s getter and setter function different then other languages. 

Sometimes I don&#039;t create an AbstractClass when I feel an Interface can clearly be used but was forcing myself to use Abstracts when I needed variables to be accessed from concrete classes. I tend to question AbstractClasses when they simply implement an Interface but not enough code to warrant its creation so my hack has been to use getters and setters in the Interface. 

I have also wrestled with the overuse of getters and setters in general   (http://flashartofwar.com/2008/04/26/useless-getterssetters/) so something about having them for every public variable &quot;critical&quot; to the class feels like overkill? As far as I can tell, most returned values are placed in functions so they can be part of the interface and ignore the public variable but I am not sure if this is specifically used in other languages since ActionScript style getter and setter functions do not exist?

Thanks,
Jesse</description>
		<content:encoded><![CDATA[<p>Great post and something I have been implementing in all of my code lately. What are your thoughts on putting public variables in interfaces as getters and setters? This is not something really openly explained since AS 3 handles it&#8217;s getter and setter function different then other languages. </p>
<p>Sometimes I don&#8217;t create an AbstractClass when I feel an Interface can clearly be used but was forcing myself to use Abstracts when I needed variables to be accessed from concrete classes. I tend to question AbstractClasses when they simply implement an Interface but not enough code to warrant its creation so my hack has been to use getters and setters in the Interface. </p>
<p>I have also wrestled with the overuse of getters and setters in general   (<a href="http://flashartofwar.com/2008/04/26/useless-getterssetters/" rel="nofollow">http://flashartofwar.com/2008/04/26/useless-getterssetters/</a>) so something about having them for every public variable &#8220;critical&#8221; to the class feels like overkill? As far as I can tell, most returned values are placed in functions so they can be part of the interface and ignore the public variable but I am not sure if this is specifically used in other languages since ActionScript style getter and setter functions do not exist?</p>
<p>Thanks,<br />
Jesse</p>
]]></content:encoded>
	</item>
</channel>
</rss>
