<?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: Dependency inversion patterns and the domain model</title>
	<atom:link href="http://simon-says-architecture.com/2010/03/31/dependency-inversion-patterns-and-the-domain-model/feed/" rel="self" type="application/rss+xml" />
	<link>http://simon-says-architecture.com/2010/03/31/dependency-inversion-patterns-and-the-domain-model/</link>
	<description>Szymon Pobiega about software engineering and architecture</description>
	<lastBuildDate>Fri, 03 Feb 2012 10:29:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<meta xmlns="http://www.w3.org/1999/xhtml" name="robots" content="noindex,follow" />
	<item>
		<title>By: Stu</title>
		<link>http://simon-says-architecture.com/2010/03/31/dependency-inversion-patterns-and-the-domain-model/comment-page-1/#comment-898</link>
		<dc:creator>Stu</dc:creator>
		<pubDate>Wed, 30 Jun 2010 14:14:06 +0000</pubDate>
		<guid isPermaLink="false">http://simon-says-architecture.com/?p=556#comment-898</guid>
		<description>Hi,

I have a problem that I&#039;ve explained on Stack Overflow. Basically I have a situation where neither double dispatch or domain events seem to fit properly. Does anyone have any suggestions?

http://stackoverflow.com/questions/3148853/service-behaviour-in-entity-how-to-avoid-service-injection-into-entity</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I have a problem that I&#8217;ve explained on Stack Overflow. Basically I have a situation where neither double dispatch or domain events seem to fit properly. Does anyone have any suggestions?</p>
<p><a href="http://stackoverflow.com/questions/3148853/service-behaviour-in-entity-how-to-avoid-service-injection-into-entity" rel="nofollow">http://stackoverflow.com/questions/3148853/service-behaviour-in-entity-how-to-avoid-service-injection-into-entity</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Szymon Pobiega</title>
		<link>http://simon-says-architecture.com/2010/03/31/dependency-inversion-patterns-and-the-domain-model/comment-page-1/#comment-810</link>
		<dc:creator>Szymon Pobiega</dc:creator>
		<pubDate>Thu, 13 May 2010 19:21:37 +0000</pubDate>
		<guid isPermaLink="false">http://simon-says-architecture.com/?p=556#comment-810</guid>
		<description>Yes, this can be done in application layer the way you say. 
