Monday, December 8, 2014

3. Use Case Model Concepts and Key Terms

Before we can begin any work on building a use case diagram, we first have to understand the terminology an symbolism use for this type of diagram. A use case is "a textual narrative that describes the sequences of events of an actor using a system to complete a process", according to the boo The Object Primer: Agile Model-Driven Development by Scott Ambler. In other words, a use case is simply a step-by-step narrative of all the events that occur for a specific process. For example, if I were to create make a use case for making a sandwich, the process would look a little like this:
  1. Select bread type
  2. Select Peanut Butter type
  3. Select Jelly type
  4. Place slice of bread on plate
  5. Using knife, apply peanut butter to bread as desired.
  6. Spread peanut butter evenly across surface of bread.
  7. Using spoon, scoop jelly from jar.
  8. Apply jelly to bread, spread evenly.
  9. Place second piece of bread over jelly-covered side of bread.
  10. Slice sandwich in half.
As you can see, there are a lot of steps that go into something as easy a making a sandwich. When making a use case, it is better to be too specific than not specific enough; this is crucial when the project enters development phases. But on a use case diagram, we do not put the entire steps to each use case. Instead, we simply put the name of the use case on the diagram (for example, using the sandwich steps, we could call the use case "Make Sandwich". Make sure the title clearly states what the process is about).

Now that we have discussed what a use case is, let's go over the key components of a use case diagram.
  1. System: the information system being described.
    1. Shows the scope of system boundary between the users and use cases
    2. Shown as a rectangle
  2. Actors: any entity that may interact with the system
    1. Can include a person, device, time, or another information system
    2. Represented as a stick figure
  3.  Use Case: A specific function or event the system performs
    1. Shown as an ellipse with the use case name inside
  4. Association: shows the relationship between actors and use cases
    1. ie: which actors can perform what use cases, and how they are related.
    2. Use cases can also be connected to show dependencies or common functions.
    3. Shown as a line with an arrow pointing to the use case
Next post, I will go over the steps to build a use case diagram, and give some examples to help understand how a use case model works.

No comments:

Post a Comment