<?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: Fluent Domain Methods</title>
	<atom:link href="http://elegantcode.com/2009/08/01/fluent-domain-methods/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com/2009/08/01/fluent-domain-methods/</link>
	<description></description>
	<lastBuildDate>Wed, 28 Jul 2010 21:28:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Summary 05.08.2009 &#171; Bogdan Brinzarea&#8217;s blog</title>
		<link>http://elegantcode.com/2009/08/01/fluent-domain-methods/comment-page-1/#comment-48192</link>
		<dc:creator>Summary 05.08.2009 &#171; Bogdan Brinzarea&#8217;s blog</dc:creator>
		<pubDate>Wed, 05 Aug 2009 14:31:32 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/08/01/fluent-domain-methods/#comment-48192</guid>
		<description>[...] Van Ryswyck talks about fluent domain methods for setting up complex aggregate roots and for implementing behavior on domain [...]</description>
		<content:encoded><![CDATA[<p>[...] Van Ryswyck talks about fluent domain methods for setting up complex aggregate roots and for implementing behavior on domain [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Van Ryswyck</title>
		<link>http://elegantcode.com/2009/08/01/fluent-domain-methods/comment-page-1/#comment-48157</link>
		<dc:creator>Jan Van Ryswyck</dc:creator>
		<pubDate>Tue, 04 Aug 2009 10:59:44 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/08/01/fluent-domain-methods/#comment-48157</guid>
		<description>@Dokie: The Tags collection is exposed as an IEnumerable.</description>
		<content:encoded><![CDATA[<p>@Dokie: The Tags collection is exposed as an IEnumerable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dokie</title>
		<link>http://elegantcode.com/2009/08/01/fluent-domain-methods/comment-page-1/#comment-48151</link>
		<dc:creator>Dokie</dc:creator>
		<pubDate>Tue, 04 Aug 2009 07:53:49 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/08/01/fluent-domain-methods/#comment-48151</guid>
		<description>This looks good but I cannot see explicitly from this post or the former, but do you not expose the Tags collection via a public getter property called  Tags on the Document class? The previous post showed code such as

 var tagBuilder = new TagBuilder(tag =&gt;
            ProvideValueFor(document =&gt; document.Tags, tag));

which I interpret as having such a property. Whilst the backing field is retrieved for the collection (even if that is, and usually would be, private) to perform the actual Add call to the collection, if you expose the Tags collection and it is not a ReadOnlyCollection, then the consumer can simple add a Tag object without going through the Fluent building path or through the call to AddTag. Am I right in this analysis?</description>
		<content:encoded><![CDATA[<p>This looks good but I cannot see explicitly from this post or the former, but do you not expose the Tags collection via a public getter property called  Tags on the Document class? The previous post showed code such as</p>
<p> var tagBuilder = new TagBuilder(tag =&gt;<br />
            ProvideValueFor(document =&gt; document.Tags, tag));</p>
<p>which I interpret as having such a property. Whilst the backing field is retrieved for the collection (even if that is, and usually would be, private) to perform the actual Add call to the collection, if you expose the Tags collection and it is not a ReadOnlyCollection, then the consumer can simple add a Tag object without going through the Fluent building path or through the call to AddTag. Am I right in this analysis?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dew Drop &#8211; August 3, 2009 &#124; Alvin Ashcraft's Morning Dew</title>
		<link>http://elegantcode.com/2009/08/01/fluent-domain-methods/comment-page-1/#comment-48112</link>
		<dc:creator>Dew Drop &#8211; August 3, 2009 &#124; Alvin Ashcraft's Morning Dew</dc:creator>
		<pubDate>Mon, 03 Aug 2009 12:43:07 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/08/01/fluent-domain-methods/#comment-48112</guid>
		<description>[...] Fluent Domain Methods (Jan Van Ryswyck) [...]</description>
		<content:encoded><![CDATA[<p>[...] Fluent Domain Methods (Jan Van Ryswyck) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reflective Perspective - Chris Alcock &#187; The Morning Brew #403</title>
		<link>http://elegantcode.com/2009/08/01/fluent-domain-methods/comment-page-1/#comment-48109</link>
		<dc:creator>Reflective Perspective - Chris Alcock &#187; The Morning Brew #403</dc:creator>
		<pubDate>Mon, 03 Aug 2009 09:11:31 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/08/01/fluent-domain-methods/#comment-48109</guid>
		<description>[...] Fluent Domain Methods - Jan Van Ryswyck explores builiding domain objects with Fluent interfaces and takes a look at the structure of the fluent builder. [...]</description>
		<content:encoded><![CDATA[<p>[...] Fluent Domain Methods &#8211; Jan Van Ryswyck explores builiding domain objects with Fluent interfaces and takes a look at the structure of the fluent builder. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Bellware</title>
		<link>http://elegantcode.com/2009/08/01/fluent-domain-methods/comment-page-1/#comment-48101</link>
		<dc:creator>Scott Bellware</dc:creator>
		<pubDate>Sun, 02 Aug 2009 22:34:49 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/08/01/fluent-domain-methods/#comment-48101</guid>
		<description>Seems like named parameters would make questionable that which is proposed here as a clear advantage of method chaining.</description>
		<content:encoded><![CDATA[<p>Seems like named parameters would make questionable that which is proposed here as a clear advantage of method chaining.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://elegantcode.com/2009/08/01/fluent-domain-methods/comment-page-1/#comment-48100</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Sun, 02 Aug 2009 21:02:48 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/08/01/fluent-domain-methods/#comment-48100</guid>
		<description>@Jan
Thanks for the reply. Sorry to freak you out though... ;) I pressed forward with this approach frequently into my current project and found it very simple to extend. Something itches me about injecting such builders into my entities at construction but it&#039;s great to have this functionality should the need arise.
Keep up the good articles !
Mike</description>
		<content:encoded><![CDATA[<p>@Jan<br />
Thanks for the reply. Sorry to freak you out though&#8230; <img src='http://elegantcode.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  I pressed forward with this approach frequently into my current project and found it very simple to extend. Something itches me about injecting such builders into my entities at construction but it&#8217;s great to have this functionality should the need arise.<br />
Keep up the good articles !<br />
Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Van Ryswyck</title>
		<link>http://elegantcode.com/2009/08/01/fluent-domain-methods/comment-page-1/#comment-48095</link>
		<dc:creator>Jan Van Ryswyck</dc:creator>
		<pubDate>Sun, 02 Aug 2009 19:34:05 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/08/01/fluent-domain-methods/#comment-48095</guid>
		<description>@Mike: I personally don&#039;t consider this as a violation of SRP. In my post, I linked to a post from Udi where he advises to &quot;always get an entity&quot;. It is the duty of an aggregate root to enforce its boundaries. I therefore consider the expression builder being a part of the domain. In my example, the value object is not created by the aggregate root, but by the expression builder itself. The aggregate only adds to its collection.

After reading your article, I must say that the resemblance of the phases we&#039;ve been through freaks me out :-). If you want your domain entity to return a different builder (your example talks abot different signatures), then one might put this in a seperate &#039;BuilderFactory&#039;. NH 2.1 now supports IoC, so such a factory can be injected into a domain object when retrieved from NH. 

One of the major advantages in using expression builders this way is loosening up dependencies on the domain. My 2 (Euro)cents.</description>
		<content:encoded><![CDATA[<p>@Mike: I personally don&#8217;t consider this as a violation of SRP. In my post, I linked to a post from Udi where he advises to &#8220;always get an entity&#8221;. It is the duty of an aggregate root to enforce its boundaries. I therefore consider the expression builder being a part of the domain. In my example, the value object is not created by the aggregate root, but by the expression builder itself. The aggregate only adds to its collection.</p>
<p>After reading your article, I must say that the resemblance of the phases we&#8217;ve been through freaks me out <img src='http://elegantcode.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . If you want your domain entity to return a different builder (your example talks abot different signatures), then one might put this in a seperate &#8216;BuilderFactory&#8217;. NH 2.1 now supports IoC, so such a factory can be injected into a domain object when retrieved from NH. </p>
<p>One of the major advantages in using expression builders this way is loosening up dependencies on the domain. My 2 (Euro)cents.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://elegantcode.com/2009/08/01/fluent-domain-methods/comment-page-1/#comment-48056</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Sat, 01 Aug 2009 22:05:59 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/08/01/fluent-domain-methods/#comment-48056</guid>
		<description>@Jan
I implemented a similar pattern on my blog a while back and got heat from some who thought I was violating SRP by allowing my agg root to return such a factory/builder...everyone wanted me to inject it. My opinion though is that the very notion of an Aggregate Root &#039;violates&#039; SRP by placing both the behavior of an entity _and_ the role it plays as the root...and I&#039;m ok with that. Any thots?</description>
		<content:encoded><![CDATA[<p>@Jan<br />
I implemented a similar pattern on my blog a while back and got heat from some who thought I was violating SRP by allowing my agg root to return such a factory/builder&#8230;everyone wanted me to inject it. My opinion though is that the very notion of an Aggregate Root &#8216;violates&#8217; SRP by placing both the behavior of an entity _and_ the role it plays as the root&#8230;and I&#8217;m ok with that. Any thots?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
