<?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: Entities, Value Objects, Aggregates and Roots</title>
	<atom:link href="http://lostechies.com/jimmybogard/2008/05/21/entities-value-objects-aggregates-and-roots/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/jimmybogard/2008/05/21/entities-value-objects-aggregates-and-roots/</link>
	<description>Strong opinions, weakly held</description>
	<lastBuildDate>Sat, 25 May 2013 16:53:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Taking executable specs to the next level: Executable Documentation &#171; KeithPS</title>
		<link>http://lostechies.com/jimmybogard/2008/05/21/entities-value-objects-aggregates-and-roots/#comment-3530</link>
		<dc:creator>Taking executable specs to the next level: Executable Documentation &#171; KeithPS</dc:creator>
		<pubDate>Sun, 26 Jun 2011 15:57:07 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/05/20/entities-value-objects-aggregates-and-roots.aspx#comment-3530</guid>
		<description>[...] morning I had a look at the specs for one of our aggregate roots that resulted from its TDD to see if it was adequately documenting its public API, lifecycle [...]</description>
		<content:encoded><![CDATA[<p>[...] morning I had a look at the specs for one of our aggregate roots that resulted from its TDD to see if it was adequately documenting its public API, lifecycle [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cascade Save-Update in NHibernate and version column &#171; FrankMao.com</title>
		<link>http://lostechies.com/jimmybogard/2008/05/21/entities-value-objects-aggregates-and-roots/#comment-3350</link>
		<dc:creator>Cascade Save-Update in NHibernate and version column &#171; FrankMao.com</dc:creator>
		<pubDate>Mon, 02 May 2011 14:42:55 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/05/20/entities-value-objects-aggregates-and-roots.aspx#comment-3350</guid>
		<description>[...] complies with aggregate root pattern,as one of the aggregate rules is: When a change to any object within the Aggregate boundary is committed, all invariants of the [...]</description>
		<content:encoded><![CDATA[<p>[...] complies with aggregate root pattern,as one of the aggregate rules is: When a change to any object within the Aggregate boundary is committed, all invariants of the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chriz</title>
		<link>http://lostechies.com/jimmybogard/2008/05/21/entities-value-objects-aggregates-and-roots/#comment-496</link>
		<dc:creator>Chriz</dc:creator>
		<pubDate>Fri, 12 Jun 2009 16:43:49 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/05/20/entities-value-objects-aggregates-and-roots.aspx#comment-496</guid>
		<description>@bogardj
Normaly when working with orders, you have something like an order number. And in many cases you will access you order-lines only by an order. But imagine we need a list of orderlines of a special product. Something like &quot;give me all orderlines of products from toshiba&quot; to show them on the screen. Imagine each order could hold hundrets of orderlines. Accessing them through their orders would be impossible.</description>
		<content:encoded><![CDATA[<p>@bogardj<br />
Normaly when working with orders, you have something like an order number. And in many cases you will access you order-lines only by an order. But imagine we need a list of orderlines of a special product. Something like &#8220;give me all orderlines of products from toshiba&#8221; to show them on the screen. Imagine each order could hold hundrets of orderlines. Accessing them through their orders would be impossible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogardj</title>
		<link>http://lostechies.com/jimmybogard/2008/05/21/entities-value-objects-aggregates-and-roots/#comment-495</link>
		<dc:creator>bogardj</dc:creator>
		<pubDate>Tue, 09 Jun 2009 17:41:58 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/05/20/entities-value-objects-aggregates-and-roots.aspx#comment-495</guid>
		<description>@Chriz

How is the information viewed?  Who is viewing it?  These questions lead me to what my boundaries are, not only for aggregates, but services and systems.</description>
		<content:encoded><![CDATA[<p>@Chriz</p>
<p>How is the information viewed?  Who is viewing it?  These questions lead me to what my boundaries are, not only for aggregates, but services and systems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chriz</title>
		<link>http://lostechies.com/jimmybogard/2008/05/21/entities-value-objects-aggregates-and-roots/#comment-494</link>
		<dc:creator>Chriz</dc:creator>
		<pubDate>Mon, 08 Jun 2009 20:17:06 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/05/20/entities-value-objects-aggregates-and-roots.aspx#comment-494</guid>
		<description>I have some problem with the &quot;Only Aggregate Roots can be obtained directly with database queries&quot;-Rule. Take the following Use-Case as an example. I have Orders and Order-Lines. Orders are the rootEntity of OrderLines. OrderLines have a product-type like &quot;Toshiba Notebook N750&quot;. Now I need to do some work with OrderLines of a special product-type. Therefore I need to pull them from the repository. If I would use the Order-Repository it would pull me out all Orders with at least one OrderLine of the desired type and of course all the other OrderLines of those orders. That won&#039;t be acceptable from a performance point of view. How can I circumvent this ? Only lazyload the other OrderLines ?</description>
		<content:encoded><![CDATA[<p>I have some problem with the &#8220;Only Aggregate Roots can be obtained directly with database queries&#8221;-Rule. Take the following Use-Case as an example. I have Orders and Order-Lines. Orders are the rootEntity of OrderLines. OrderLines have a product-type like &#8220;Toshiba Notebook N750&#8243;. Now I need to do some work with OrderLines of a special product-type. Therefore I need to pull them from the repository. If I would use the Order-Repository it would pull me out all Orders with at least one OrderLine of the desired type and of course all the other OrderLines of those orders. That won&#8217;t be acceptable from a performance point of view. How can I circumvent this ? Only lazyload the other OrderLines ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kengkaj</title>
		<link>http://lostechies.com/jimmybogard/2008/05/21/entities-value-objects-aggregates-and-roots/#comment-493</link>
		<dc:creator>kengkaj</dc:creator>
		<pubDate>Fri, 26 Sep 2008 08:04:36 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/05/20/entities-value-objects-aggregates-and-roots.aspx#comment-493</guid>
		<description>Thanks for your great article.</description>
		<content:encoded><![CDATA[<p>Thanks for your great article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tudor-Andrei Pamula</title>
		<link>http://lostechies.com/jimmybogard/2008/05/21/entities-value-objects-aggregates-and-roots/#comment-492</link>
		<dc:creator>Tudor-Andrei Pamula</dc:creator>
		<pubDate>Fri, 12 Sep 2008 14:33:10 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/05/20/entities-value-objects-aggregates-and-roots.aspx#comment-492</guid>
		<description>Besides the above link MocksArentStubs I could suggest http://googletesting.blogspot.com/2008/07/breaking-law-of-demeter-is-like-looking.html.

The point that if you have code depending on a navigation a.B.C.D then in the unit-test you&#039;ll have to create/stub mock A &amp; B &amp; C &amp; D. Either you go with slow integration tests with real domain-objects, or you go with object-mothers and (in both cases you&#039;ll have to create real objects, probably through factories which might contain aspects/entities irrelevant to your test). Or you try to create mocks for those, but you still have to create a forest of mocks.

Another point is what happens if you have navigation A.B but during the production you want to reverse its direction to B.A. Suddenly you&#039;ll have to refactor all the code based on that navigation.

I know that is 10000x more difficult, but keeping the navigation internal, in the entities, and using a very strict &#039;Tell don&#039;t Ask&#039; will be on a long run more efficient.javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$ctl00$ctl00$bcr$bcr$bcr$ctl11$ctl02$ctl02$ctl02$btnSubmit&quot;, &quot;&quot;, true, &quot;CreateCommentForm&quot;, &quot;&quot;, false, true))
Add</description>
		<content:encoded><![CDATA[<p>Besides the above link MocksArentStubs I could suggest <a href="http://googletesting.blogspot.com/2008/07/breaking-law-of-demeter-is-like-looking.html" rel="nofollow">http://googletesting.blogspot.com/2008/07/breaking-law-of-demeter-is-like-looking.html</a>.</p>
<p>The point that if you have code depending on a navigation a.B.C.D then in the unit-test you&#8217;ll have to create/stub mock A &#038; B &#038; C &#038; D. Either you go with slow integration tests with real domain-objects, or you go with object-mothers and (in both cases you&#8217;ll have to create real objects, probably through factories which might contain aspects/entities irrelevant to your test). Or you try to create mocks for those, but you still have to create a forest of mocks.</p>
<p>Another point is what happens if you have navigation A.B but during the production you want to reverse its direction to B.A. Suddenly you&#8217;ll have to refactor all the code based on that navigation.</p>
<p>I know that is 10000x more difficult, but keeping the navigation internal, in the entities, and using a very strict &#8216;Tell don&#8217;t Ask&#8217; will be on a long run more efficient.javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&#8220;ctl00$ctl00$ctl00$bcr$bcr$bcr$ctl11$ctl02$ctl02$ctl02$btnSubmit&#8221;, &#8220;&#8221;, true, &#8220;CreateCommentForm&#8221;, &#8220;&#8221;, false, true))<br />
Add</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jimmy Bogard</title>
		<link>http://lostechies.com/jimmybogard/2008/05/21/entities-value-objects-aggregates-and-roots/#comment-491</link>
		<dc:creator>Jimmy Bogard</dc:creator>
		<pubDate>Thu, 11 Sep 2008 11:22:04 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/05/20/entities-value-objects-aggregates-and-roots.aspx#comment-491</guid>
		<description>@Tudor-Andrei

Do you have an example of this?  Both Law of Demeter and how unit testing are made difficult?</description>
		<content:encoded><![CDATA[<p>@Tudor-Andrei</p>
<p>Do you have an example of this?  Both Law of Demeter and how unit testing are made difficult?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tudor-Andrei Pamula</title>
		<link>http://lostechies.com/jimmybogard/2008/05/21/entities-value-objects-aggregates-and-roots/#comment-490</link>
		<dc:creator>Tudor-Andrei Pamula</dc:creator>
		<pubDate>Thu, 11 Sep 2008 06:47:58 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/05/20/entities-value-objects-aggregates-and-roots.aspx#comment-490</guid>
		<description>Hi,
thank you for the very good explanation of these DDD basic concepts.
I still disagree with the following statement:
&#039;Only Aggregate Roots can be obtained directly with database queries.  Everything else must be done through traversal.&#039;

Navigation usually means exposing internal data (getters/setters) and leads to &#039;Law of Demeter&#039; violation, and will make unit-testing more difficult
(see design-style/&#039;train wrecks&#039; http://www.martinfowler.com/articles/mocksArentStubs.html)
</description>
		<content:encoded><![CDATA[<p>Hi,<br />
thank you for the very good explanation of these DDD basic concepts.<br />
I still disagree with the following statement:<br />
&#8216;Only Aggregate Roots can be obtained directly with database queries.  Everything else must be done through traversal.&#8217;</p>
<p>Navigation usually means exposing internal data (getters/setters) and leads to &#8216;Law of Demeter&#8217; violation, and will make unit-testing more difficult<br />
(see design-style/&#8217;train wrecks&#8217; <a href="http://www.martinfowler.com/articles/mocksArentStubs.html" rel="nofollow">http://www.martinfowler.com/articles/mocksArentStubs.html</a>)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Holtman</title>
		<link>http://lostechies.com/jimmybogard/2008/05/21/entities-value-objects-aggregates-and-roots/#comment-489</link>
		<dc:creator>Mark Holtman</dc:creator>
		<pubDate>Thu, 28 Aug 2008 13:38:43 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/05/20/entities-value-objects-aggregates-and-roots.aspx#comment-489</guid>
		<description>Jimmy,

Thanks for a very concise explanation of these basic concepts. Your concrete examples helped solidify some of my thinking. I&#039;m making my way through Evan&#039;s DDD book at the moment and was struggling with what a Value Object is, ideally.</description>
		<content:encoded><![CDATA[<p>Jimmy,</p>
<p>Thanks for a very concise explanation of these basic concepts. Your concrete examples helped solidify some of my thinking. I&#8217;m making my way through Evan&#8217;s DDD book at the moment and was struggling with what a Value Object is, ideally.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
