<?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: Design for Testability and &#8220;Domain-Driven Design&#8221;</title>
	<atom:link href="http://misko.hevery.com/2009/03/16/design-for-testability-and-domain-driven-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://misko.hevery.com/2009/03/16/design-for-testability-and-domain-driven-design/</link>
	<description>Testability Explorer</description>
	<lastBuildDate>Fri, 30 Jul 2010 03:59:03 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: David Stull</title>
		<link>http://misko.hevery.com/2009/03/16/design-for-testability-and-domain-driven-design/comment-page-1/#comment-1930</link>
		<dc:creator>David Stull</dc:creator>
		<pubDate>Thu, 24 Sep 2009 01:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://misko.hevery.com/?p=428#comment-1930</guid>
		<description>Misko, I really enjoy your articles. I have learned a lot. This post deals with some questions that I had thought a small, but complete sample app would be very helpful to clarify. Any interest in providing one?</description>
		<content:encoded><![CDATA[<p>Misko, I really enjoy your articles. I have learned a lot. This post deals with some questions that I had thought a small, but complete sample app would be very helpful to clarify. Any interest in providing one?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Igor Brejc</title>
		<link>http://misko.hevery.com/2009/03/16/design-for-testability-and-domain-driven-design/comment-page-1/#comment-785</link>
		<dc:creator>Igor Brejc</dc:creator>
		<pubDate>Tue, 17 Mar 2009 21:19:20 +0000</pubDate>
		<guid isPermaLink="false">http://misko.hevery.com/?p=428#comment-785</guid>
		<description>@Miško, I guess it depends on the nature of the behavior (and the domain it tries to describe) - sometimes it is appropriate to put that kind of domain logic into an Invoice object. Sometimes a separate service or strategy pattern is more suitable. As for your reservations about having non-persistable fields, I would say the best way would be to hide the domain from the persistance technology (like Hibernate) through some kind of factories and repositories. Then you wouldn&#039;t have to worry how these fields get filled (at least not from the domain point of view).In the case of invoicing (of which I&#039;m not an expert): maybe a ITaxation service which would accept Invoices as arguments in the Tax method would be a solution? In that case an Invoice would not care about the tax table in the first place.</description>
		<content:encoded><![CDATA[<p>@Miško, I guess it depends on the nature of the behavior (and the domain it tries to describe) &#8211; sometimes it is appropriate to put that kind of domain logic into an Invoice object. Sometimes a separate service or strategy pattern is more suitable. As for your reservations about having non-persistable fields, I would say the best way would be to hide the domain from the persistance technology (like Hibernate) through some kind of factories and repositories. Then you wouldn&#8217;t have to worry how these fields get filled (at least not from the domain point of view).In the case of invoicing (of which I&#8217;m not an expert): maybe a ITaxation service which would accept Invoices as arguments in the Tax method would be a solution? In that case an Invoice would not care about the tax table in the first place.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: misko</title>
		<link>http://misko.hevery.com/2009/03/16/design-for-testability-and-domain-driven-design/comment-page-1/#comment-783</link>
		<dc:creator>misko</dc:creator>
		<pubDate>Tue, 17 Mar 2009 13:55:07 +0000</pubDate>
		<guid isPermaLink="false">http://misko.hevery.com/?p=428#comment-783</guid>
		<description>@Igor, After reading http://martinfowler.com/bliki/AnemicDomainModel.html I agree with Fowler, your objects should have appropriate behavior on them. As he puts it &quot;The logic that should be in a domain object is domain logic - validations, calculations, business rules - whatever you like to call it.&quot; The point I am trying to make is that it is not where the behavior is, but rather how this behavior gets a hold of its collaborators. What if your DomainModel is an Invoice and the calculation behavior need to get a hold of TaxTable to do the job. How should the Invoice get a hold of TaxTable? Here my point is that the TaxTable should not be a field of DomainModel, therefor TaxTable can not be constructor injected.</description>
		<content:encoded><![CDATA[<p>@Igor, After reading <a href="http://martinfowler.com/bliki/AnemicDomainModel.html" rel="nofollow">http://martinfowler.com/bliki/AnemicDomainModel.html</a> I agree with Fowler, your objects should have appropriate behavior on them. As he puts it &#8220;The logic that should be in a domain object is domain logic &#8211; validations, calculations, business rules &#8211; whatever you like to call it.&#8221; The point I am trying to make is that it is not where the behavior is, but rather how this behavior gets a hold of its collaborators. What if your DomainModel is an Invoice and the calculation behavior need to get a hold of TaxTable to do the job. How should the Invoice get a hold of TaxTable? Here my point is that the TaxTable should not be a field of DomainModel, therefor TaxTable can not be constructor injected.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: igorbrejc.net &#187; Fresh Catch For March 17th</title>
		<link>http://misko.hevery.com/2009/03/16/design-for-testability-and-domain-driven-design/comment-page-1/#comment-782</link>
		<dc:creator>igorbrejc.net &#187; Fresh Catch For March 17th</dc:creator>
		<pubDate>Tue, 17 Mar 2009 11:04:58 +0000</pubDate>
		<guid isPermaLink="false">http://misko.hevery.com/?p=428#comment-782</guid>
		<description>[...] Design for Testability and &#8220;Domain-Driven Design&#8221; [...]</description>
		<content:encoded><![CDATA[<p>[...] Design for Testability and &ldquo;Domain-Driven Design&rdquo; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Igor Brejc</title>
		<link>http://misko.hevery.com/2009/03/16/design-for-testability-and-domain-driven-design/comment-page-1/#comment-780</link>
		<dc:creator>Igor Brejc</dc:creator>
		<pubDate>Tue, 17 Mar 2009 07:11:09 +0000</pubDate>
		<guid isPermaLink="false">http://misko.hevery.com/?p=428#comment-780</guid>
		<description>Miško,This is a very interesting topic, which I was raising in my head ever since I read Martin Fowler&#039;s post about anemic domain models (http://technorati.com/search/http://martinfowler.com/bliki/AnemicDomainModel.html) - this got me into DDD area, so I started reading Eric&#039;s book (I&#039;m halfway through it). What&#039;s your opinion about anemic domain models? BTW I&#039;m not sure relying on a specific technology (like Hibernate) helps the discussion. I come from the .NET sphere and I (usually) do not use NHibernate for DB persistence. But I still want to be able to understand the implications of using either Eric&#039;s DDD approach or some alternatives.</description>
		<content:encoded><![CDATA[<p>Miško,This is a very interesting topic, which I was raising in my head ever since I read Martin Fowler&#8217;s post about anemic domain models (<a href="http://technorati.com/search/http://martinfowler.com/bliki/AnemicDomainModel.html" rel="nofollow">http://technorati.com/search/http://martinfowler.com/bliki/AnemicDomainModel.html</a>) &#8211; this got me into DDD area, so I started reading Eric&#8217;s book (I&#8217;m halfway through it). What&#8217;s your opinion about anemic domain models? BTW I&#8217;m not sure relying on a specific technology (like Hibernate) helps the discussion. I come from the .NET sphere and I (usually) do not use NHibernate for DB persistence. But I still want to be able to understand the implications of using either Eric&#8217;s DDD approach or some alternatives.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