The advantage of this approach is simplicity. On the other hand, returning bools from such methods couple your domain model with application layer. Please, look at Udi Dahan;s article:http://www.udidahan.com/2009/06/14/domain-events-salvation/ and other 2 about domain events.</description>
		<content:encoded><![CDATA[<p>Yes, this can be done in application layer the way you say.<br />
The advantage of this approach is simplicity. On the other hand, returning bools from such methods couple your domain model with application layer. Please, look at Udi Dahan;s article:http://www.udidahan.com/2009/06/14/domain-events-salvation/ and other 2 about domain events.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ILICH</title>
		<link>http://simon-says-architecture.com/2010/03/31/dependency-inversion-patterns-and-the-domain-model/comment-page-1/#comment-809</link>
		<dc:creator>ILICH</dc:creator>
		<pubDate>Wed, 12 May 2010 18:36:56 +0000</pubDate>
		<guid isPermaLink="false">http://simon-says-architecture.com/?p=556#comment-809</guid>
		<description>I don&#039;t get why you solving problem in that way ... 
Maybe your Customer shouldn&#039;t send an email at all ? 
Maybe CheckUnpaidDues method should return just a result instead on sending emails ? Just delegate this email sending to method calling entity ... 
it should be something simpler than such indirect  delegation using domain events ! 
Or maybe i missed something ?</description>
		<content:encoded><![CDATA[<p>I don&#8217;t get why you solving problem in that way &#8230;<br />
Maybe your Customer shouldn&#8217;t send an email at all ?<br />
Maybe CheckUnpaidDues method should return just a result instead on sending emails ? Just delegate this email sending to method calling entity &#8230;<br />
it should be something simpler than such indirect  delegation using domain events !<br />
Or maybe i missed something ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Szymon Pobiega</title>
		<link>http://simon-says-architecture.com/2010/03/31/dependency-inversion-patterns-and-the-domain-model/comment-page-1/#comment-739</link>
		<dc:creator>Szymon Pobiega</dc:creator>
		<pubDate>Wed, 31 Mar 2010 15:47:40 +0000</pubDate>
		<guid isPermaLink="false">http://simon-says-architecture.com/?p=556#comment-739</guid>
		<description>@Harry M

Krzysztof shown up during his presentation on local .NET community meeting an example taken from KIGG codebase where dependencies are being resolved using a static locator.

It was very hard to reason about this code (I&#039;ve seen it for the first time) when dependency resolution was scattered all over the code.</description>
		<content:encoded><![CDATA[<p>@Harry M</p>
<p>Krzysztof shown up during his presentation on local .NET community meeting an example taken from KIGG codebase where dependencies are being resolved using a static locator.</p>
<p>It was very hard to reason about this code (I&#8217;ve seen it for the first time) when dependency resolution was scattered all over the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harry M</title>
		<link>http://simon-says-architecture.com/2010/03/31/dependency-inversion-patterns-and-the-domain-model/comment-page-1/#comment-738</link>
		<dc:creator>Harry M</dc:creator>
		<pubDate>Wed, 31 Mar 2010 14:09:12 +0000</pubDate>
		<guid isPermaLink="false">http://simon-says-architecture.com/?p=556#comment-738</guid>
		<description>PPS Ignore what I said about the event stuff here, I&#039;ll respond on jimmy bogards blog!</description>
		<content:encoded><![CDATA[<p>PPS Ignore what I said about the event stuff here, I&#8217;ll respond on jimmy bogards blog!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harry M</title>
		<link>http://simon-says-architecture.com/2010/03/31/dependency-inversion-patterns-and-the-domain-model/comment-page-1/#comment-737</link>
		<dc:creator>Harry M</dc:creator>
		<pubDate>Wed, 31 Mar 2010 11:45:53 +0000</pubDate>
		<guid isPermaLink="false">http://simon-says-architecture.com/?p=556#comment-737</guid>
		<description>PS the clock on your comments is a year out :)</description>
		<content:encoded><![CDATA[<p>PS the clock on your comments is a year out <img src='http://simon-says-architecture.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harry M</title>
		<link>http://simon-says-architecture.com/2010/03/31/dependency-inversion-patterns-and-the-domain-model/comment-page-1/#comment-736</link>
		<dc:creator>Harry M</dc:creator>
		<pubDate>Wed, 31 Mar 2010 11:44:45 +0000</pubDate>
		<guid isPermaLink="false">http://simon-says-architecture.com/?p=556#comment-736</guid>
		<description>Great summary of the options.

A couple of thoughts...

How about returning a value from the domain event to allow 2 way comms? i.e. have an overload of Publish that returns a result.

The other point is really about Krzysztof&#039;s quote. The &#039;class [can] depend on possibly anything&#039; - anything that is that it DOES depend on. What I mean is that the actual code only calls the dependencies that a/ can be referenced by the class via the import statements, and that someone has explicitly coded into the .cs file. This is no different to the set of dependencies that someone can put into the constructor and have injected. Its a little more opaque of course, as its not written in the constructor definition, but if you have some knowledge of the class, and your tests are running the code, you should know what its going to do. I would be a bit scared of a 3rd party library that needed to use my service locator without having very good docs on what dependencies need to be registered, but in 1st party code its not such a problem.</description>
		<content:encoded><![CDATA[<p>Great summary of the options.</p>
<p>A couple of thoughts&#8230;</p>
<p>How about returning a value from the domain event to allow 2 way comms? i.e. have an overload of Publish that returns a result.</p>
<p>The other point is really about Krzysztof&#8217;s quote. The &#8216;class [can] depend on possibly anything&#8217; &#8211; anything that is that it DOES depend on. What I mean is that the actual code only calls the dependencies that a/ can be referenced by the class via the import statements, and that someone has explicitly coded into the .cs file. This is no different to the set of dependencies that someone can put into the constructor and have injected. Its a little more opaque of course, as its not written in the constructor definition, but if you have some knowledge of the class, and your tests are running the code, you should know what its going to do. I would be a bit scared of a 3rd party library that needed to use my service locator without having very good docs on what dependencies need to be registered, but in 1st party code its not such a problem.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

