Presentation How To Avoid Stupid Usecases
Presentation How To Avoid Stupid Usecases
Presentation How To Avoid Stupid Usecases
Ian Spence
ispence@ivarjacobson.com
How to avoid writing stupid use cases
1. Go on holiday
2. Spend all your time attending conferences
3. Just start coding
4. Write stupid declarative requirements documents instead
5. Read use-case modeling by Kurt Bittner and Ian Spence
4. For each selected item the system displays a modal dialog displaying the number of
items in stock and an entry field to capture the number of items required.
a. The customer enters the number of items required and click the order button.
The system records the items and quantity required, reserving them in
inventory.
6. The Customer selects their method of payment from the drop-down list of credit card
types.
Manage Account
Charge Device With
ATM Operator
Funds Run Advertising Campaign
Actor 2
Actor 3
Actor 1
Just Do It User
Use the System
Actor 4
Actor 5
extends
completing protection app Completing PPP LTC App
extends
extends
Entering Lifestyle
Entering
App Lifestyle Plus App
Where is the
information that
Transfer Funds
will be required
to support the
behavior?
Bank Customer
Withdraw Cash
Bank System
Check Balances
Operating System
Web Browser
Disk Drive
Keyboard System
Mouse
Delete Order
Customer
Use cases that combine functions to reflect the real value to the actor:
Track Orders
These primary
Get New and Special Offers use cases
cannot provide
Shopper their value
without the
Browse Products and Place Orders information
provided by the
supporting use
cases
<<include>>
<<extend>>
The [Actor] does [xxx]; then the
system does [yyy] in response
Lots of Detail
Briefly
Discovered
Described
Bulleted Essential
Outline Outline
Detailed
Fully Described
Description
Source: Use Case Modeling, Kurt Bittner & Ian Spence, Addison Wesley 2002
2005 Ivar Jacobson International 30
Describe what Happens when the Actors / System Interact
The system
The system The system
pops up a
prompts the determines that
dialog box.
user the entered PIN
The user is correct
selects from a The system
drop-down displays a list
The user box
list. enters
The cash dispenser
The card reader The system
component records the
subsystem determines records the
amount of cash
whether the PIN amount of
dispensed as a null
entered is correct money
terminated string in the
dispensed
transaction database
Activity Diagrams,
provide a way to
visualize a complex flow
of events
?
Which one to choose?
Balance is the key!
A large amount of
actor interaction
(ATM / UI) = majority
of requirements in
use cases
A small amount of
actor interaction (a
compiler) = majority
of requirements in
supplementary
specification
Basic flow,
then
alternates
ispence@ivarjacobson.com