<?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: A Fluent Builder in C#</title>
	<atom:link href="http://stefanoricciardi.com/2010/04/14/a-fluent-builder-in-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://stefanoricciardi.com/2010/04/14/a-fluent-builder-in-c/</link>
	<description>On Software Development and Thereabouts</description>
	<lastBuildDate>Mon, 30 Jan 2012 08:04:00 +0100</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Eugene ivanov</title>
		<link>http://stefanoricciardi.com/2010/04/14/a-fluent-builder-in-c/comment-page-1/#comment-577</link>
		<dc:creator>Eugene ivanov</dc:creator>
		<pubDate>Sat, 23 Apr 2011 13:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://stefanoricciardi.com/?p=884#comment-577</guid>
		<description>very nice</description>
		<content:encoded><![CDATA[<p>very nice</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruce</title>
		<link>http://stefanoricciardi.com/2010/04/14/a-fluent-builder-in-c/comment-page-1/#comment-139</link>
		<dc:creator>Bruce</dc:creator>
		<pubDate>Wed, 19 May 2010 16:15:37 +0000</pubDate>
		<guid isPermaLink="false">http://stefanoricciardi.com/?p=884#comment-139</guid>
		<description>Dave,

yes creating a static method can make sense (and I have seen other similar implementations resorting to static methods).

However, as you correctly noted, my approach is to use the builder through an interface which rules out static methods. I might post some more on this.</description>
		<content:encoded><![CDATA[<p>Dave,</p>
<p>yes creating a static method can make sense (and I have seen other similar implementations resorting to static methods).</p>
<p>However, as you correctly noted, my approach is to use the builder through an interface which rules out static methods. I might post some more on this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruce</title>
		<link>http://stefanoricciardi.com/2010/04/14/a-fluent-builder-in-c/comment-page-1/#comment-442</link>
		<dc:creator>Bruce</dc:creator>
		<pubDate>Wed, 19 May 2010 16:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://stefanoricciardi.com/?p=884#comment-442</guid>
		<description>Dave,

yes creating a static method can make sense (and I have seen other similar implementations resorting to static methods).

However, as you correctly noted, my approach is to use the builder through an interface which rules out static methods. I might post some more on this.</description>
		<content:encoded><![CDATA[<p>Dave,</p>
<p>yes creating a static method can make sense (and I have seen other similar implementations resorting to static methods).</p>
<p>However, as you correctly noted, my approach is to use the builder through an interface which rules out static methods. I might post some more on this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stefanoricciardi</title>
		<link>http://stefanoricciardi.com/2010/04/14/a-fluent-builder-in-c/comment-page-1/#comment-98</link>
		<dc:creator>stefanoricciardi</dc:creator>
		<pubDate>Fri, 16 Apr 2010 07:37:30 +0000</pubDate>
		<guid isPermaLink="false">http://stefanoricciardi.com/?p=884#comment-98</guid>
		<description>Dave,

yes creating a static method can make sense (and I have seen other similar implementations resorting to static methods).

However, as you correctly noted, my approach is to use the builder through an interface which rules out static methods. I might post some more on this.</description>
		<content:encoded><![CDATA[<p>Dave,</p>
<p>yes creating a static method can make sense (and I have seen other similar implementations resorting to static methods).</p>
<p>However, as you correctly noted, my approach is to use the builder through an interface which rules out static methods. I might post some more on this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stefanoricciardi</title>
		<link>http://stefanoricciardi.com/2010/04/14/a-fluent-builder-in-c/comment-page-1/#comment-441</link>
		<dc:creator>stefanoricciardi</dc:creator>
		<pubDate>Fri, 16 Apr 2010 07:37:00 +0000</pubDate>
		<guid isPermaLink="false">http://stefanoricciardi.com/?p=884#comment-441</guid>
		<description>Dave,

yes creating a static method can make sense (and I have seen other similar implementations resorting to static methods).

However, as you correctly noted, my approach is to use the builder through an interface which rules out static methods. I might post some more on this.</description>
		<content:encoded><![CDATA[<p>Dave,</p>
<p>yes creating a static method can make sense (and I have seen other similar implementations resorting to static methods).</p>
<p>However, as you correctly noted, my approach is to use the builder through an interface which rules out static methods. I might post some more on this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://stefanoricciardi.com/2010/04/14/a-fluent-builder-in-c/comment-page-1/#comment-81</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Thu, 15 Apr 2010 12:16:11 +0000</pubDate>
		<guid isPermaLink="false">http://stefanoricciardi.com/?p=884#comment-81</guid>
		<description>Just an idea: what do you think about making CreateTeam a static method? This would allow the client to eliminate writing the construction code:

var myTeam = TeamBuilder.CreateTeam(&quot;Chelsea&quot;)
    .WithNickName(&quot;The blues&quot;)
    .WithShirtColor(Color.Blue)
    .FromTown(&quot;London&quot;)
    .PlayingAt(&quot;Stamford Bridge&quot;);


As I think about this though, I realize this would make it difficult to abstract TeamBuilder to the ITeamBuilder interface; so there is a tradeoff.</description>
		<content:encoded><![CDATA[<p>Just an idea: what do you think about making CreateTeam a static method? This would allow the client to eliminate writing the construction code:</p>
<p>var myTeam = TeamBuilder.CreateTeam(&#8220;Chelsea&#8221;)<br />
    .WithNickName(&#8220;The blues&#8221;)<br />
    .WithShirtColor(Color.Blue)<br />
    .FromTown(&#8220;London&#8221;)<br />
    .PlayingAt(&#8220;Stamford Bridge&#8221;);</p>
<p>As I think about this though, I realize this would make it difficult to abstract TeamBuilder to the ITeamBuilder interface; so there is a tradeoff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://stefanoricciardi.com/2010/04/14/a-fluent-builder-in-c/comment-page-1/#comment-440</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Thu, 15 Apr 2010 12:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://stefanoricciardi.com/?p=884#comment-440</guid>
		<description>Just an idea: what do you think about making CreateTeam a static method? This would allow the client to eliminate writing the construction code:

var myTeam = TeamBuilder.CreateTeam(&quot;Chelsea&quot;)
    .WithNickName(&quot;The blues&quot;)
    .WithShirtColor(Color.Blue)
    .FromTown(&quot;London&quot;)
    .PlayingAt(&quot;Stamford Bridge&quot;);


As I think about this though, I realize this would make it difficult to abstract TeamBuilder to the ITeamBuilder interface; so there is a tradeoff.</description>
		<content:encoded><![CDATA[<p>Just an idea: what do you think about making CreateTeam a static method? This would allow the client to eliminate writing the construction code:</p>
<p>var myTeam = TeamBuilder.CreateTeam(&#8220;Chelsea&#8221;)<br />
    .WithNickName(&#8220;The blues&#8221;)<br />
    .WithShirtColor(Color.Blue)<br />
    .FromTown(&#8220;London&#8221;)<br />
    .PlayingAt(&#8220;Stamford Bridge&#8221;);</p>
<p>As I think about this though, I realize this would make it difficult to abstract TeamBuilder to the ITeamBuilder interface; so there is a tradeoff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stefanoricciardi</title>
		<link>http://stefanoricciardi.com/2010/04/14/a-fluent-builder-in-c/comment-page-1/#comment-80</link>
		<dc:creator>stefanoricciardi</dc:creator>
		<pubDate>Thu, 15 Apr 2010 11:02:39 +0000</pubDate>
		<guid isPermaLink="false">http://stefanoricciardi.com/?p=884#comment-80</guid>
		<description>P,

thank you for stepping by and leaving a comment. 

The way I see it, a creational pattern such as the builder is always going to be somehow coupled to the object(s) it&#039;s creating. The goal of creational patterns make &lt;i&gt;clients&lt;/i&gt; more independent on how an object is composed.

The example that I have shown here is admittedly very simple. I have some implementations of this pattern where all the clients see is an interface (think of &lt;code&gt;ITeamBuilder&lt;/code&gt;) which builds object implementing an interface (think &lt;code&gt;ITeam&lt;/code&gt;).

In such a scenario, I can make both concrete ITeamBuilder and ITeam implementations invisible to the clients (e.g. by marking the classes and their constructor as &lt;i&gt;internal&lt;/i&gt;). This is serving well for me to decouple the clients from the actual implementation.</description>
		<content:encoded><![CDATA[<p>P,</p>
<p>thank you for stepping by and leaving a comment. </p>
<p>The way I see it, a creational pattern such as the builder is always going to be somehow coupled to the object(s) it&#8217;s creating. The goal of creational patterns make <i>clients</i> more independent on how an object is composed.</p>
<p>The example that I have shown here is admittedly very simple. I have some implementations of this pattern where all the clients see is an interface (think of <code>ITeamBuilder</code>) which builds object implementing an interface (think <code>ITeam</code>).</p>
<p>In such a scenario, I can make both concrete ITeamBuilder and ITeam implementations invisible to the clients (e.g. by marking the classes and their constructor as <i>internal</i>). This is serving well for me to decouple the clients from the actual implementation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stefanoricciardi</title>
		<link>http://stefanoricciardi.com/2010/04/14/a-fluent-builder-in-c/comment-page-1/#comment-439</link>
		<dc:creator>stefanoricciardi</dc:creator>
		<pubDate>Thu, 15 Apr 2010 11:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://stefanoricciardi.com/?p=884#comment-439</guid>
		<description>P,

thank you for stepping by and leaving a comment. 

The way I see it, a creational pattern such as the builder is always going to be somehow coupled to the object(s) it&#039;s creating. The goal of creational patterns make &lt;i&gt;clients&lt;/i&gt; more independent on how an object is composed.

The example that I have shown here is admittedly very simple. I have some implementations of this pattern where all the clients see is an interface (think of &lt;code&gt;ITeamBuilder&lt;/code&gt;) which builds object implementing an interface (think &lt;code&gt;ITeam&lt;/code&gt;).

In such a scenario, I can make both concrete ITeamBuilder and ITeam implementations invisible to the clients (e.g. by marking the classes and their constructor as &lt;i&gt;internal&lt;/i&gt;). This is serving well for me to decouple the clients from the actual implementation.</description>
		<content:encoded><![CDATA[<p>P,</p>
<p>thank you for stepping by and leaving a comment. </p>
<p>The way I see it, a creational pattern such as the builder is always going to be somehow coupled to the object(s) it&#8217;s creating. The goal of creational patterns make <i>clients</i> more independent on how an object is composed.</p>
<p>The example that I have shown here is admittedly very simple. I have some implementations of this pattern where all the clients see is an interface (think of <code>ITeamBuilder</code>) which builds object implementing an interface (think <code>ITeam</code>).</p>
<p>In such a scenario, I can make both concrete ITeamBuilder and ITeam implementations invisible to the clients (e.g. by marking the classes and their constructor as <i>internal</i>). This is serving well for me to decouple the clients from the actual implementation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: P</title>
		<link>http://stefanoricciardi.com/2010/04/14/a-fluent-builder-in-c/comment-page-1/#comment-74</link>
		<dc:creator>P</dc:creator>
		<pubDate>Wed, 14 Apr 2010 20:53:10 +0000</pubDate>
		<guid isPermaLink="false">http://stefanoricciardi.com/?p=884#comment-74</guid>
		<description>interesting - however, I think fluent interface is optimally suited for queries rather than constructors:

e.g. Query.createQuery().andName(&quot;Chelsea&quot;).list();

The drawback I see with the solution you are proposing is that TeamBuilder, if used without implicit user-defined type conversion operator, which AFAIK is unavailable in other languages such as Java, replicates all attributes of Team, which in turn could cause maintainability issues.

Could TeamBuilder subclass Team to actually avoid this? It would also have the advantage of permitting a private constructor for both Team and TeamBuilder...</description>
		<content:encoded><![CDATA[<p>interesting &#8211; however, I think fluent interface is optimally suited for queries rather than constructors:</p>
<p>e.g. Query.createQuery().andName(&#8220;Chelsea&#8221;).list();</p>
<p>The drawback I see with the solution you are proposing is that TeamBuilder, if used without implicit user-defined type conversion operator, which AFAIK is unavailable in other languages such as Java, replicates all attributes of Team, which in turn could cause maintainability issues.</p>
<p>Could TeamBuilder subclass Team to actually avoid this? It would also have the advantage of permitting a private constructor for both Team and TeamBuilder&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

