References:
$60 Object-Oriented Software Engineering: A Use-Case Driven Approach,
by Ivar Jacobson, et al. Addison-Wesley, Reading, MA, 1992. 524 pages
The book that started UML.
$45 The Object Advantage: business process engineering with object technology,
by Jacobson, I., Ericsson, M. and Jacobson, A. Addison-Wesley, May 2001.
Applies object-oriented technology to the business process engineering (BPR) model.
$35 Writing Effective Use Cases
by Alistair Cockburn (name pronounced "Coburn") of
usecases.org .
Addison-Wesley, Oct. 2000. 270 pages.
$32 Practical Software Requirements
(Manning Publications October 1, 1998)
by Benjamin L. Kovitz
gives a structure.
Software Requirements, 2nd edition (Microsoft Press February 26, 2003)
by Karl E. Wiegers presents a jargon-free introduction to the best practices in requirements
discovery, verification and validation.
First Edition (Microsoft Press August 26, 1999)
$36 Mastering the Requirements Process
(Addison-Wesley August 12, 1999)
by Suzanne & James Robertson
$45 Effective Requirements Practices
(Addison-Wesley arch 8, 2001)
by Ralph R. Young
$35 Software Requirements (Addison-Wesley, January 16, 2002)
by Soren Lauesen
Visual-paradigm's Online Tutorial
UML Use Case diagram of the RUP Testing Discipline
|
|
Use cases define the context of a system.
Use cases identify the intent satisfying the role assumed by
external “actors" interacting with the “system under discussion/test”.
A primary actor is one having a goal requiring the assistance of the system.
A secondary actor is one from which the system needs assistance to satisfy a goal.
Use cases are useful for several reasons throughout the development life cycle:
- In the planning stage, the process of defining important use cases helps to clarify the most important goals of the system.
Use cases helps to narrow the scope of the project. They can surface often unspoken assumptions about the desired behavior of the system.
Roles add a level of abstraction to object-based constructs.
A role is an instance of an encapsulated set of properties and behavior,
but is described and used in a way that is totally
independent of the object(s) that may implement it.
This definition is just a technical narrowing of the most common everyday sense of the word role.
For example, we can talk about the role of Hamlet in a particular performance,
without reference to the actor(s) playing this role.
The decision about who actually plays this role on stage is a separate “casting” decision.
Normally we'd like to pick the single actor providing the highest “quality of service”.
But we would also like the freedom to swap in a designated “second”
if the original actor gets sick, or perhaps even to use two children, one on the other's shoulders and together dressed to look like a single adult actor.
- In the execution stage, use cases provide developers key parts of the specification.
Some systems are built entirely with only use case descriptions from sponsors.
Use cases can be presented graphically in a diagram or in
prose form, somewhat structured and
highly structured .
Types of Use Case Activities
Activities performed in a use case may be categorized this way:
- Activites that Assign Responsibility, determine appropriate resources.
For example, in a project management system, a person is designated to a defined project task.
- Activites that define New Objects, as in a new object aggregate.
- Activites that define New Processes, such as an assembly of existing activities.
Use Case Diagrams
Use case diagrams are external view of a system's interactions with the outside world.
Therefore, the system under discussion is illustrated as a single entity.
Each line represents a channel of dialog between the actor and the system.
The oval use case icon encapsulates how the system achieves its goal
-- structuring mechanism for interaction diagrams .
The actual software is often structured in a completely different way.
Relationships
Lines in a use case represent more than a transfer of data or command, as in
traditional flow chart and UML Activity Diagrams.
Lines in a UML use case between an actor and the system represent a more abstract concept of
relationship of communication, acquaintance, or inheritance.
A use case circle can be more than a user invoking an on-demand service
that passively waits until called upon.
A Use case circle can be event-driven, which proactively notifies one or more subscribers when
specific events occur.
Services that run on their own without formal invocation may be better represented as an (automated) actor
rather than as a use case circle.
Uses
The relationship lines labled with the <<uses>> stereotype
illustrates how two use cases are combined.
Extends
The relationship line labled <<extends>> illustrates a special case:
conditional (optional) or exception behavior.
A sample of a generalization relation is of a business use case "Withdraw Cash".
Examples of use cases Subordinate to it would be:
"Withdraw Cash from Teller" or
"Withdraw cash from ATM Machine".
Another sample of a generalization relation is of when different technologies
are used to achieve the same ends:
"Register using phone" or
"Register using website".
To identify extensions in your application, look through boundary values and states in your data,
where a user may, while performing a business use case, optionally:
- obtain approval from higher-level management;
- request more or less detail;
(switching between a list instead of a form, obtain a more detailed report or analysis, map, etc.);
requst a reformatted view (alternative sort, another view, etc.);
- reach limits (such as the credit limit or the spending example above);
- trigger low balance alerts and trigger automatic transfers (such as with stored valued toll accounts);
- trigger ratios dynamically calculated reach a specified threshold,
trades are placed automatically.
Includes
The relationship line labled with the <<includes>> streotype illustrates
where a business use case is a part of the aggravation of many larger business processes. ;)
Whoops. I mean the aggregation of a more comprehensive use case.
This is why the relationship arrow point into the aggregate (higher level) use case.
- "View Cart" includes to a part of "Choose shipping and payment methods".
Boundaries
A box defines the boundaries of related use cases.
Lines from a box point to lower-level entities -- subdivision -- subgoals.
This sample use case diagram is from the Professional version of Microsoft Visio 2002 software.
It's called a “Jacobson use case model” because use cases were popularized by Ivar Jacobson,
one of the gurus who joined Rational corporation and defined the Unified Modeling Language (UML).
This sample is within the “software” category because it is a widely accepted documentation protocol for Object Oriented design and programming.
A “scenario” results from sequencing interactions.
A use case defines a collection of possible scenarios.
A use case is a collection of scenarios, each with a different triggering event.
The main course is the simplest scenario, the one in which everything goes right and goal is achieved without difficulty — all the subordinate use cases succeed.
Alternative courses (and there can be any number of them) describe deviations from that basic course.
Use cases are one aspect of a complete design, described in this graphic from a pdf file named
“Structure and Style in Use Cases for User Interface Design” at
Larry Constantine's website :
|
|