Feeds

Model use cases that work

Think succinct

Combat fraud and increase customer satisfaction

Use case modeling in practice

Here's an exercise from the book, on opening an account. See how many errors you can spot in the following use case, and try to rewrite the use case text - hint: this relates back to the items numbered 10 and three in our list. Once you're done, compare your rewritten version with our "fixed" version. Good luck!

BASIC COURSE: The system displays the Create New Account page and enters the following fields: Username (must be unique), password, confirm password, first name, last name, address (first line), address (second line), city, state, country, zip/postal code, telephone number, and e-mail address. Then the user clicks the Submit button; the system checks that the Username is unique, creates the new user account, and displays the main Hub Page, along with a message indicating that the user account is now created and logged in.

ALTERNATE COURSES: Password and Confirm Password don't match: The page is redisplayed with a validation message.
Username not unique: The page is redisplayed and the user is asked to choose a different username.

What's wrong? Answer: This use case gets bogged down in presentation details. It spends too long listing the fields to be found on the Create New Account page, with the result that the text doesn't follow a noun-verb-noun sentence structure.

Padded-out use cases of this sort often take up much more than two paragraphs. This doesn't help, as you want your use case to be succinct enough to translate to a single sequence diagram. We'll come back to this point in the fourth and final part of this series.

Instead, the fields should be added as attributes to the appropriate class in your domain model - most likely the Customer class. Then, when you need them later, they'll be right there. The fixed version follows.

BASIC COURSE: The system displays the Create New Account page and enters the fields to define a new Customer account. Then the user clicks the Submit button; the system checks that the Username is unique, creates the new user account, and displays the main Hub Page, along with a message indicating that the user account is now created and logged in.

ALTERNATE COURSES: Password and Confirm Password don't match: The page is redisplayed with a validation message.
Username not unique: The page is redisplayed and the user is asked to choose a different username.

In this excerpt we covered how to write the kinds of use cases that can be used to drive a software design. In the next installment we tackle robustness analysis, a form of preliminary design that helps to prepare your use cases for detailed design, testing and coding.

Use Case Driven Object Modeling with UML: Theory and Practice is available for purchase through Register Books, at the special price of £34.99. ®

3 Big data security analytics techniques

More from The Register

next story
Ubuntu 14.04 LTS: Great changes, but sssh don't mention the...
Why HELLO Amazon! You weren't here last time
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Next Windows obsolescence panic is 450 days from … NOW!
The clock is ticking louder for Windows Server 2003 R2 users
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
OpenBSD founder wants to bin buggy OpenSSL library, launches fork
One Heartbleed vuln was too many for Theo de Raadt
Got Windows 8.1 Update yet? Get ready for YET ANOTHER ONE – rumor
Leaker claims big release due this fall as Microsoft herds us into the CLOUD
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
Red Hat to ship RHEL 7 release candidate with a taste of container tech
Grab 'near-final' version of next Enterprise Linux next week
Apple inaugurates free OS X beta program for world+dog
Prerelease software now open to anyone, not just developers – as long as you keep quiet
prev story

Whitepapers

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.
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.
Securing web applications made simple and scalable
In this whitepaper learn how automated security testing can provide a simple and scalable way to protect your web applications.
Combat fraud and increase customer satisfaction
Based on their experience using HP ArcSight Enterprise Security Manager for IT security operations, Finansbank moved to HP ArcSight ESM for fraud management.