<?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: IWonderAboutInterfaceNames</title>
	<atom:link href="http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/</link>
	<description>Working software daily</description>
	<lastBuildDate>Tue, 24 Aug 2010 08:22:43 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: steve.freeman</title>
		<link>http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/comment-page-1/#comment-547</link>
		<dc:creator>steve.freeman</dc:creator>
		<pubDate>Wed, 20 May 2009 09:14:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/#comment-547</guid>
		<description>@Andy. Using the &#039;I&#039; wart as part of a description is an interesting idea to push people into thinking about roles, but I think of it as a &quot;Training Wheels&quot; rule--something to get started with until I can don&#039;t need it any more.

I find that puns don&#039;t age well in code. I still regret that we use the name Mockery in JMock. One of the clues is that the variable names are always different from the type names. We often write:

Mockery context = new Mockery();

and you write: 

IBrowseTheWeb browser

Maybe I&#039;m just too fixed in my ways but I believe I would have more consistent language with:

MockContext context = new MockContext();

Browser browser</description>
		<content:encoded><![CDATA[<p>@Andy. Using the &#8216;I&#8217; wart as part of a description is an interesting idea to push people into thinking about roles, but I think of it as a &#8220;Training Wheels&#8221; rule&#8211;something to get started with until I can don&#8217;t need it any more.</p>
<p>I find that puns don&#8217;t age well in code. I still regret that we use the name Mockery in JMock. One of the clues is that the variable names are always different from the type names. We often write:</p>
<p>Mockery context = new Mockery();</p>
<p>and you write: </p>
<p>IBrowseTheWeb browser</p>
<p>Maybe I&#8217;m just too fixed in my ways but I believe I would have more consistent language with:</p>
<p>MockContext context = new MockContext();</p>
<p>Browser browser</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Palmer</title>
		<link>http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/comment-page-1/#comment-545</link>
		<dc:creator>Andy Palmer</dc:creator>
		<pubDate>Mon, 18 May 2009 16:38:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/#comment-545</guid>
		<description>I agree that the interfaces you&#039;ve chosen are poor.
The Interfaces contain the name of the type that it appears that they will operate against. This is particularly true of IAddOrdersToCustomer where it does not take a customer.

The point that Udi was making was that by leveraging the &#039;I&#039; prefix, you can anthropomorphise your interfaces into roles. A class then defines itself in terms of things that it can do.

Have you seen &lt;a href=&quot;http://www.testingreflections.com/node/view/7234&quot; rel=&quot;nofollow&quot;&gt;this blog post on Interface Names&lt;/a&gt; that was inspired by my experience of that presentation?

&lt;a href=&quot;http://jnarrate.org&quot; rel=&quot;nofollow&quot;&gt;JNarrate&lt;/a&gt; also contains some good examples of the direction that we took this.</description>
		<content:encoded><![CDATA[<p>I agree that the interfaces you&#8217;ve chosen are poor.<br />
The Interfaces contain the name of the type that it appears that they will operate against. This is particularly true of IAddOrdersToCustomer where it does not take a customer.</p>
<p>The point that Udi was making was that by leveraging the &#8216;I&#8217; prefix, you can anthropomorphise your interfaces into roles. A class then defines itself in terms of things that it can do.</p>
<p>Have you seen <a href="http://www.testingreflections.com/node/view/7234" rel="nofollow">this blog post on Interface Names</a> that was inspired by my experience of that presentation?</p>
<p><a href="http://jnarrate.org" rel="nofollow">JNarrate</a> also contains some good examples of the direction that we took this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve.freeman</title>
		<link>http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/comment-page-1/#comment-516</link>
		<dc:creator>steve.freeman</dc:creator>
		<pubDate>Wed, 29 Apr 2009 09:02:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/#comment-516</guid>
		<description>@Malte Yes, we already saw that. A lot of what we already do is inspired by Reenskaug&#039;s work on Roles which is quite old now. Frankly, most of the serious OO programmers I know do something like DCI already without the fuss. In the book we talk about two-layer architectures: the lower layer is a graph of objects that implement the behaviour, the higher layer is a declarative description that constructs the graph. We haven&#039;t needed traits to do that yet. We&#039;re also not quite so obsessed with graphical UIs, there are plenty of other types of system in the world.</description>
		<content:encoded><![CDATA[<p>@Malte Yes, we already saw that. A lot of what we already do is inspired by Reenskaug&#8217;s work on Roles which is quite old now. Frankly, most of the serious OO programmers I know do something like <span class="caps">DCI </span>already without the fuss. In the book we talk about two-layer architectures: the lower layer is a graph of objects that implement the behaviour, the higher layer is a declarative description that constructs the graph. We haven&#8217;t needed traits to do that yet. We&#8217;re also not quite so obsessed with graphical UIs, there are plenty of other types of system in the world.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Malte Finsterwalder</title>
		<link>http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/comment-page-1/#comment-514</link>
		<dc:creator>Malte Finsterwalder</dc:creator>
		<pubDate>Tue, 28 Apr 2009 17:28:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/#comment-514</guid>
		<description>Concerning Roles, did you read the DCI-Architecture Article from Jim Coplien?

http://www.artima.com/articles/dci_vision.html

Might be interesting to you...</description>
		<content:encoded><![CDATA[<p>Concerning Roles, did you read the <span class="caps">DCI</span>-Architecture Article from Jim Coplien?</p>
<p><a href="http://www.artima.com/articles/dci_vision.html" rel="nofollow">http://www.artima.com/articles/dci_vision.html</a></p>
<p>Might be interesting to you&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve.freeman</title>
		<link>http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/comment-page-1/#comment-513</link>
		<dc:creator>steve.freeman</dc:creator>
		<pubDate>Tue, 28 Apr 2009 00:41:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/#comment-513</guid>
		<description>@Jim If you insist... :)</description>
		<content:encoded><![CDATA[<p>@Jim If you insist&#8230; <img src='http://www.m3p.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve.freeman</title>
		<link>http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/comment-page-1/#comment-512</link>
		<dc:creator>steve.freeman</dc:creator>
		<pubDate>Tue, 28 Apr 2009 00:39:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/#comment-512</guid>
		<description>@Mike I take your point. An interface should be relevant to the domain its defined in. If I&#039;m talking about shopping, then an IOrderCollector would be appropriate. If I&#039;m building a virtual machine, then ITakeOneThingAndReturnVoid might actually make sense.

I think your rule of thumb is interesting. IAddOrdersToCustomer looks a bit like a duplicate of its method -- except that sometimes it&#039;s really hard to find a better name.</description>
		<content:encoded><![CDATA[<p>@Mike I take your point. An interface should be relevant to the domain its defined in. If I&#8217;m talking about shopping, then an IOrderCollector would be appropriate. If I&#8217;m building a virtual machine, then ITakeOneThingAndReturnVoid might actually make sense.</p>
<p>I think your rule of thumb is interesting. IAddOrdersToCustomer looks a bit like a duplicate of its method &#8212; except that sometimes it&#8217;s really hard to find a better name.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/comment-page-1/#comment-511</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Mon, 27 Apr 2009 20:28:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/#comment-511</guid>
		<description>Yes, although without an implementation to anchor you to reality, there&#039;s always a temptation to over-abstract interfaces. If you can generalize from IAddOrdersToCustomer to IOrderCollector, why not from there to a generic ICollector, and from there to ITakeOneThingAndReturnVoid?

Same with (C#) delegates. Predicate and Converter&lt;I&gt; are reasonable enough, but when you get to Action (&quot;take a thing and do something&quot;) you&#039;ve lost all sense of what role is being performed. Which is OK in some contexts, but not in most.

Maybe the rule of thumb should be that an interface name should convey something beyond what&#039;s already implied by its method signatures?</description>
		<content:encoded><![CDATA[<p>Yes, although without an implementation to anchor you to reality, there&#8217;s always a temptation to over-abstract interfaces. If you can generalize from IAddOrdersToCustomer to IOrderCollector, why not from there to a generic ICollector, and from there to ITakeOneThingAndReturnVoid?</p>
<p>Same with (C#) delegates. Predicate and Converter&lt;I&gt; are reasonable enough, but when you get to Action (&#8221;take a thing and do something&#8221;) you&#8217;ve lost all sense of what role is being performed. Which is OK in some contexts, but not in most.</p>
<p>Maybe the rule of thumb should be that an interface name should convey something beyond what&#8217;s already implied by its method signatures?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Arnold</title>
		<link>http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/comment-page-1/#comment-510</link>
		<dc:creator>Jim Arnold</dc:creator>
		<pubDate>Mon, 27 Apr 2009 20:15:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.m3p.co.uk/blog/2009/04/27/spreading-the-word-on-roles/#comment-510</guid>
		<description>ICollectOrders surely? :-)</description>
		<content:encoded><![CDATA[<p>ICollectOrders surely? <img src='http://www.m3p.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
