Use Cases

COMP 310  Java Resources  Eclipse Resources

(Go to Use Cases: How-to's -- A collection of techniques for representing various scenarios.)

Use Cases

A use case is an example of how a user might interact with an application. To develop an application, one of the very first things that a developer must work with the customer to collect and analyze as many use cases as possible. It is from these use cases that a picture is built up that tells the developer how exactly the user (or any external entity) will interact with the system being built and thus how the sytem needs to be built.

Use cases are thus a technique for abstractly decomposing the initial problem as presented to the developer. Use cases enable one to bridge the divide between the colloquial, more natural descriptions of the problem as presented by the customer or user into the more concrete models needed by the developer. Use cases are important in understanding the relationships between the various processes that comprise the entire application under development.

Always remember:

Use cases give a high-level picture of the chain of processes that an application needs to perform in order to specific tasks.    Generally, use cases start from the user desiring to do something, but can also be thought of in terms of either internal or external services that are offered.   When viewed together, multiple use cases will become an graph of operations.

"User Stories" vs. "Use Cases" vs. "Workflows"

These three terms often get batted around in manners that make it difficult to distinguish between them. Unfortunately, the problem is compounded by rather blurry delineations between the concepts and depending on who's talking and the subject or scope of the conversation, these terms are often swapped in and out for each other.

Here are some general guidelines to help distinguish the concepts in your discussions about an application's design:

User Story: A user story generally describes a particular "feature" of an application that a user desires to accomplish some objective.

Use Case: A single atomic operation invoked that is invoked to accomplish a single, specific outcome.

Workflow: A set of steps, i.e. a set of use cases, invoked by the user to accomplish part or all of the objectives of a user story (feature).

 

 

References:

 

Use Case Diagrams

A Use Case Diagram (a standard type of UML diagram) is used to visually represent a use case.  Use case diagrams model the interactions between the tasks a system performs and external entities that need those tasks performed.

 The main components of Use Case diagrams are the "actors", the users or other external entities, and the various components of the system being built. Arrows are used to indicate interactions between components.

 

Example Use Case Diagram

Use Case example
(Note:  Example diagram does not show all the features described below.)

Features to be found in use case diagrams:

 

 Relationships in a use case diagram

 

REMEMBER:  The (open) arrows between the individual uses cases in a use case diagram represent composition, not relative temporal execution!

When a use case has arrows (open arrowheads) pointing to other use cases, it means that use case is composed of the referenced use cases.    It does NOT mean that one use case is executed and then the next is executed.   If a temporal ordering of the use cases needs to be indicated, simply number the arrows to indicate the order in which the component use cases are executed in order to generate the overall use case.  Convention is for the tasks to be ordered in temporal order from top to bottom in the diagram.

 

Use Case-driven System Block Diagrams

System block diagrams are the next developmental stage after creating Use Cases.   These high-level modularizations of a system can be directly generated by simply organizing a well-constructed use case diagram.

For more information, see the Java Resources page on Use Case-driven System Block Diagrams.

 

Use Cases and Proof of System Architecture Design

Since use cases are fundamentally tied to the expression of and deliverance of the operations needed by users, use cases are a critical part of proving the viability of the design of a system's architecture.

End-to-End Integration

End-to-end integration means that the system is operational to the point where a user-driven operation can be traced through its associated use cases from one end of the system to another end of the system. For instance, in a distributed system, the operation should traverse through the use cases in one system, cross the network into another system and then traverse throught the use cases on that remote system.

Early end-to-end integration is a crucial part of the development process to show that the proposed architecture of the system will work for the desired use cases. For this reason, customers often demand to see end-to-end integration of the system at very early stages of the development process.

 

Use Case Coverage

Use case coverage refers to the ability to demostrate operationality of the system as traversals across all the use cases of the system. In order to show that a system has met its design requirements, the use case coverage must show that testing has demonstrated that all the use cases needed to meet the project requirements at that stage are operational. This is related to end-to-end integration in that use case coverage is essentially showing end-to-end integration through all the required use cases.

 

 

 

 

© 2024 by Stephen Wong