<?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: DDD Aggregate Component pattern in action</title>
	<atom:link href="http://lostechies.com/jimmybogard/2009/02/05/ddd-aggregate-component-pattern-in-action/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/jimmybogard/2009/02/05/ddd-aggregate-component-pattern-in-action/</link>
	<description>Strong opinions, weakly held</description>
	<lastBuildDate>Thu, 23 May 2013 23:40: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: bogardj</title>
		<link>http://lostechies.com/jimmybogard/2009/02/05/ddd-aggregate-component-pattern-in-action/#comment-1291</link>
		<dc:creator>bogardj</dc:creator>
		<pubDate>Sun, 22 Feb 2009 01:53:45 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/02/04/ddd-aggregate-component-pattern-in-action.aspx#comment-1291</guid>
		<description>@Martin

In our case, modifications of an order took place in an entirely different system altogether.  Different users, different rules, different technology (COBOL).

As far as I could tell, it was a lot of CRUD with lots of validation at that point.</description>
		<content:encoded><![CDATA[<p>@Martin</p>
<p>In our case, modifications of an order took place in an entirely different system altogether.  Different users, different rules, different technology (COBOL).</p>
<p>As far as I could tell, it was a lot of CRUD with lots of validation at that point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://lostechies.com/jimmybogard/2009/02/05/ddd-aggregate-component-pattern-in-action/#comment-1290</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Fri, 20 Feb 2009 23:00:09 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/02/04/ddd-aggregate-component-pattern-in-action.aspx#comment-1290</guid>
		<description>How do you handle modifications of an order? Is that also a Potential Order? But then it&#039;s an entity because it&#039;s related to a particular order.</description>
		<content:encoded><![CDATA[<p>How do you handle modifications of an order? Is that also a Potential Order? But then it&#8217;s an entity because it&#8217;s related to a particular order.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogardj</title>
		<link>http://lostechies.com/jimmybogard/2009/02/05/ddd-aggregate-component-pattern-in-action/#comment-1289</link>
		<dc:creator>bogardj</dc:creator>
		<pubDate>Sun, 08 Feb 2009 14:43:01 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/02/04/ddd-aggregate-component-pattern-in-action.aspx#comment-1289</guid>
		<description>@Neil

Again, I&#039;d have to go back to the issue that the original design was plain modeled incorrectly.  In other cases where I&#039;ve wanted to consume services from an Entity, the Entity knew too much about what was going on.

Even with the Component idea, I still push all behavior related to the entity down to the entity.  In the above scenario, I don&#039;t really need to worry about upper layers &quot;knowing&quot; about how to build components, that&#039;s what a factory is for.

As for anemic models, if you can recognize the Inappropriate Intimacy smell when you see it, that alone can create very rich entities.</description>
		<content:encoded><![CDATA[<p>@Neil</p>
<p>Again, I&#8217;d have to go back to the issue that the original design was plain modeled incorrectly.  In other cases where I&#8217;ve wanted to consume services from an Entity, the Entity knew too much about what was going on.</p>
<p>Even with the Component idea, I still push all behavior related to the entity down to the entity.  In the above scenario, I don&#8217;t really need to worry about upper layers &#8220;knowing&#8221; about how to build components, that&#8217;s what a factory is for.</p>
<p>As for anemic models, if you can recognize the Inappropriate Intimacy smell when you see it, that alone can create very rich entities.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Gieschen</title>
		<link>http://lostechies.com/jimmybogard/2009/02/05/ddd-aggregate-component-pattern-in-action/#comment-1288</link>
		<dc:creator>Nick Gieschen</dc:creator>
		<pubDate>Sat, 07 Feb 2009 19:20:21 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/02/04/ddd-aggregate-component-pattern-in-action.aspx#comment-1288</guid>
		<description>I&#039;ve started and followed discussions re this on the ddd and alt.net groups and still must be missing something.

1. It seems like a fair deal of pain to create a component/service to handle a particular scenario, when you could just be adding a method to an entity.

2. The component solution has a similar drawback to the &quot;Do we really want our callers to have to figure out how the heck to locate an ITaxService or IDiscountCalculator?&quot; problem. Now our callers have to know about this Component in order to conduct usecase x instead of just having the entity do it. For me this part of it is an issue of discoverability.

3. I have a vague feeling that this is drifting towards a manager/anemic domain/transactiony way of doing things. If I write a Component everytime my entity has to *do* something, aren&#039;t I becoming a bit anemic and removing reponsibility from my entity for doing things? Won&#039;t I end up with a bunch of scattered Components all with the responsibility to do one thing? I realize they&#039;re delegating to domain services to do these things, but from the point of view of a caller in an upper layer, I seem to have compromised encapsulation.

</description>
		<content:encoded><![CDATA[<p>I&#8217;ve started and followed discussions re this on the ddd and alt.net groups and still must be missing something.</p>
<p>1. It seems like a fair deal of pain to create a component/service to handle a particular scenario, when you could just be adding a method to an entity.</p>
<p>2. The component solution has a similar drawback to the &#8220;Do we really want our callers to have to figure out how the heck to locate an ITaxService or IDiscountCalculator?&#8221; problem. Now our callers have to know about this Component in order to conduct usecase x instead of just having the entity do it. For me this part of it is an issue of discoverability.</p>
<p>3. I have a vague feeling that this is drifting towards a manager/anemic domain/transactiony way of doing things. If I write a Component everytime my entity has to *do* something, aren&#8217;t I becoming a bit anemic and removing reponsibility from my entity for doing things? Won&#8217;t I end up with a bunch of scattered Components all with the responsibility to do one thing? I realize they&#8217;re delegating to domain services to do these things, but from the point of view of a caller in an upper layer, I seem to have compromised encapsulation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogardj</title>
		<link>http://lostechies.com/jimmybogard/2009/02/05/ddd-aggregate-component-pattern-in-action/#comment-1287</link>
		<dc:creator>bogardj</dc:creator>
		<pubDate>Sat, 07 Feb 2009 14:39:37 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/02/04/ddd-aggregate-component-pattern-in-action.aspx#comment-1287</guid>
		<description>@Nick

In this case, a container call in an entity was a symptom, not the disease.  The real problem was bad modeling.  There are a few cross-cutting concerns (logging comes to mind) where I might want an IOC container involved, but I would still see these as optional (setter) dependencies rather than opaque or ctor dependencies.

If I really feel like I need a domain service in an entity, it&#039;s probably for a specific scenario.  In that case, I&#039;d still go for the component patten, as that would give me a single class that can handle responsibilities for that one scenario.</description>
		<content:encoded><![CDATA[<p>@Nick</p>
<p>In this case, a container call in an entity was a symptom, not the disease.  The real problem was bad modeling.  There are a few cross-cutting concerns (logging comes to mind) where I might want an IOC container involved, but I would still see these as optional (setter) dependencies rather than opaque or ctor dependencies.</p>
<p>If I really feel like I need a domain service in an entity, it&#8217;s probably for a specific scenario.  In that case, I&#8217;d still go for the component patten, as that would give me a single class that can handle responsibilities for that one scenario.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Gieschen</title>
		<link>http://lostechies.com/jimmybogard/2009/02/05/ddd-aggregate-component-pattern-in-action/#comment-1286</link>
		<dc:creator>Nick Gieschen</dc:creator>
		<pubDate>Sat, 07 Feb 2009 05:35:13 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/02/04/ddd-aggregate-component-pattern-in-action.aspx#comment-1286</guid>
		<description>Great article - I was just wondering about the best ways to handle a Potential Order/Order issue.

One nit to pick though. You don&#039;t actually solve the &quot;How do I inject/use a Service/Repository inside an Entity?&quot; problem. You just show that in this case, the entity shouldn&#039;t be doing the work that requires the dependency. In another scenario, your entity may well need a service and you still haven&#039;t shown an alternative to the three options you listed. (FWIW, I consider aspects a fourth and least crappy of the alternatives, but am not happy with any of them.)</description>
		<content:encoded><![CDATA[<p>Great article &#8211; I was just wondering about the best ways to handle a Potential Order/Order issue.</p>
<p>One nit to pick though. You don&#8217;t actually solve the &#8220;How do I inject/use a Service/Repository inside an Entity?&#8221; problem. You just show that in this case, the entity shouldn&#8217;t be doing the work that requires the dependency. In another scenario, your entity may well need a service and you still haven&#8217;t shown an alternative to the three options you listed. (FWIW, I consider aspects a fourth and least crappy of the alternatives, but am not happy with any of them.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joe</title>
		<link>http://lostechies.com/jimmybogard/2009/02/05/ddd-aggregate-component-pattern-in-action/#comment-1285</link>
		<dc:creator>joe</dc:creator>
		<pubDate>Thu, 05 Feb 2009 16:05:15 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/02/04/ddd-aggregate-component-pattern-in-action.aspx#comment-1285</guid>
		<description>Thanks Jimmy -- this answered one of the biggest questions I had about how to avoid anemic domain models.

</description>
		<content:encoded><![CDATA[<p>Thanks Jimmy &#8212; this answered one of the biggest questions I had about how to avoid anemic domain models.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogardj</title>
		<link>http://lostechies.com/jimmybogard/2009/02/05/ddd-aggregate-component-pattern-in-action/#comment-1284</link>
		<dc:creator>bogardj</dc:creator>
		<pubDate>Thu, 05 Feb 2009 12:41:47 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/02/04/ddd-aggregate-component-pattern-in-action.aspx#comment-1284</guid>
		<description>@Michael

In many cases, just the value is just fine.  In our case, tax and discounts was quite complex, so it was nice to see right inside our object, the &quot;how&quot; object right there.

That, and we needed more information than just the final discount and tax amount, like the list of discounts and names, the tax reason, etc.  Tax and Discounts were value objects themselves, so we didn&#039;t see any point in reducing their value, in our specific case.</description>
		<content:encoded><![CDATA[<p>@Michael</p>
<p>In many cases, just the value is just fine.  In our case, tax and discounts was quite complex, so it was nice to see right inside our object, the &#8220;how&#8221; object right there.</p>
<p>That, and we needed more information than just the final discount and tax amount, like the list of discounts and names, the tax reason, etc.  Tax and Discounts were value objects themselves, so we didn&#8217;t see any point in reducing their value, in our specific case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogardj</title>
		<link>http://lostechies.com/jimmybogard/2009/02/05/ddd-aggregate-component-pattern-in-action/#comment-1283</link>
		<dc:creator>bogardj</dc:creator>
		<pubDate>Thu, 05 Feb 2009 12:37:57 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/02/04/ddd-aggregate-component-pattern-in-action.aspx#comment-1283</guid>
		<description>@Jonathan

I don&#039;t call them entities because they don&#039;t have an identity.  If anything, they are closer to Value Objects, but at a much larger scope.

In the Order case, I tried to make the point than in the commerce domain, an Order isn&#039;t something where a taxes and totals are recalculated.  Once we found through our conversations with domain experts that a Quote or PotentialOrder is merely a snapshot in time.  That would mean it&#039;s not an entity.

It really has nothing to do with injection, but rather why and how these models are used.  That I need to do injection is a symptom of a deeper modeling problem.</description>
		<content:encoded><![CDATA[<p>@Jonathan</p>
<p>I don&#8217;t call them entities because they don&#8217;t have an identity.  If anything, they are closer to Value Objects, but at a much larger scope.</p>
<p>In the Order case, I tried to make the point than in the commerce domain, an Order isn&#8217;t something where a taxes and totals are recalculated.  Once we found through our conversations with domain experts that a Quote or PotentialOrder is merely a snapshot in time.  That would mean it&#8217;s not an entity.</p>
<p>It really has nothing to do with injection, but rather why and how these models are used.  That I need to do injection is a symptom of a deeper modeling problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin Ramsay</title>
		<link>http://lostechies.com/jimmybogard/2009/02/05/ddd-aggregate-component-pattern-in-action/#comment-1282</link>
		<dc:creator>Colin Ramsay</dc:creator>
		<pubDate>Thu, 05 Feb 2009 12:26:20 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/02/04/ddd-aggregate-component-pattern-in-action.aspx#comment-1282</guid>
		<description>Great stuff Jimmy. I&#039;d been using a similar approach after you mentioned it a couple of weeks ago and thought up the PotentialOrderFactory factory approach as a little nicity the other day. It&#039;s good to see that idea parallels what you&#039;re doing.

I think what I&#039;m saying is... I love you man.</description>
		<content:encoded><![CDATA[<p>Great stuff Jimmy. I&#8217;d been using a similar approach after you mentioned it a couple of weeks ago and thought up the PotentialOrderFactory factory approach as a little nicity the other day. It&#8217;s good to see that idea parallels what you&#8217;re doing.</p>
<p>I think what I&#8217;m saying is&#8230; I love you man.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
