<?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: Life inside an Aggregate Root, part 2</title>
	<atom:link href="http://richarddingwall.name/2009/10/14/life-inside-an-aggregate-root-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://richarddingwall.name/2009/10/14/life-inside-an-aggregate-root-part-2/</link>
	<description>The adventures of a young kiwi software developer in London</description>
	<lastBuildDate>Thu, 10 May 2012 16:20:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Richard</title>
		<link>http://richarddingwall.name/2009/10/14/life-inside-an-aggregate-root-part-2/comment-page-1/#comment-31986</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Wed, 08 Jun 2011 08:54:32 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=2244#comment-31986</guid>
		<description>@ Chris: you could pass in a &lt;a href=&quot;http://www.refactoring.com/catalog/introduceParameterObject.html&quot; rel=&quot;nofollow&quot;&gt;Parameter Object&lt;/a&gt;. However it happens, the point was that the aggregate root is responsible for creating child objects (they don&#039;t just appear out of thin air and get passed to it).</description>
		<content:encoded><![CDATA[<p>@ Chris: you could pass in a <a href="http://www.refactoring.com/catalog/introduceParameterObject.html" rel="nofollow">Parameter Object</a>. However it happens, the point was that the aggregate root is responsible for creating child objects (they don&#8217;t just appear out of thin air and get passed to it).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://richarddingwall.name/2009/10/14/life-inside-an-aggregate-root-part-2/comment-page-1/#comment-31945</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 07 Jun 2011 15:19:34 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=2244#comment-31945</guid>
		<description>Hi, thanks for the efforts for writing these articles! They help alot.

Anways, I ve got some comments (even though this post is kinda old):

SkillGroup subGroup = new SkillGroup(&quot;First Aid&quot;, programmeA);
programmeA.Add(subGroup);
programmeB.Add(subGroup); // what happens now?

I case of &quot;what happens now?&quot;... Inside the programme.Add-Method, couldn&quot;t there just be the appropriate business logic? Like:
public void Add(SkillGroup group)
{
if(group.TrainingProgramme != null)
   throw new DomainExpception(...);
}

From my point of view, one good aspect of OOD is to pass objects around. This allows, in case of refactoring, to reduce the number of contracts to be changed.

In your example, if SkillGroup would have more than one property, like 10 or 20, all these need to be passed via the Add-Method, right? So if SkillGroup gets a new property later on, I must change the SkillGroup constructor, probably a factory, and the Add-method to support the new property. Do you have any experience regarding refactoring in this case?

Thanks in advance

Chris</description>
		<content:encoded><![CDATA[<p>Hi, thanks for the efforts for writing these articles! They help alot.</p>
<p>Anways, I ve got some comments (even though this post is kinda old):</p>
<p>SkillGroup subGroup = new SkillGroup(&#8220;First Aid&#8221;, programmeA);<br />
programmeA.Add(subGroup);<br />
programmeB.Add(subGroup); // what happens now?</p>
<p>I case of &#8220;what happens now?&#8221;&#8230; Inside the programme.Add-Method, couldn&#8221;t there just be the appropriate business logic? Like:<br />
public void Add(SkillGroup group)<br />
{<br />
if(group.TrainingProgramme != null)<br />
   throw new DomainExpception(&#8230;);<br />
}</p>
<p>From my point of view, one good aspect of OOD is to pass objects around. This allows, in case of refactoring, to reduce the number of contracts to be changed.</p>
<p>In your example, if SkillGroup would have more than one property, like 10 or 20, all these need to be passed via the Add-Method, right? So if SkillGroup gets a new property later on, I must change the SkillGroup constructor, probably a factory, and the Add-method to support the new property. Do you have any experience regarding refactoring in this case?</p>
<p>Thanks in advance</p>
<p>Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Dingwall &#187; Life inside an Aggregate Root, part 1</title>
		<link>http://richarddingwall.name/2009/10/14/life-inside-an-aggregate-root-part-2/comment-page-1/#comment-10953</link>
		<dc:creator>Richard Dingwall &#187; Life inside an Aggregate Root, part 1</dc:creator>
		<pubDate>Tue, 13 Oct 2009 20:15:26 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=2244#comment-10953</guid>
		<description>[...] This is the first half of a two-part article. Read the second half here: Life inside an Aggregate Root, part 2. [...]</description>
		<content:encoded><![CDATA[<p>[...] This is the first half of a two-part article. Read the second half here: Life inside an Aggregate Root, part 2. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

