<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Object Mentor Blog: One</title>
    <link>http://blog.objectmentor.com/articles/2007/03/21/one</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>One</title>
      <description>&lt;p&gt;I posted earlier about the three numbers of software design (zero, one, many).  Zero and Many are numbers we see pretty often, but the rise of &lt;span class="caps"&gt;TDD&lt;/span&gt; has made &amp;#8220;one&amp;#8221; just a little bit lonelier. I wanted to say that one is the loneliest number, but David Chelimsky beat me to it several months ago, and I would just feel like a copycat.&lt;/p&gt;


	&lt;p&gt;When we&amp;#8217;re test-driving an application into existence, we tend to create mock objects.  The presence of one mock object in addition to one real object places is firmly in the design space of &amp;#8220;many&amp;#8221;, and so interfaces  become the rule of the day.&lt;/p&gt;


	&lt;p&gt;In addition, we have dependency management to deal with.  In order to reduce the D metric on a package, we find ourselves often breaking a class into an interface (increasing A) and an implementation that depends upon it (increasing I) in a separate package.&lt;/p&gt;


	&lt;p&gt;Of course, the &amp;#8220;other question&amp;#8221; is volatility.  If we have one implementation of something small and simple in a domain that is very stable then we don&amp;#8217;t need any interface and &amp;#8220;one&amp;#8221; takes center stage.  This is true for whole value objects (fowler) in general.  If the class is more complex, or dependent on special hardware or changing algorithms, then we end up creating a mock (driving us back to &amp;#8220;many&amp;#8221;).&lt;/p&gt;


	&lt;p&gt;But the number one is becoming more and more rare in our design world.&lt;/p&gt;</description>
      <pubDate>Wed, 21 Mar 2007 09:17:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:ed167d57-6430-4d3b-a15d-b622216c33a5</guid>
      <author>tottinger</author>
      <link>http://blog.objectmentor.com/articles/2007/03/21/one</link>
      <category>Tim's Tepid Torrent</category>
      <trackback:ping>http://blog.objectmentor.com/articles/trackback/5209</trackback:ping>
    </item>
    <item>
      <title>"One" by cathy</title>
      <description>&lt;p&gt;It is nice of you to post this.I will pay more attention on it.
