relate use cases to mvc and application architecture crc recap distinctions : language, process,...

14
Relate Use Cases to MVC and Application Architecture CRC Recap distinctions : Language, Process, Tool Detail a Use Case Elements of a Use Case narrative The Use Case 'flow-of-events' How a 'flow-of-events' and a 'scenario' differ A Use Case 'template' Week IV (cont) Detail a Use Case

Upload: miranda-bailey

Post on 04-Jan-2016

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Relate Use Cases to  MVC and Application Architecture  CRC  Recap distinctions : Language, Process, Tool  Detail a Use Case  Elements of a Use Case

Relate Use Cases to

MVC and Application Architecture

CRC Recap distinctions : Language, Process, Tool Detail a Use Case

Elements of a Use Case narrative

The Use Case 'flow-of-events'

How a 'flow-of-events' and a 'scenario' differ

A Use Case 'template'

Week IV (cont) Detail a Use Case

Page 2: Relate Use Cases to  MVC and Application Architecture  CRC  Recap distinctions : Language, Process, Tool  Detail a Use Case  Elements of a Use Case

2

Detail a Use Case

Write a narrative for each use case scoped for development.

Elements of a Use Case narrative.

Writing the flow-of-events.

How a flow-of-events differs from a scenario

A Use Case template

Page 3: Relate Use Cases to  MVC and Application Architecture  CRC  Recap distinctions : Language, Process, Tool  Detail a Use Case  Elements of a Use Case

3

Sample Workflow for EU-Rent

Page 4: Relate Use Cases to  MVC and Application Architecture  CRC  Recap distinctions : Language, Process, Tool  Detail a Use Case  Elements of a Use Case

4

Sample Use Case Diagram for EU-Rent

Correct Member Details

... make routine corrections or updates to a club member's changeable data (name, address, etc.).

Register Club Member

... record information about a new member, including setting up all the member's rental group preferences.

Terminate Club Member

... end a member's participation in the Customer Loyalty program.

Page 5: Relate Use Cases to  MVC and Application Architecture  CRC  Recap distinctions : Language, Process, Tool  Detail a Use Case  Elements of a Use Case

5

Each identified Use Case is defined in further detail. Use Case name

Use Case summary -- a brief description of:• the nature of what the actor needs (the system) to do• the observable result of value to the actor

Pre-conditions / Post-conditions

Use Case flow• simple – bullet list• more complex – "flow-of-events"

Use Case scenarios, as needed

begun last time ~ refine

(if needed) and then...

... add detail for each use

case

The Use Case Detail

Page 6: Relate Use Cases to  MVC and Application Architecture  CRC  Recap distinctions : Language, Process, Tool  Detail a Use Case  Elements of a Use Case

6

the set of user actions & system responses (a computation or algorithmic procedure), initiated when:

an actor signals (“sends a request to”) the system, or the system gets a scheduled request.

For example Use Case name: Accept Bid Use Case [initial] description:

• 'Accept Bid' records the amount a club member is offering in response to the invitation to bid in an auction.

is refined into two thoughts: Description: The Actor wishes to record the amount a club

member is offering in response to the invitation to bid in an auction.

Goal: Upon successful completion of this processing, the system has recorded the member's bid amount.

Use Case Detail ~ completing the narrative

Page 7: Relate Use Cases to  MVC and Application Architecture  CRC  Recap distinctions : Language, Process, Tool  Detail a Use Case  Elements of a Use Case

7

Use Case Detail ~ completing the narrative (cont.)

Use Case Flow-of-Events: • a narrative (outline or list) describing the sequence of action /

response steps.

Use Case Scenarios:• One use-case flow may have different courses of action –

different paths through the flow, e.g., o different conditionso alternative branches

• Each scenario describes one path through the use-case flow.

o one "normal" (most typical) scenario ~ generally the “Happy Day” scenario

o additional variations – e.g., "what could go wrong?"

If the use case is very simple, Is it okay to simply list the scenarios?

Page 8: Relate Use Cases to  MVC and Application Architecture  CRC  Recap distinctions : Language, Process, Tool  Detail a Use Case  Elements of a Use Case

8

Use Case Detail ~ the Flow-of-Events

Begin by describing the "simple" (most typical) flow:

the Accept Bid flow of events:1. The actor enters/selects the bid to be updated. The system

presents the current bid-amount for that bid, along with information on the bidder (club-member) and the auction (vehicle-model).

2. The actor visually confirms the member information.

3. The actor visually confirms the vehicle model information.

4. The actor enters the new bid-amount. The system confirms the successful update.

The pattern for each step in the flow is:• The actor <does somethng>. The system responds with

<response>.

Page 9: Relate Use Cases to  MVC and Application Architecture  CRC  Recap distinctions : Language, Process, Tool  Detail a Use Case  Elements of a Use Case

9

Use Case Detail ~ Scenarios

A scenario is one possible path through a use-case flow. It shows one particular combination of conditions within the use case. Begin with the typical ("happy day") case.

• Scenario 1: A bidder has sent in a positive-amount bid.

Then add variations (e.g., things that could go wrong).For example, you could then describe scenarios for:

• Scenario 2: Not active member: A bid has been sent in by a bidder who is not an active club-member.

• Scenario 3: Non-participating member: A bid has been sent in by a member who is not participating in the auction.

• Scenario 4: Bidding is closed: The auction's bidding has been closed.

However: don't go overboard during this phase. You will do more of this in later phases.

Page 10: Relate Use Cases to  MVC and Application Architecture  CRC  Recap distinctions : Language, Process, Tool  Detail a Use Case  Elements of a Use Case

10

A Use- Case Template

Use Case Name• Description • Goal (Observable Result or Value)

Contract• Pre-conditions & Post-conditions

Flow-of-Events• Normal, Alternate, Exceptional

Scenarios (list only)

Non-Behavioral Requirements, Notes & Open Issues

Page 11: Relate Use Cases to  MVC and Application Architecture  CRC  Recap distinctions : Language, Process, Tool  Detail a Use Case  Elements of a Use Case
Page 12: Relate Use Cases to  MVC and Application Architecture  CRC  Recap distinctions : Language, Process, Tool  Detail a Use Case  Elements of a Use Case

12

Detail a Use Case (In Class Exercise)

Consider the Use Cases from our example of Week II (Course Registration System): Register for courses

Select courses to teach

Request course roster

Maintain course Information

Maintain professor Information

Maintain student information

Create course catalog

We will detail the Select Courses to Teach Use Case

Page 13: Relate Use Cases to  MVC and Application Architecture  CRC  Recap distinctions : Language, Process, Tool  Detail a Use Case  Elements of a Use Case

13

Detail a Use Case (In Class Exercise cont)

Write your use case detail in terms of what the system should do, not how the system does it, I.e., the language of the domain. It should include: When and how the use case starts and ends

What interaction the use case has with the actors

What data is needed by the use case

The normal sequence of events for the use case

A description of any alternate or exceptional flows

Now - Detail the Select Courses to Teach Use Case

Page 14: Relate Use Cases to  MVC and Application Architecture  CRC  Recap distinctions : Language, Process, Tool  Detail a Use Case  Elements of a Use Case

14

Detail a Use Case (In Class Workshop)

Consider Use Cases from EU-Bid