Vague and ambiguous use cases

How abstract should your specs be?

Internet Security Threat Report 2014

Column Programmers are often frustrated when well-meaning managers or architects attempt to introduce some OOAD [note that the process in my link isn't necessarily the same as the Iconix process Matt alludes to - Ed] into their projects.

Often the reason for this frustration is subtle, and has nothing to do with OOAD as such - it's that they've been given vague and ambiguous requirements to design from. And the reason for so much ambiguity is that so many of the books and gurus out there preach "abstract, essential, technology-free, and implementation-independent" as the right way to write use cases.

Representation of Vague and Ambiguous Use Cases

To illustrate...

Which of these two use case scenarios would you prefer to create a design from?

  1. The clerk enters basic loss information specific to the claim line. The system confirms that there are no existing, possibly competing claims and assigns a claim number. The clerk confirms they are finished; the system saves and triggers acknowledgement to be sent to the agent.
  2. The system displays the Basic Loss Information Page, with a form to enter basic loss information specific to the claim line. The clerk fills out the form then clicks the "Add" button. The system queries the claims database to confirm that there are no existing, possibly competing claims. The system then assigns an ID to the claim and displays the confirmation page. The clerk clicks the "Confirm" button, and the system saves the claim, then triggers acknowledgement to be sent to the agent.

(For brevity's sake, I'm omitting the all-important "rainy day scenarios"; such as what the system should do if an existing, competing claim is discovered).

Example 1 is excerpted, and slightly mangled to fit into the context of this article, from a longer use case description in Alistair Cockburn's Writing Effective Use Cases. Example 2 is my attempt at rewriting the first one to be less vague and ambiguous.

Example 1 is an "essential", abstract, technology-free and implementation-independent use case description. In fact, it's closer to a business process description as it has a lot to say about the details of a business transaction but very little (nothing, in fact) about precisely how the user and the system will interact. In other words, it's entirely divorced from the technical or UI details.

By contrast, Example 2 is more of a detailed usage description: a low-level scenario. So to an extent, we're talking "horses for courses" - different styles for different purposes.

But if you're defining the business and purely the business (as in Example 1) - to be brutally honest you probably don't want to do this with use cases - you'd do better to write business process descriptions, which tend to be broader in scope (one use case is typically a "discrete packet of functionality", i.e. quite fine-grained).

But having defined your business processes, there's a mighty leap to get from there to an architecture and detailed design. This is where Example 2 comes in, a set of use case scenario descriptions with concrete, tangible and specific statements of required system behaviour that programmers can deal with efficiently.

As you've probably gathered, my own preference is for the second example, because it's far more explicit. So instead of showing a page/screen/unspecified UI component with information about basic loss information, the system is displaying a Basic Loss Information Page. It gives the developers a specific name to refer to.

To illustrate this, in the second example I've bolded the terms that would end up as domain objects, actors or pages/screens, which then get used in the detailed design. In doing so, I noted that Basic Loss Information could be an entity class, or even be a set of attributes on a Claim entity class. This all helps to tighten up your behavioural spec, and it's a tangible benefit of tying your use cases to your objects.

By writing your use cases using a concrete, unambiguous style, you end up with a rigorous specification of how the user and the system will interact (with an additional, higher-level description of the business processes, if the project calls for it). From a behavioural spec of this sort, it's then much easier to design and create a comprehensive set of unit tests, and to create realistic estimates.

(The diagram at the top of this article appears in the Preface to my latest snappily titled blockbuster co-authored with Doug Rosenberg, Use Case Driven Object Modeling with UML: Theory and Practice, which walks you through the OOAD process I've alluded to in this article). ®

Remote control for virtualized desktops

More from The Register

next story
Download alert: Nearly ALL top 100 Android, iOS paid apps hacked
Attack of the Clones? Yeah, but much, much scarier – report
NSA SOURCE CODE LEAK: Information slurp tools to appear online
Now you can run your own intelligence agency
Whistling Google: PLEASE! Brussels can only hurt Europe, not us
And Commish is VERY pro-Google. Why should we worry?
Microsoft: Your Linux Docker containers are now OURS to command
New tool lets admins wrangle Linux apps from Windows
Soz, web devs: Google snatches its Wallet off the table
Killing off web service in 3 months... but app-happy bonkers are fine
First in line to order a Nexus 6? AT&T has a BRICK for you
Black Screen of Death plagues early Google-mobe batch
prev story


Designing and building an open ITOA architecture
Learn about a new IT data taxonomy defined by the four data sources of IT visibility: wire, machine, agent, and synthetic data sets.
5 critical considerations for enterprise cloud backup
Key considerations when evaluating cloud backup solutions to ensure adequate protection security and availability of enterprise data.
Getting started with customer-focused identity management
Learn why identity is a fundamental requirement to digital growth, and how without it there is no way to identify and engage customers in a meaningful way.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
Protecting against web application threats using SSL
SSL encryption can protect server‐to‐server communications, client devices, cloud resources, and other endpoints in order to help prevent the risk of data loss and losing customer trust.