Feeds

Vague and ambiguous use cases revisited

Join Camp Gritty

High performance access to file storage

Oh no, not again: the industry's gone and divided into two camps. In Camp Purity, there's the group insisting that use cases must be abstract and free of any specific technology or UI feature. Simply heavenly! Useless, but heavenly.

Then in Camp Gritty, there's the group politely whispering that use cases work better when they're concrete, specific and tuned into the design. I'm firmly in Camp Gritty (but as you can see from the responses to this linked article, many people aren't).

head shot of Matt Stephens smiling

Matt Stephens.

Of course, it's horses for courses really. The term "use case" has evolved to mean more than one type of specification, and – crucially – is applied at varying stages in the development lifecycle. So use case advice only makes sense if you first establish exactly which type of use case you're talking about, and at what stage it should be applied – oh, and who's actually involved in writing the use cases and the "document ping-pong" that follows while the details are ironed out.

According to the Camp Puritans, "the user clicks the Submit button on the Details page" is an unforgivably evil statement, because it imposes the concept of buttons and clicking on the final UI – and the final UI may not use buttons (not if Steve Jobs is involved in the design, at any rate). Worse, the example implies a web-based system, and surely you want to keep those use cases pure, because the eventual system may not be web-based at all.

If the use cases comprised your first written specification for the system (which they probably shouldn't), then it would make sense to omit the technical details: after all, you're defining the "what" and the "why", not the "how". But it's more likely that the project's first written specification of any weight will be a functional spec: "The system shall allow humanoid entities to update customer details." This is an important document, but handing it directly to the programmers/designers is likely to result in much guesswork, and an eventual system that is almost, but not quite, entirely unlike the customer's own vision of the finished article. ("What we demand is a total absence of solid facts.")

This is where use cases really come into their own - pinning down the specifics. Not to use them in this way would be a terrible shame, as they're so good at it. And if you combine use cases with robustness analysis and a domain model to bridge the gap between analysis and design, then there's little room left for ambiguity and guesswork.

So, who writes the use cases? Usually a non-technical person who spends a lot of time talking to the customers and end-users. But use case writing works best as a collaborative and iterative process. The first-draft text won't be the last. Robustness analysis (aka preliminary design, aka use case realisation, which definitely involves the developers) may result in a virtual rewrite of the use case text; not necessarily changing the scope, but wringing out ambiguity and making sure that the behavioural scenarios are written in the context of the domain model, from which the eventual class design will flow.

Use cases are also useful as a user experience description, exploring the user's path through the UI to complete specific tasks. While a "pure" use case that doesn't pin down the UI might seem like a good thing (rather like several layers of separation in a multi-tiered design), in practice it isn't really much use.

So... at some point in the project you'll need to hunker down and start committing to technical/architectural decisions, so why not make it the use case stage? Join Camp Gritty, you know it makes sense.

Matt Stephens is the co-author, with Doug Rosenberg, of Use Case Driven Object Modeling with UML: Theory and Practice.

High performance access to file storage

More from The Register

next story
Android engineer: We DIDN'T copy Apple OR follow Samsung's orders
Veep testifies for Samsung during Apple patent trial
Microsoft: Windows version you probably haven't upgraded to yet is ALREADY OBSOLETE
Pre-Update versions of Windows 8.1 will no longer support patches
OpenSSL Heartbleed: Bloody nose for open-source bleeding hearts
Bloke behind the cockup says not enough people are helping crucial crypto project
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Windows XP still has 27 per cent market share on its deathbed
Windows 7 making some gains on XP Death Day
Internet-of-stuff startup dumps NoSQL for ... SQL?
NoSQL taste great at first but lacks proper nutrients, says startup cloud whiz
Microsoft lobs pre-release Windows Phone 8.1 at devs who dare
App makers can load it before anyone else, but if they do they're stuck with it
US taxman blows Win XP deadline, must now spend millions on custom support
Gov't IT likened to 'a Model T with a lot of things on top of it'
prev story

Whitepapers

Mainstay ROI - Does application security pay?
In this whitepaper learn how you and your enterprise might benefit from better software security.
Five 3D headsets to be won!
We were so impressed by the Durovis Dive headset we’ve asked the company to give some away to Reg readers.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Mobile application security study
Download this report to see the alarming realities regarding the sheer number of applications vulnerable to attack, as well as the most common and easily addressable vulnerability errors.