<?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: Tag components</title>
    <link>http://blog.objectmentor.com/articles/tag/components</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>User Stories for Cross-Component Teams</title>
      <description>&lt;p&gt;I&amp;#8217;m working on an Agile Transition for a large organization. They are organized into component teams. They implement features by forming temporary feature teams with representatives from each of the relevant components, usually one developer per component.&lt;/p&gt;


	&lt;p&gt;Doing User Stories for such cross-component features can be challenging.&lt;/p&gt;


	&lt;p&gt;Now, it would be nice if the developers just pair-programmed with each other, ignoring their assigned component boundaries, but we&amp;#8217;re not quite there yet. Also, there are other issues we are addressing, such as the granularity of feature definitions, &lt;em&gt;etc., etc.&lt;/em&gt; Becoming truly agile will take time.&lt;/p&gt;


	&lt;p&gt;Given where we are, it&amp;#8217;s just not feasible to estimate a single story point value for each cross-component user story, because the work for each component varies considerably. A particular story might be the equivalent of 1 point for the UI part, 8 points for the middle-tier part, 2 points for the database part, &lt;em&gt;etc.&lt;/em&gt;&lt;/p&gt;


	&lt;p&gt;So, what we&amp;#8217;re doing is treating the user story as an &amp;#8220;umbrella&amp;#8221;, with individual component stories underneath. We&amp;#8217;re estimating and tracking the points for each component story. The total points for the user story is the sum of the component story points, plus any extra we decide is needed for the integration and final acceptance testing work.&lt;/p&gt;


	&lt;p&gt;This model allows us to track the work more closely, as long as we remember that &lt;strong&gt;&lt;em&gt;component points mean nothing from the point of view of delivering customer value!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;I prefer this approach to documenting tasks, because it keeps the focus on delivering value to the &lt;em&gt;client&lt;/em&gt; of each story. For the component stories, the client will be another component.&lt;/p&gt;


	&lt;h3&gt;Automated Acceptance Tests for Component Stories&lt;/h3&gt;


	&lt;p&gt;Just as for user stories, we are defining &lt;em&gt;automated acceptance tests&lt;/em&gt; for each component. We&amp;#8217;re using JUnit for them, since we don&amp;#8217;t need a customer-friendly specification format, like &lt;a href="http://fitnesse.org"&gt;FitNesse&lt;/a&gt; or &lt;a href="http://rspec.info"&gt;RSpec&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;This is also a (sneaky&amp;#8230;) way to get the developers from different components to pair together. Say for example that we have a component story for the midtier and the UI is the &lt;em&gt;client&lt;/em&gt;. The UI developer and the midtier developer pair to produce the the acceptance criteria for the story.&lt;/p&gt;


	&lt;p&gt;For each component story, the pair of programmers produce the following:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;JUnit tests that define the acceptance criteria for the component story.&lt;/li&gt;
		&lt;li&gt;One or more interfaces that will be used by the client of the component. They will also be implemented by concrete classes in the component.&lt;/li&gt;
		&lt;li&gt;A &lt;a href="http://www.martinfowler.com/bliki/TestDouble.html"&gt;test double&lt;/a&gt; that passes the JUnit tests and allows the client to move forward while the component feature is being implemented.&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;In a sense, the &amp;#8220;contract&amp;#8221; of the component story is the interfaces, which specify the static structure, and the JUnit tests, which specify the dynamic behavior of the feature.&lt;/p&gt;


	&lt;p&gt;This model of pair-programming the component interface should solve the common, inefficient communication problems when component interactions need to be changed. You know the scenario;  a &lt;em&gt;client&lt;/em&gt; component developer or manager tells a &lt;em&gt;server&lt;/em&gt; component developer or manager that a change is needed. A developer (probably a different one&amp;#8230;) on the &lt;em&gt;server&lt;/em&gt; component team makes up an interface, checks it into version control, and waits for feedback from the &lt;em&gt;client&lt;/em&gt; team. Meanwhile, the &lt;em&gt;server&lt;/em&gt; component developer starts implementing the changes.&lt;/p&gt;


	&lt;p&gt;A few days before the big drop to QA for final integration testing, the &lt;em&gt;server&lt;/em&gt; component developer realizes that the interface is missing some essential features. At the same time, the &lt;em&gt;client&lt;/em&gt; component developer finally gets around to using the new interface and discovers a different set of missing essential features. Hilarity ensues&amp;#8230;&lt;/p&gt;


	&lt;p&gt;We&amp;#8217;re just getting started with this approach, but so far it is proving to be an effective way to organize our work and to be more efficient.&lt;/p&gt;</description>
      <pubDate>Fri, 19 Sep 2008 19:53:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:73b5a7a1-a1ae-49f5-9743-2368c0006606</guid>
      <author>Dean Wampler</author>
      <link>http://blog.objectmentor.com/articles/2008/09/19/user-stories-for-cross-component-teams</link>
      <category>Dean's Deprecations</category>
      <category>Agile Methods</category>
      <category>agile</category>
      <category>stories</category>
      <category>components</category>
      <category>acceptance</category>
      <category>Tests</category>
    </item>
    <item>
      <title>Contracts and Integration Tests for Component Interfaces</title>
      <description>&lt;p&gt;I am mentoring a team that is transitioning to XP, the first team in a planned, corporate-wide transition. Recently we ran into miscommunication problems about an interface we are providing to another team.&lt;/p&gt;


	&lt;p&gt;The problems didn&amp;#8217;t surface until a &amp;#8220;big-bang&amp;#8221; integration right before a major release, when it was too late to fix the problem. The feature was backed out of the release, as a result.&lt;/p&gt;


	&lt;p&gt;There are several lessons to take away from this experience and a few techniques for preventing these problems in the first place.&lt;/p&gt;


	&lt;p&gt;End-to-end &lt;em&gt;automated&lt;/em&gt; integration tests are a well-established way of catching these problems early on. The team I&amp;#8217;m mentoring has set up its own continuous-integration (CI) server and the team is getting pretty good at writing &lt;em&gt;acceptance&lt;/em&gt; tests using &lt;a href="http://fitnesse.org"&gt;FitNesse&lt;/a&gt;. However, these tests only cover the components provided by the team, not the true end-to-end &lt;em&gt;user stories&lt;/em&gt;. So, they are imperfect as both acceptance tests and integration tests. Our longer-term goal is to automate &lt;em&gt;true&lt;/em&gt; end-to-end acceptance and integration tests, across all components and services.&lt;/p&gt;


	&lt;p&gt;In this particular case, the other team is following a waterfall-style of development, with &lt;em&gt;big design up front&lt;/em&gt;. Therefore, my team needed to give them an interface to design against, before we were ready to actually implement the service.&lt;/p&gt;


	&lt;p&gt;There are a couple of problems with this approach. First, the two teams should really &amp;#8220;pair&amp;#8221; to work out the interface and behavior across their components. As I said, we&amp;#8217;re just starting to go Agile, but my goal is to have &lt;em&gt;virtual&lt;/em&gt; feature teams, where members of the required component teams come together as needed to implement features. This would help prevent the miscommunication of one team defining an interface and sharing it with another team through documentation, &lt;em&gt;etc.&lt;/em&gt;  Getting people to communicate face-to-face and to write code together would minimize miscommunication.&lt;/p&gt;


	&lt;p&gt;Second, defining a service interface without the implementation is risky, because it&amp;#8217;s very likely you will miss important details. The best way to work out the details of the interface is to test drive it in some way.&lt;/p&gt;


	&lt;p&gt;This suggests another technique I want to introduce to the team. When defining an interface for external consumption, don&amp;#8217;t just deliver the &amp;#8220;static&amp;#8221; interface (source files, documentation, &lt;em&gt;etc.&lt;/em&gt;), also deliver working &lt;a href="http://www.mockobjects.com/"&gt;Mock Objects&lt;/a&gt; that the other team can test against. You should develop these mocks as you test drive the interface, even if you aren&amp;#8217;t yet working on the full implementation (for schedule or other reasons).&lt;/p&gt;


	&lt;p&gt;The mocks encapsulate and enforce the behavioral &lt;strong&gt;contract&lt;/strong&gt; of the interface. &lt;a href="http://en.wikipedia.org/wiki/Design_by_contract"&gt;Design by Contract&lt;/a&gt; is a very effective way of thinking about interface design and implementing automated enforcement of it. Test-driven development mostly serves the same practical function, but thinking in &amp;#8220;contractual&amp;#8221; terms brings clarity to tests that is often missing in many of the tests I see.&lt;/p&gt;


	&lt;p&gt;Many developers already use mocks for components that don&amp;#8217;t exist yet and find that the mocks help them design the interfaces to those components, even while the mocks are being used to test clients of the components.&lt;/p&gt;


	&lt;p&gt;Of course, there is no guarantee that the mocks faithfully represent the actual behavior, but they will minimize surprises. Whether you have mocks or not, there is no substitute for running automated integration tests on real components as soon as possible.&lt;/p&gt;</description>
      <pubDate>Sun, 29 Jun 2008 21:54:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:b57496fe-d160-42bd-97cc-73608c9333d1</guid>
      <author>Dean Wampler</author>
      <link>http://blog.objectmentor.com/articles/2008/06/29/contracts-and-integration-tests-for-component-interfaces</link>
      <category>Dean's Deprecations</category>
      <category>Agile Methods</category>
      <category>Design Principles</category>
      <category>design</category>
      <category>by</category>
      <category>contract</category>
      <category>continuous</category>
      <category>integration</category>
      <category>components</category>
      <category>interfaces</category>
      <category>XP</category>
      <category>agile</category>
    </item>
  </channel>
</rss>
