Behaviour-Driven Development

Service-Oriented Development with Consumer-Driven Contracts

July 28th, 2008  |  Published in Behaviour-Driven Development, Consumer-Driven Contracts by Ian Robinson

A few months ago Stefan Tilkov very kindly offered me the opportunity to write about consumer-driven contracts for InfoQ. The resulting article, “Service-Oriented Development with Consumer-Driven Contracts” is now available online.

Special thanks to Stefan for thoroughly reviewing a draft of the article, Dan North for helping shape an even earlier version, and Jim Webber and Ian Cartwright for lots of conversation and encouragement.

I’ve still not written much on how to implement consumer-driven contracts, but I’ve something special cooking (slowly) in that area: expect some illustrative material to emerge over the next few months.

Atom   RSS 2.0   Email

Stories, Capabilities, Services and Contracts

June 25th, 2008  |  Published in Agile, Behaviour-Driven Development, Consumer-Driven Contracts, SOA by Ian Robinson

Today I want to introduce a bare-bones model to help guide the creation of business, architectural and technology artefacts in an agile and iterative manner over the course of an SOA initiative:

  • Stories – in the form of Behaviour-Driven Development exemplars – describe goals and desired outcomes;
  • Capabilities encapsulate the resources and abilities an organisation needs to satisfy those goals;
  • Services host capabilities;
  • Contracts – particularly consumer-driven contracts – assert the interactions between services.

We iterate over this model many times in the course of an engagement, emphasising different parts as we go. We concentrate on organisation-level stories and capabilities when establishing an organisation-wide context, then project-level stories, capabilities and services whilst planning projects and delivery streams, and then release- and iteration-level artefacts during specific instances of delivery.

Such an approach represents a “thin-slice” way to:

  • establish context, business goals and consensus amongst stakeholders;
  • create a long-term vision that joins up the business, architectural and technology views of an SOA initiative;
  • describe and challenge an organisation’s goals and the benefits attached to those goals;
  • describe the capabilities needed to meet those goals;
  • identify the quality-of-service expectations the business has of those capabilities;
  • identify services and assign capabilities to services;
  • describe and test the externally visible interactions between services;
  • identify, plan and develop slices of service functionality that deliver business benefits early and often.

Atom   RSS 2.0   Email

Rediscovering Business Benefits

June 5th, 2008  |  Published in Agile, Behaviour-Driven Development by Ian Robinson

Outcomes and the business value that we’re seeking to release in pursuing those outcomes all too often get passed over in favour of a morass of implementation trivia.

Desired business outcomes frame the delivery of application functionality, or more generally, service capabilities: they motivate software development. The outcome-driven bias of agile practices is reflected in the user story: in the Role-Feature-Benefit story sequence (see Dan North’s What‘s in a story for a description of these parts, and more recently Elizabeth Keogh’s RIP As a… I want… So that… for a compelling reformulation of the story format).

Sadly, many instances of stories try and get by without capturing outcomes and benefits. As one of the commentators on Elizabeth’s post notes: “the ‘so that’s’ are always the hardest thing to write in a story and are the first thing to be omitted.”

I see a lot of stories that neglect Role-Feature-Benefit in favour of the much easier Role-How-Feature. That is: as a <role> I want <something doing this way> so that <I can do this/this happens>:

As a user I want to export results so that I can share them with colleagues

Well, thanks for telling me how to do my job, and not telling me anything about what motivates yours.

Have we specified an outcome here? Not really. What we do have is a misplaced feature masquerading as an outcome, and a pre-emptive description of how to implement that feature. We’ve shuffled the desired outcome, the goal that motivates this feature, off the table. And by pre-emptively specifying an implementation, we’ve limited the opportunity for choosing between several implementation strategies – lo-fi, hi-fi – come implementation time.

When I spot stories like this, I try to “force” the issue of outcomes and benefits by performing a “shift left” on the story parts. Role stays the same, Feature shifts left, and squeezes How out. This leaves: as a <role> I want <to do this/this to happen> so that <??????>:

As a user I want share results with colleagues so that…

Now we’ve got a role, and a feature, and can start asking “why?” regarding the benefit:

As a user I want share results with colleagues so we can make an informed group decision about recent performance

Identifying the benefit allows us to turn the effort dial up and down. You need to do this, urgently? How about this workaround? Estimate: zip.

Atom   RSS 2.0   Email