<?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: Wrapping collections: Inheritance vs Composition</title>
	<atom:link href="http://www.markhneedham.com/blog/2009/07/24/wrapping-collections-inheritance-vs-composition/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markhneedham.com/blog/2009/07/24/wrapping-collections-inheritance-vs-composition/</link>
	<description>Thoughts on Software Development</description>
	<lastBuildDate>Sat, 11 Feb 2012 23:17:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Wrapping about Collections</title>
		<link>http://www.markhneedham.com/blog/2009/07/24/wrapping-collections-inheritance-vs-composition/comment-page-1/#comment-31713</link>
		<dc:creator>Wrapping about Collections</dc:creator>
		<pubDate>Tue, 09 Feb 2010 19:55:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1479#comment-31713</guid>
		<description>[...] how wrapping a collection can often create a more useful abstraction, then points to his debate in Wrapping collections: Inheritance vs Composition. It’s a good [...]</description>
		<content:encoded><![CDATA[<p>[...] how wrapping a collection can often create a more useful abstraction, then points to his debate in Wrapping collections: Inheritance vs Composition. It’s a good [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reflective Perspective - Chris Alcock &#187; The Morning Brew #397</title>
		<link>http://www.markhneedham.com/blog/2009/07/24/wrapping-collections-inheritance-vs-composition/comment-page-1/#comment-20490</link>
		<dc:creator>Reflective Perspective - Chris Alcock &#187; The Morning Brew #397</dc:creator>
		<pubDate>Fri, 24 Jul 2009 07:42:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1479#comment-20490</guid>
		<description>[...] Wrapping collections: Inheritance vs Composition - Mark Needham talks about the two common techniques for wrapping collection classes using Inheritance or Composition, examining when each technique is more suited and looking at the ups and downs of each [...]</description>
		<content:encoded><![CDATA[<p>[...] Wrapping collections: Inheritance vs Composition &#8211; Mark Needham talks about the two common techniques for wrapping collection classes using Inheritance or Composition, examining when each technique is more suited and looking at the ups and downs of each [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DCam</title>
		<link>http://www.markhneedham.com/blog/2009/07/24/wrapping-collections-inheritance-vs-composition/comment-page-1/#comment-20470</link>
		<dc:creator>DCam</dc:creator>
		<pubDate>Thu, 23 Jul 2009 21:43:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1479#comment-20470</guid>
		<description>Several of the collection classes have wide, rich interfaces. If you inherit from them, certain types of behaviour can be difficult to add. For example, if you want to do some validation when adding to the collection there are a few places to override: []=, Add(), AddRange(). 

This is where it helps to have source and be able to see which methods are a the end of a delegation chain. Maybe it is only necessary to override a single method? Maybe AddRange() delegates to Add()?

For our PleaseSelectList(), we implemented our behaviour in the constructor. (If I recall correctly.) Constructors are always overrideable, in a sense, and the base class&#039;s constructors are never exposed to clients of the derived type. This is not the case for other parts of the object.</description>
		<content:encoded><![CDATA[<p>Several of the collection classes have wide, rich interfaces. If you inherit from them, certain types of behaviour can be difficult to add. For example, if you want to do some validation when adding to the collection there are a few places to override: []=, Add(), AddRange(). </p>
<p>This is where it helps to have source and be able to see which methods are a the end of a delegation chain. Maybe it is only necessary to override a single method? Maybe AddRange() delegates to Add()?</p>
<p>For our PleaseSelectList(), we implemented our behaviour in the constructor. (If I recall correctly.) Constructors are always overrideable, in a sense, and the base class&#8217;s constructors are never exposed to clients of the derived type. This is not the case for other parts of the object.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