&lt;a href="http://www.bagsupplyer.com/DSQ-n664/" rel="nofollow"&gt;Discount designer Men DSQ Jeans from China at on line store&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 09 Sep 2011 23:36:57 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:bda43921-f30c-414f-8d71-91778ad8f620</guid>
      <link>http://blog.objectmentor.com/articles/2007/03/21/one#comment-138985</link>
    </item>
    <item>
      <title>"One" by hi good luck </title>
      <description>&lt;p&gt;Basically no other &lt;a href="http://www.carmodelchina.com/Off-Road+RC+Monster+Truck-china-15/" rel="nofollow"&gt;RC Monster Truck&lt;/a&gt; sorts of knowledge was first attainable to the lawsuit.&lt;/p&gt;</description>
      <pubDate>Mon, 29 Aug 2011 04:18:20 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:40d20289-cbc4-4773-9997-d9ea1ccb5980</guid>
      <link>http://blog.objectmentor.com/articles/2007/03/21/one#comment-133858</link>
    </item>
    <item>
      <title>"One" by Mens Leather Boots</title>
      <description>&lt;p&gt;It&amp;#8217;s a useful blog.I would like to know how you develop the applications.thanks.&lt;/p&gt;</description>
      <pubDate>Tue, 12 Jul 2011 21:41:02 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:05045946-3bc1-43ad-b741-1ed9e26e9426</guid>
      <link>http://blog.objectmentor.com/articles/2007/03/21/one#comment-118269</link>
    </item>
    <item>
      <title>"One" by best mmo 2012</title>
      <description>&lt;p&gt;Actually this site is very nice and informative. Thanks&lt;/p&gt;</description>
      <pubDate>Thu, 16 Jun 2011 05:42:19 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:e36ef51a-a27e-4ff3-91d2-de06f2ee6f60</guid>
      <link>http://blog.objectmentor.com/articles/2007/03/21/one#comment-111423</link>
    </item>
    <item>
      <title>"One" by beats by dr dre headphones</title>
      <description>&lt;p&gt;These blog are new and very good.&lt;/p&gt;</description>
      <pubDate>Fri, 03 Jun 2011 00:37:22 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:73081948-57de-4729-ae5e-74ca8e1d90ce</guid>
      <link>http://blog.objectmentor.com/articles/2007/03/21/one#comment-107460</link>
    </item>
    <item>
      <title>"One" by okey oyunu oyna </title>
      <description>&lt;p&gt;Actually this site is very nice and informative. Thanks&lt;/p&gt;


	&lt;p&gt;T&#252;m dunyadaki okey oyunculari ile ayni platform i&#231;erisinde sohbet ederek canli &lt;a href="http://www.okeyoyunu-oyna.com" rel="nofollow"&gt;okey oyunu oyna&lt;/a&gt; ve ve internette online oyun oynamanin zevkini &#231;ikar.&lt;/p&gt;</description>
      <pubDate>Mon, 25 Apr 2011 10:14:34 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:ff854e22-1361-4075-a1ab-bc3fe0adf232</guid>
      <link>http://blog.objectmentor.com/articles/2007/03/21/one#comment-90508</link>
    </item>
    <item>
      <title>"One" by Nike Frees</title>
      <description>&lt;p&gt;legitimate stainless, where by the earlier knives could well be even more stain less than stainless while in the modern day sense.&lt;/p&gt;</description>
      <pubDate>Mon, 28 Feb 2011 00:29:06 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:b13cfab5-bf4b-4f3b-bf28-3909128b5637</guid>
      <link>http://blog.objectmentor.com/articles/2007/03/21/one#comment-67141</link>
    </item>
    <item>
      <title>"One" by Tenant Screening</title>
      <description>&lt;p&gt;By making the system cleaner and smaller, we were being reported as making negative progress, and were ordered to stop!&lt;/p&gt;</description>
      <pubDate>Tue, 22 Feb 2011 11:25:12 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:e8558fc0-1049-48d3-b69e-443d7159b993</guid>
      <link>http://blog.objectmentor.com/articles/2007/03/21/one#comment-65701</link>
    </item>
    <item>
      <title>"One" by Criminal Records</title>
      <description>&lt;p&gt;Even when I study the works of others with an eye to refactoring, I look at D as being a symptom of a structural disease rather than an attack vector.&lt;/p&gt;</description>
      <pubDate>Mon, 21 Feb 2011 14:14:50 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:79a96d2d-61cb-4d02-b074-cde2a3b6b83f</guid>
      <link>http://blog.objectmentor.com/articles/2007/03/21/one#comment-65259</link>
    </item>
    <item>
      <title>"One" by M2TS File Converter</title>
      <description>&lt;p&gt;one is the loneliest number&#8221; reference. Can you refresh my memory?&lt;/p&gt;</description>
      <pubDate>Wed, 28 Apr 2010 22:59:31 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:90e152c6-4269-406d-8777-d9f4031445ac</guid>
      <link>http://blog.objectmentor.com/articles/2007/03/21/one#comment-10715</link>
    </item>
    <item>
      <title>"One" by David Chelimsky</title>
      <description>&lt;p&gt;I don&amp;#8217;t remember the &amp;#8220;one is the loneliest number&amp;#8221; reference. Can you refresh my memory?&lt;/p&gt;</description>
      <pubDate>Sat, 24 Mar 2007 07:43:52 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:a41d43fe-7333-4e8e-b81e-56e62ca2e327</guid>
      <link>http://blog.objectmentor.com/articles/2007/03/21/one#comment-160</link>
    </item>
    <item>
      <title>"One" by www.EdmundKirwan.com</title>
      <description>&lt;p&gt;&lt;a href="http://www.edmundkirwan.com/servlet/fractal/GetFrac" rel="nofollow"&gt;http://www.edmundkirwan.com/servlet/fractal/GetFrac&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 24 Mar 2007 07:24:43 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:e7516fe2-aeea-4ecb-9d0c-bab8631e2b72</guid>
      <link>http://blog.objectmentor.com/articles/2007/03/21/one#comment-159</link>
    </item>
    <item>
      <title>"One" by Tim</title>
      <description>&lt;p&gt;With which tool did you create these diagrams?&lt;/p&gt;</description>
      <pubDate>Fri, 23 Mar 2007 14:04:15 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:7c07ba39-019a-45e4-84be-bbe2c15eb14c</guid>
      <link>http://blog.objectmentor.com/articles/2007/03/21/one#comment-157</link>
    </item>
    <item>
      <title>"One" by www.EdmundKirwan.com</title>
      <description>&lt;p&gt;Hej, Tim,&lt;/p&gt;


	&lt;p&gt;Yes, you&amp;#8217;re quite correct: I&amp;#8217;m a Javaist.&lt;/p&gt;


	&lt;p&gt;When I read your article above, something else struck me, but I wasn&amp;#8217;t sure
what it was till I went away and slept on it. This morning, it surfaced to
consciousness: &amp;#8220;In order to reduce the D metric on a package &amp;#8230;&amp;#8221;&lt;/p&gt;


	&lt;p&gt;I enjoy studying the D-metric as much as the next man, but I hadn&amp;#8217;t really
given serious consideration to attacking structure with the sole intention of
reducing D (not that you were full-heartedly proposing that). I usually work
to design rules that have steered me well in the past and at the end, take a
peek at D just to make sure I&amp;#8217;ve not drifted into turbulent waters.&lt;/p&gt;


	&lt;p&gt;D is something I tend to see in the rear-view mirror (to mix metaphors).&lt;/p&gt;


	&lt;p&gt;Even when I study the works of others with an eye to refactoring, I look at D
as being a symptom of a structural disease rather than an attack vector.&lt;/p&gt;


	&lt;p&gt;I like the idea, but I can imagine there are cases where a reduction of D
