CSC/ECE 517 Fall 2007/wiki2 4 2q: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
 
(28 intermediate revisions by 6 users not shown)
Line 1: Line 1:
'''A Guide to Use Cases on the WEB'''
'''A Guide to Use Cases on the WEB'''


''Topic :Use cases. There are even more pages on the Web on use cases than on MVC. If someone wants to learn about them, what should (s)he do? Look at the first few hits in Google? I expect we can do better than that. Write a review of the use-case sites on the Web. Which are best for learning about the concept? Which have the most instructive examples? Which teach advanced concepts that are not apparent in perusing most use-case sites? Read at least several dozen pages before deciding how to organize your overview.''  
''Topic: Use cases. There are even more pages on the Web on use cases than on [https://www.codecademy.com/articles/mvc MVC]. If someone wants to learn about them, what should (s)he do? Look at the first few hits in Google? I expect we can do better than that. Write a review of the use-case sites on the Web. Which are best for learning about the concept? Which have the most instructive examples? Which teach advanced concepts that are not apparent in perusing most use-case sites? Read at least several dozen pages before deciding how to organize your overview.''  


=Introduction=
=Introduction=


This page tries to review the use-case sites on the Web which can be useful to best understand the concept. Also a few instructive examples are covered paying attention to the basic use case as well as advanced concepts that are not apparent in perusing most use-case sites.
This page tries to review the use-case sites on the Web which can be useful to best understand the concept. Also, a few instructive examples are covered paying attention to the basic use case as well as advanced concepts that are not apparent in perusing most use-case sites.
   
   
=What is a Use Case?=
=What is a Use Case?=


==Definition==
==Definition==
<blockquote> "'''''Use case''' is a methodology used in software and systems engineering to understand and identify the functional requirements of a system. Use cases describe the interaction between a primary actor, the initiator of the interaction and the system itself, represented as a sequence of simple steps.''"[1][2]</blockquote>
<blockquote> "'''''Use case''' is a methodology used in software and systems engineering to understand and identify the functional requirements of a system. Use cases describe the interaction between a primary actor, the initiator of the interaction, and the system itself, represented as a sequence of simple steps.''"[1][2]</blockquote>


An actor who can more generally be described as the user of the system, is the external entity and can be a person or another system itself. A use case can be best described as what happens when the actor is using the system to achieve some goal. This goal is nothing but the end result which follows the sequence of events as described in the use cases.  
Simply put, a use case is a description of how a person will interact with the system to achieve a certain goal. It helps to learn if any errors could occur in the process and design features to resolve those errors.  


Every use case gives a complete list of events which occur from the time the actor starts interacting with the system till the time the final goal is achieved. A use case also records all the possible scenarios that may occur while trying to reach the desired goal. We can think of it as existence of a main course of events that will occur in normal circumstances, to which the exceptional cases are added. Anything that is not relevant to the actor/user is not a part of the use case.
It consists of 3 primary elements:
* Actor: They are generally the user of the system or an external entity and can be a person or another system itself. A use case can be best described as what happens when the actor is using the system to achieve some goal.
* System: It describes the process/steps to reach the final outcome.
* Goal: A goal is an end result that follows the sequence of events as described in the use cases.
 
Every use case gives a complete list of events that occur from the time the actor starts interacting with the system till the time the final goal is achieved. A use case also records all the possible scenarios that may occur while trying to reach the desired goal. We can think of it as the existence of a main course of events that will occur in normal circumstances, to which the exceptional cases are added. Anything that is not relevant to the actor/user is not a part of the use case.


Listed below are a few links to external websites which further illustrate this concept.
Listed below are a few links to external websites which further illustrate this concept.


* [https://www.ibm.com/developerworks/library/ws-using-oo/ OO design process: Use cases, an introduction]
* [https://www.ibm.com/developerworks/library/ws-using-oo/ OO design process: Use cases, an introduction]
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]
* [http://www.cs.uno.edu/~jaime/Courses/4210/useCaseFundamentals.html Use Case Fundamentals]


==UML Diagrams and Use cases==
==UML Diagrams and Use Case Diagrams==
<blockquote> "''The Use case diagram is used to identify the primary elements and processes that form the system. The primary elements are termed as 'actors' and the processes are called "use cases." The Use case diagram shows which actors interact with each use case."''[3]</blockquote>
<blockquote> "''The Use case diagram is used to identify the primary elements and processes that form the system. The primary elements are termed as 'actors' and the processes are called "use cases." The Use case diagram shows which actors interact with each use case."''[3]</blockquote>
    
    
They are useful in providing a pictorial view of the interactions between the users (actors) and sets of events (use cases) associated with the system.They also evolve as the projects or system change with time. The standard elements of a use case diagram makes comprehension easy for anyone trying to understand the use case.
UML is a collection of diagrams that visually represents a software or a system. A use case diagram is one of its types. They are useful in providing a pictorial view of the interactions between the users (actors) and sets of events (use cases) associated with the system. They also evolve as the projects or systems change with time. The standard elements of a use case diagram make comprehension easy for anyone trying to understand the use case.


Listed below are useful links in understanding how to draw typical use case diagrams.
Listed below are useful links in understanding how to draw typical use case diagrams.
Line 30: Line 35:
* [https://www.smartdraw.com/uml-diagram/ An introduction to UML diagrams & Tutorial]  
* [https://www.smartdraw.com/uml-diagram/ An introduction to UML diagrams & Tutorial]  
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]
* [https://www.andrew.cmu.edu/course/90-754/umlucdfaq.html Tips and FAQ]
=How to Write a Use Case?=
==Writing Effective Use Cases==
One of the most difficult problems in software development is capturing precisely what you want to build. Inaccurate requirements will result in significant delay, rework, or even abandonment of the project. Effective applying the use case technique helps your team capture requirements from the user's point of view which can be easily understood by both the end-user and your team. Use case-driven development to support subsequent development activities such as analysis, design, and testing.
Listed below are useful links in understanding how to write effective use cases.
* [https://www.usability.gov/how-to-and-tools/methods/use-cases.html How to write a use case (1)]
* [https://www.wikihow.com/Write-a-Use-Case How to write a use case (2)]
* [http://www.utm.mx/~caff/doc/OpenUPWeb/openup/guidances/guidelines/detail_ucs_and_scenarios_6BC56BB7.html Efficient way to write use cases]
* [https://www.visual-paradigm.com/tutorials/writingeffectiveusecase.jsp Drawing use cases using a tool]


=Examples using Use Cases=
=Examples using Use Cases=
Line 35: Line 53:


===Basic use case template===
===Basic use case template===
Described below are some the characteristics of a typical use case.
Described below are some of the characteristics of a typical use case.
   '''CHARACTERISTIC INFORMATION'''
   '''CHARACTERISTIC INFORMATION'''
   * ''Goal in Context'':  Buyer issues request directly to our company, expects goods shipped and to be billed.
   * ''Goal in Context'':  Buyer issues request directly to our company, expects goods shipped and to be billed.
   * ''Scope'':  Company
   * ''Scope'':  Company
   * ''Preconditions'':  We know Buyer, their address, etc.
   * ''Preconditions'':  We know the Buyer, their address, etc.
   * ''Success End Condition'':  Buyer has goods, we have money for the goods.
   * ''Success End Condition'':  Buyer has goods, we have money for the goods.
   * ''Failed End Condition'':  We have not sent the goods, Buyer has not spent the money.
   * ''Failed End Condition'':  We have not sent the goods, Buyer has not spent the money.
Line 47: Line 65:
   '''MAIN SUCCESS SCENARIO'''
   '''MAIN SUCCESS SCENARIO'''
   1. Buyer calls in with a purchase request.
   1. Buyer calls in with a purchase request.
   2. Company captures buyer’s name, address, requested goods, etc.
   2. The company captures the buyer’s name, address, requested goods, etc.
   3. Company gives buyer information on goods, prices, delivery dates, etc.
   3. The company gives buyers information on goods, prices, delivery dates, etc.
   4. Buyer signs for order.
   4. Buyer signs for order.
   5. Company creates order, ships order to buyer.
   5. The company creates orders, and ships orders to buyers.
   6. Company ships invoice to buyer.
   6. The company ships invoices to the buyer.
   7. Buyers pays invoice.
   7. Buyers pay invoices.
    
    
   '''EXTENSIONS'''
   '''EXTENSIONS'''
   3a. Company is out of one of the ordered items:  
   3a. The company is out of one of the ordered items:  
       3a1. Renegotiate order.
       3a1. Renegotiate order.
   4a. Buyer pays directly with credit card:
   4a. Buyer pays directly with a credit card:
       4a1. Take payment by credit card (use case 44)
       4a1. Take payment by credit card (use case 44)
   7a. Buyer returns goods:
   7a. Buyer returns goods:
       7a. Handle returned goods (use case 105)
       7a. Handle returned goods (use case 105)
The basic steps that can be followed so as to ensure writing an effective use case has been described well in [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases].[5]
The basic steps that can be followed to ensure writing an effective use case have been described well in [https://www.wikihow.com/Write-a-Use-Case How to Write a use case].[4]


===Club Information System===
===Restaurant===
This example provides one use case but distinctly provides a step by step analysis of the events that constitute a Use Case. It mentions the actors, pre-conditions, Exceptions and Alternative scenarios.
This example provides one use case but distinctly provides a step-by-step analysis of the events that constitute a use case. It mentions the actors, pre-conditions, exceptions, and alternative scenarios.


* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]
* [http://www.uml-diagrams.org/restaurant-uml-use-case-diagram-example.html Restaurant]


===Purchase order===
===Purchase order===
This example provides a typical use case specification by listing the Activity, Result, Constraints and Extensions involved with a purchase order from a Finance web page.
This example provides a typical use case specification by listing the activity, result, constraints, and extensions involved with a purchase order from a Finance web page.


* [http://wiki.its.queensu.ca/display/UIS/Use+Case+Example Purchase order System]
* [https://creately.com/diagram/example/ifq4uulr/Purchase%20Order Purchase order System]


===ATM system===
===ATM system===
This example is a little more involved in that it provides a number of use cases associated with using an ATM system including cash withdrawal,
This example is a little more involved in that it provides several use cases associated with using an ATM system including cash withdrawal,
transfers, deposits, balance inquiry, etc.   
transfers, deposits, balance inquiries, etc.   


* [http://www.math-cs.gordon.edu/courses/cs320/ATM_Example/UseCases.html#Startup ATM System]
* [http://www.cs.fsu.edu/~baker/swe1/restricted/templates/rr631gv1_stuwrk_withdraw_cash_use-case_spec.pdf ATM System]


===A shopping website order Process===
===A shopping website order Process===
This is a very good example that describes the scenarios and extensions involved in writing a use case for a online shopping order. It also describes the UML diagram.   
This is a very good example that describes the scenarios and extensions involved in writing a use case for an online shopping order. It also describes the UML diagram.   


* [http://www.protoolkits.com/Analysisandrequirements/Analysistechniques/usecases.html Shopping website order]
* [http://www.uml-diagrams.org/examples/online-shopping-use-case-diagram-example.html?context=uc-examples Shopping website order]


===Self Service Machine===
===Self Service Machine===
This example provides the typical Use Cases in a self service machine. Some of the aspects of using a self service machine are: buying a product, re-stocking the machine, collecting the money etc. The following link expands on how to do this and also provides the UML diagrams which depict the interaction between the users and system through the use case
This example provides typical use cases of a self-service machine like supermarket barcode scanners, online banking services, check-in kiosks, and so on. Some of the aspects of using a self-service machine are: buying a product, re-stocking the machine, collecting the money, etc. The following link provides a UML diagram that depicts the interaction between the users and the system through the use case of self-service kiosks.
    
    
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]
* [https://creately.com/diagram/example/hy8pucc5/Self-Service%20Kiosk Self-Service Machine]
 
=Advanced Concepts on Use Cases=
 
==Pluggable Use Cases==
 
Most of the time it is found that common behavior is replicated in Use Cases. This can be handled by writing Use Cases with basic behavior which can be 'plugged-in' to write use cases which cover more behavior. This makes them reusable from one project to another.
 
<blockquote> "''A pluggable use case is written in a generic form such that it may be exercised wherever needed. As the name implies a pluggable use case can be ‘plugged’ into any other use case even another pluggable use case. It contains a cohesive set of functionality that encapsulates the common behavior of a subgoal, where this subgoal exists in multiple transactions. Because a pluggable use case only constitutes a subgoal of another use case its context must be inferred from the invoking use case."'' [6]</blockquote>
 
The following link gives a detailed description of this concept
 
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]


=References=
=References=


* [1] Ivar Jacobson (1992). Object-Oriented Software Engineering. Addison Wesley Professional. ISBN 0-201-54435.
* [1] Ivar Jacobson (1992). Object-Oriented Software Engineering. Addison Wesley Professional. ISBN 0-201-54435.
* [2] [http://en.wikipedia.org/wiki/Use_case Wikipidea Page] Basic definition of Use Case
* [2] [http://en.wikipedia.org/wiki/Use_case Wikipedia Page] Basic definition of Use Case
* [3] [http://www.developer.com/design/article.php/2109801 Use Case Diagrams]
* [3] [http://www.developer.com/design/article.php/2109801 Use Case Diagrams]
* [4] [http://alistair.cockburn.us/images/Uctempla.doc Basic Use Case Template]
* [4] [https://www.wikihow.com/Write-a-Use-Case How to Write a use case]
* [5] [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases]
* [6] [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]


=External Links=
=External Links=


* [http://www.ibm.com/developerworks/webservices/library/co-design5.html OO design process: Use cases, an introduction]
* [http://www.cs.uno.edu/~jaime/Courses/4210/useCaseFundamentals.html Use Case Fundamentals]
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]
* [http://members.aol.com/acockburn/papers/AltIntro.htm An introduction to UML diagrams]  
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]
* [http://atlas.kennesaw.edu/~dbraun/csis4650/A&D/UML_tutorial/use_case.htm  Tutorial for Use Case Diagrams]
* [http://www.cs.rug.nl/search/uploads/Teaching/RE2009Fall/paper/1999_Lilly_TOOLS_Use%20Case%20Pitfalls%20Top%2010%20Problems%20from%20Real%20Projects%20Using%20Use%20Cases.pdf Use Case Pitfalls]
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]
* [https://www.visual-paradigm.com/tutorials/writingeffectiveusecase.jsp Writing effective Use Cases]
* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]
* [https://www.wikihow.com/Write-a-Use-Case How to Write a use case]
* [http://wiki.its.queensu.ca/display/UIS/Use+Case+Example Purchase order System]
* [http://www.utm.mx/~caff/doc/OpenUPWeb/openup/guidances/guidelines/detail_ucs_and_scenarios_6BC56BB7.html Writing Use Case]
* [http://www.math-cs.gordon.edu/courses/cs320/ATM_Example/UseCases.html#Startup ATM System]
* [https://www.andrew.cmu.edu/course/90-754/umlucdfaq.html Tips and FAQ]
* [http://www.protoolkits.com/Analysisandrequirements/Analysistechniques/usecases.html Shopping website order]
* [https://www.codecademy.com/articles/mvc MVC]
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]

Latest revision as of 01:48, 12 January 2024

A Guide to Use Cases on the WEB

Topic: Use cases. There are even more pages on the Web on use cases than on MVC. If someone wants to learn about them, what should (s)he do? Look at the first few hits in Google? I expect we can do better than that. Write a review of the use-case sites on the Web. Which are best for learning about the concept? Which have the most instructive examples? Which teach advanced concepts that are not apparent in perusing most use-case sites? Read at least several dozen pages before deciding how to organize your overview.

Introduction

This page tries to review the use-case sites on the Web which can be useful to best understand the concept. Also, a few instructive examples are covered paying attention to the basic use case as well as advanced concepts that are not apparent in perusing most use-case sites.

What is a Use Case?

Definition

"Use case is a methodology used in software and systems engineering to understand and identify the functional requirements of a system. Use cases describe the interaction between a primary actor, the initiator of the interaction, and the system itself, represented as a sequence of simple steps."[1][2]

Simply put, a use case is a description of how a person will interact with the system to achieve a certain goal. It helps to learn if any errors could occur in the process and design features to resolve those errors.

It consists of 3 primary elements:

  • Actor: They are generally the user of the system or an external entity and can be a person or another system itself. A use case can be best described as what happens when the actor is using the system to achieve some goal.
  • System: It describes the process/steps to reach the final outcome.
  • Goal: A goal is an end result that follows the sequence of events as described in the use cases.

Every use case gives a complete list of events that occur from the time the actor starts interacting with the system till the time the final goal is achieved. A use case also records all the possible scenarios that may occur while trying to reach the desired goal. We can think of it as the existence of a main course of events that will occur in normal circumstances, to which the exceptional cases are added. Anything that is not relevant to the actor/user is not a part of the use case.

Listed below are a few links to external websites which further illustrate this concept.

UML Diagrams and Use Case Diagrams

"The Use case diagram is used to identify the primary elements and processes that form the system. The primary elements are termed as 'actors' and the processes are called "use cases." The Use case diagram shows which actors interact with each use case."[3]

UML is a collection of diagrams that visually represents a software or a system. A use case diagram is one of its types. They are useful in providing a pictorial view of the interactions between the users (actors) and sets of events (use cases) associated with the system. They also evolve as the projects or systems change with time. The standard elements of a use case diagram make comprehension easy for anyone trying to understand the use case.

Listed below are useful links in understanding how to draw typical use case diagrams.

How to Write a Use Case?

Writing Effective Use Cases

One of the most difficult problems in software development is capturing precisely what you want to build. Inaccurate requirements will result in significant delay, rework, or even abandonment of the project. Effective applying the use case technique helps your team capture requirements from the user's point of view which can be easily understood by both the end-user and your team. Use case-driven development to support subsequent development activities such as analysis, design, and testing.

Listed below are useful links in understanding how to write effective use cases.

Examples using Use Cases

In this section, a few instructive examples have been outlined along with their references which illustrate different ways in which use cases can be written. The first example is a basic use-case template.

Basic use case template

Described below are some of the characteristics of a typical use case.

 CHARACTERISTIC INFORMATION
 * Goal in Context:   Buyer issues request directly to our company, expects goods shipped and to be billed.
 * Scope:  Company
 * Preconditions:  We know the Buyer, their address, etc.
 * Success End Condition:  Buyer has goods, we have money for the goods.
 * Failed End Condition:  We have not sent the goods, Buyer has not spent the money.
 * Primary Actor:  Buyer, any agent (or computer) acting for the customer
 * Trigger:  purchase request comes in.
 
 MAIN SUCCESS SCENARIO
 1. Buyer calls in with a purchase request.
 2. The company captures the buyer’s name, address, requested goods, etc.
 3. The company gives buyers information on goods, prices, delivery dates, etc.
 4. Buyer signs for order.
 5. The company creates orders, and ships orders to buyers.
 6. The company ships invoices to the buyer.
 7. Buyers pay invoices.
 
 EXTENSIONS
 3a. The company is out of one of the ordered items: 
     3a1. Renegotiate order.
 4a. Buyer pays directly with a credit card:
     4a1. Take payment by credit card (use case 44)
 7a. Buyer returns goods:
     7a. Handle returned goods (use case 105)

The basic steps that can be followed to ensure writing an effective use case have been described well in How to Write a use case.[4]

Restaurant

This example provides one use case but distinctly provides a step-by-step analysis of the events that constitute a use case. It mentions the actors, pre-conditions, exceptions, and alternative scenarios.

Purchase order

This example provides a typical use case specification by listing the activity, result, constraints, and extensions involved with a purchase order from a Finance web page.

ATM system

This example is a little more involved in that it provides several use cases associated with using an ATM system including cash withdrawal, transfers, deposits, balance inquiries, etc.

A shopping website order Process

This is a very good example that describes the scenarios and extensions involved in writing a use case for an online shopping order. It also describes the UML diagram.

Self Service Machine

This example provides typical use cases of a self-service machine like supermarket barcode scanners, online banking services, check-in kiosks, and so on. Some of the aspects of using a self-service machine are: buying a product, re-stocking the machine, collecting the money, etc. The following link provides a UML diagram that depicts the interaction between the users and the system through the use case of self-service kiosks.

References

External Links