would seem a local improvement, but on the global scale of the application&amp;#8217;s
structure, it might not look so rosy.&lt;/p&gt;


	&lt;p&gt;I mentioned the structure of jBehave on another mentor blog, and I&amp;#8217;ll use it
here as an example. As I mentioned before, jBehave has a beautiful
structure: it has a lovely curve, indicating a hierarchy of behaviour of which
I wholely approve. Here&amp;#8217;s a picture of it, but colour-coded for D: the redder,
the larger the D:&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.edmundkirwan.com/jbehave-d.png" rel="nofollow"&gt;http://www.edmundkirwan.com/jbehave-d.png&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;A few packages have a D of 0.75 or 0.8, but only one has a D of 1.0:
org.jbehave.core.exception package. If we ignore the nastiness of Java&amp;#8217;s
forbidding abstract exceptions, it might seem like an improvement to attack
this package&amp;#8217;s D-value and start splitting out interfaces: and in general I
would approve. But this package does nicely encapsulate all the application&amp;#8217;s
exceptions: it would be a shame to reduce its D only to sprinkle these
exceptions throughout the structure, rather than have them nicely concentrated
where they are.&lt;/p&gt;


	&lt;p&gt;Of course, we could argue that we can reduce its D value and still maintain
encapsulation of the exceptions: I&amp;#8217;m sure it would be possible; I suppose I
just want to acknowledge the constraint of keeping an eye on the overall
structure while we are busy working on any single package&amp;#8217;s D metric.&lt;/p&gt;


	&lt;p&gt;Just for fun, here are two more pictures of jBehave, the first colour-coded
for A:&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.edmundkirwan.com/jbehave-a.png" rel="nofollow"&gt;http://www.edmundkirwan.com/jbehave-a.png&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;And this colour-coded for I:&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.edmundkirwan.com/jbehave-i.png" rel="nofollow"&gt;http://www.edmundkirwan.com/jbehave-i.png&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Finally, though I admit to being profoundly fascinated by examining the
structure of applications, I&amp;#8217;ll also admit that the first test of any software
is its utility: if it does the job you want and does it well, then its
structure is almost irrelevant. I think no software demonstrates this better
than jUnit.&lt;/p&gt;


	&lt;p&gt;jUnit is a masterpiece of utility, but its structure is almost indecipherable:
a double-hump of seeming duplication and unintuitive package names. OK, I
admit to reading in all the classes here, but the sentiment persists. Here&amp;#8217;s a
picture showing its 7 circular dependencies (I suppose no tool is perfect):&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.edmundkirwan.com/junit.png" rel="nofollow"&gt;http://www.edmundkirwan.com/junit.png&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;I do enjoy your blog, by the way.&lt;/p&gt;


	&lt;p&gt;.ed&lt;/p&gt;</description>
      <pubDate>Fri, 23 Mar 2007 12:52:17 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:108ad82c-19ae-4ef3-8afe-beec9afa74a3</guid>
      <link>http://blog.objectmentor.com/articles/2007/03/21/one#comment-156</link>
    </item>
    <item>
      <title>"One" by tim</title>
      <description>&lt;p&gt;Sounds like someone is thinking in Java. I&amp;#8217;m a long-time OO developer (since at least 1988) and have quite a bit experience as a professional developer (since 1979), but I only decided to stop avoiding the inevitable and start trying to learn Java last year. I&amp;#8217;ve yet to learn to like it, and have not fully internalized it.  It&amp;#8217;s still a foreign language to me, so please forgive me when it shows.&lt;/p&gt;


	&lt;p&gt;But if I were breaking up a package because of D, then it would be with the intention of splitting the interface and implementation among different physical packages (whether across logical packages or not).  Yes, it could have such a drawback.&lt;/p&gt;


	&lt;p&gt;Thanks for pointing that out! It might save someone some trouble in the future.&lt;/p&gt;</description>
      <pubDate>Thu, 22 Mar 2007 11:59:14 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:d79d65c9-1ec1-46bd-8a4e-a63a629d1a3b</guid>
      <link>http://blog.objectmentor.com/articles/2007/03/21/one#comment-149</link>
    </item>
    <item>
      <title>"One" by www.EdmundKirwan.com</title>
      <description>&lt;p&gt;&amp;#8221; ... we find ourselves often breaking a class into an interface (increasing A) and an implementation that depends upon it (increasing I) in a separate package.&amp;#8221;&lt;/p&gt;


	&lt;p&gt;Which also means making the interface public, though the original class may have been package-private.&lt;/p&gt;


	&lt;p&gt;Hope you&amp;#8217;ve a good hierarchical encapsulation strategy to limit the damage &amp;#8230;&lt;/p&gt;</description>
      <pubDate>Thu, 22 Mar 2007 11:00:57 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:96a5cc09-1099-4a70-8e52-8f7d53de2a96</guid>
      <link>http://blog.objectmentor.com/articles/2007/03/21/one#comment-148</link>
    </item>
  </channel>
</rss>

