《编写有效用例 英文版》PDF下载

  • 购买积分:11 如何计算积分?
  • 作  者:(美)Alistair Cockburn著
  • 出 版 社:北京:机械工业出版社
  • 出版年份:2002
  • ISBN:7111105370
  • 页数:270 页
图书介绍:

Chapter 1 Introduction 1

1.1 What Is a Use Case (More or Less)? 1

Use Case 1 ?Buy Stocks over the Web? 4

Use Case 2 ?Get Paid for Car Accident? 5

Use Case 3 ?Register Arrival of a Box? 6

1.2 Your Use Case Is Not My Use Case 7

Use Case4 ?Buy Something(Casual Version)? 9

Use Case 5 ?Buy Something(Fully Dressed Version)? 9

◆Steve Adolph: Dlscovering Requirements in New Territory 12

1.3 Requirements and Use Cases 13

Use Cases as Project-Linking Structure 14

Figure 1.1 The Hub-and-Spoke model of requirements 15

1.4 When Use Cases Add Value 15

1.5 Manage Your Energy 16

1.6 Warm Up with a Usage Narrative 17

◆Usage Narative:Getting Fast Cash 18

1.7 Exercises 19

Part 1 The Use Case Body Parts 21

Actors Have Goals 23

2.1 Interactions between Actors with Goals 23

Chapter 2 The Use Case as a Contract for Behavior 23

Figure 2.1 An actor with a goal calls on the responsibilities of another 24

Goals Can Fail 25

Interactions Are Compound 25

A Use Case Collects Scenarios 27

Figure 2.2 Striped trousers:Scenarios Succeed or fail 28

Figure 2.3 The striped trousers showing subgoals 29

2.2 Contract between Stakeholders with Interests 29

Figure 2.4 The SuD serves the Primary actor,protecting offstage stakeholders 30

2.3 The Graphical Model 31

Figure 2.5 Actors and stakeholders 32

Figure 2.6 Behavior 32

Figure 2.7 Use Case as responsibility invocation 33

Figure 2.8 Interactions as composite 33

Chapter 3 Scope 35

Table 3.1 A Sample In/Out List 36

3.1 Functional Scope 36

The Actor-Goal List 36

The Use Case Briefs 37

Table 3.2 A Sample Actor-Goal List 37

3.2 Design Scope 38

Table 3.3 Sample Use Case Briefs 38

Figure 3.1 Design scope can be any size 40

Using Graphical Icons to Highlight the Design Scope 40

Design Scope Examples 41

Enterprise-to,System Examples 41

Use Case 6 ?Add New Service (Enterprise)? 42

Use Case 7 ?Add New Service(Acura)? 42

Use Case 8 ?Enter and Update Requests (Joint System)? 43

Many Computers to One Application 43

Use Case 9 ?Add New Service (into Acura)? 44

Use Case 10 ?Note New Service Request (in BSSO)? 44

Use Case 11?Update Service Request (in Bsso)? 44

Use Case 12 ?Note Updated Request (in Acura)? 44

Figure 3.2 Use case diagrams for Acura-BSSO 45

Figure 3.3 A combined use case diagram for Acura-Bsso 45

Nuts and Bolts Use Cases 46

Use Case 13 ?Serialize Access to a Resource? 46

Use Case 14 ?Apply a Lock Conversion Policy? 47

Use Case 15 ?Apply an Access Compatibility Policy? 48

Use Case 16 ?Apply an Access Selection Policy? 48

Use Case 17 ?Make Service Client Wait for Resource Access? 49

3.3 The Outermost Use Cases 49

3.4 Using the Scope-Defining Work Products 51

3.5 Exercises 51

Chapter 4 Stakeholders and Actors 53

4.1 Stakeholders 53

4.2 The Primary Actor 54

Why Primary Actors Are Unimportant (and Important) 55

Table 4.1 A Sample Actor Profile Table 56

Actors versus Roles 57

Characterizing the Primary Actors 58

4.3 Supporting Actors 59

4.4 The System Under Discussion 59

4.5 Internal Actors and White-Box Use Cases 59

4.6 Exercises 60

Chapter 5 Three Named Goal Levels 61

5.1 User Goals (Blue,Sea-Level) 62

Figure 5.1 Use case levels 62

Two Levels of Blue 63

5.2 Summary Level(White,Cloud/Kite) 64

Use Case 18 ?Operate an Insurance Policy+? 65

The Outermost Use Cases Revisited 65

5.3 Subfunctions (Indigo/Black,Underwater/Clam) 66

Summarizing Goal Levels 66

5.4 Using Graphical Icons to Highlight Goal Levels 67

5.5 Finding the Right Goal Level 68

Finding the User s Goal 68

Figure 5.2 Ask why to shift Levels 69

Raising and Lowering Goal Levels 69

5.6 A Longer Writing Sample:”Handle a Claim”at Several Levels 70

Use Case 19 ?Handle a Claim (Business)? 71

Use Case 20 ?Evaluate Work Comp Claim? 72

Use Case 21 ?Handle a Claim(Systems)+? 73

Use Case 22 ?Register a Loss? 75

Use Case 23 ?Find a Whatever (Problem Statement)? 79

5.7 Exercises 79

6.1 Preconditions 81

Chapter 6 Preconditions,Triggers,and Guarantees 81

6.2 Minimal Guarantees 83

6.3 Success Guarantee 84

6.4 Triggers 84

6.5 Exercises 85

Chapter 7 Scenarios and Steps 87

7.1 The Main Success Scenario 87

The Common Surrounding Structure 87

The Scenario Body 89

Guideline 1:Use Simple Grammar 90

Guideline 2:Show Clearly Who Has the Ball 90

7.2 Action Steps 90

Guidelines 90

Guideline 3:Write from a Bird s Eye View 91

Guideline 4:Show the Process Moving Forward 91

Guideline 5:Show the Actor s Intent,Not the Movements 92

Guideline 6:Include a Reasonable Set of Actions 93

Figure 7.1 Atransaction has four parts 93

Guideline 8:Optionally Mention the Timing 95

Guideline 7:”Validate,”Don t Check Whether 95

Guideline 9:Idiom: User Has System A Kick System B 96

Guideline 10:Idiom: Do Steps x-y until Condition” 96

To Number or Not to Number 97

7.3 Exercises 98

Chapter 8 Extensions 99

8.1 Extension Basics 99

8.2 The Extension Conditions 100

Brainstorm All Conceivable Failures and Alternative Courses 101

Guideline 11:Make the Condition Say What Was Detected 102

Rationalize the Extensions List 104

Rollup Failures 105

8.3 Extension Handling 106

Guideline 12:Indent Condition Handling 108

Failures within Failures 109

Creating a New Use Case from an Extension 109

8.4 Exercises 110

Chapter 9 Technology and Data Variations 111

Figure 9.1 Technology variations using specialization in UML 112

10.1 Sub Use Cases 113

Chapter 10 Linking Use Cases 113

10.2 Extension Use Cases 114

Figure 10.1 UML diagram of extension use cases 115

When to Use Extension Use Cases 116

10.3 Exercises 117

Chapter 11 Use Case Formats 119

11.1Formats to Choose From 119

Fully Dressed 119

Use Case 24 Fully Dressed Use Case Template 119

Use Case 25 ?Actually Login (Casual Version)? 120

Casual 120

OneColumn Table 121

Table 11.1 One-Column Table Format of a Use Case 121

Two-Column Table 122

Table 11.2 Two-Column Table 122

RUP Style 123

Use Case 26 ?Register for Courses? 124

If-Statement Style 126

Occam Style 126

Diagram Style 127

11.2 Forces Affecting Use Case Writing Styles 128

The UML Use Case Diagram 128

Consistency 130

Complexity 130

11.3 Standards for Five Project Types 132

For Requirements Elicitation 133

Use Case 27 ?Elicitation Template一Oble a New Biscum? 133

For Business Process Modeling 134

Use Case 28 ?Business Process Template一Symp a Carstromming? 134

For Sizing the Requirements 135

Use Case 29 ?Sizing Template一Burble the Tramling? 135

Use Case 30 ?High-Pressure Template:Kree a Ranfath? 136

For a Short,High-Pressure Project 136

For Detailed Functional Requirements 137

Use Case 31 ?Use Case Name一Nathorize a Permion? 137

11.4 Conclusion 137

11.5 Exercise 138

Part 2 Frequently Discussed Topics 139

Chapter 12 When Are We Done? 141

On Being Done 142

Chapter 13 Scaling Up to Many Use Cases 143

Say Less about Each One (Low-Precision Representation) 143

Create Clusters of Use Cases 143

14.1 CRUD Use Cases 145

Figure 13.1 Design scopes for the ATM 145

Chapter 14 CRUD and Parameterized Use Cases 145

Use Case 32 ?Manage Reports? 146

Use Case 33 ?Save Report? 148

14.2 Parameterized Use Cases 150

Chapter 15 Business Process Modeling 153

15.1 Modeling versus Designing 153

Work from the Core Business 154

Figure 15.1 Core business black box 155

Figure 15.2 New business design in white box 155

Work from Business Process to Technology 155

Figure 15.3 New Business design in white box(again) 156

Figure 15.4 New Business process in black-box system use cases 156

15.2 Linking Business and System Use Cases 157

Work from Technology to Business Process 157

◆Rusty Walters:Business Modeling and System Requirements 159

Chapter 16 The Missing Requirements 161

16.1 Precision in Data Requirements 162

16.2 Cross-linking from Use Cases to Other Requirements 164

Figure 16.1 Recap of Figure 1.1, Hub-and-Spoke model of requirements 164

Chapter 17 Use Cases in the Overall Process 167

17.1 Use Cases in Project Organization 167

Organize by Use Case Titles 167

Table 17.1 Sample Planning Table 168

Handle Use Cases Crossing Releases 169

Deliver Complete Scenarios 170

17.2 Use Cases to Task or Feature Lists 171

Use Case 34 ?Capture Trade-In? 172

Table 17.2 Work List for Capture Trade-In 173

17.3 Use Cases to Design 174

A Special Note to Object-Oriented Designers 176

17.4 Use Cases to UI Design 177

Use Case 35 ?Order Goods,Generate Invoice (Testing Example)? 178

17.5 Use Cases to Test Cases 178

Table 17.3 Main Success Scenario Tests(Good Credit Risk) 179

Table 17.4 Main Success Scenario Tests(Bad Credit Risk) 180

17.6 The Actual Writing 180

A Branch-and-Join Process 180

◆Andy Kraus:Collecting Use Ca??s from a Large,Dlverse Lay Group 184

Collecting Use Cases from Large Groups 184

Time Required per Use Case 184

Chapter 18 Use Case Briefs and Extreme Programming 187

Chapter 19 Mistakes Fixed 189

19.1 No System 189

19.2 No Primary Actor 190

19.3 Too Many User Interface Details 191

19.4 Very Low Goal Levels 192

19.5 Purpose and Content Not Aligned 193

19.6 Advanced Example of Too Much Ul 194

Use Case 36 ?Research a Solution一Before? 194

Use Case 37 ?Research Possible Solutions一After? 199

Part 3 Reminders for the Busy 203

Reminder 2:Make the Use Case Easy to Read 205

Reminder 1:A Use Case Is a Prose Essay 205

Chapter 20 Reminders for Each Use Case 205

Reminder 3:Just One Sentence Form 206

Reminder 5:Who Has the Ball? 207

Reminder 4: Include Sub Use Cases 207

Reminder 6:Get the Goal Level Right 208

Figure 20.1 Ask why to shift levels 208

Reminder 7:Keep the GUI Out 209

Reminder 8:Two Endings 209

Reminder 9:Stakeholders Need Guarantees 210

Reminder 10:Preconditions 211

Reminder 11:Pass/Fail Tests for One Use Case 211

Table 20.1 Pass/Fail Tests for One Use Case 212

Chapter 21 Reminders for the Use Case Set 215

Reminder 12:An Ever-Unfolding Story 215

Reminder 13:Both Corporate Scope and System Scope 216

Reminder 14:Core Values and Variations 216

Reminder 15:Quality Questions across the Use Case Set 219

Reminder 17:Work Breadth First 221

Reminder 16:It s Just Chapter 3 (Where s Chapter 4?) 221

Chapter 22 Reminders for Working on the Use Cases 221

Figure 22.1 Work expands with precision 222

Reminder 18:The 12-Step Recipe 223

Reminder 19:Know the Cost of Mistakes 223

Reminder 20:Blue Jeans Preferred 224

Reminder 21:Handle Failures 225

Reminder 22:Job Titles Sooner and Later 225

Reminder 23:Actors Play Roles 226

Figure 22.2 Mommy,I want to go home. 227

Reminder 24:The Great Drawing Hoax 227

Figure 22.3 Context diagram in ellipse figure form 228

Table 22.1 Actor-Goal List for Context Diagram 228

Reminder 25:The Great Tool Debate 229

Reminder 26:Project Planning Using Titles and Briefs 230

Appendices 233

Appendix A Use Cases in UML 233

A.1 Ellipses and Stick Figures 233

A.2 UML s Includes Relation 234

Figure A.1 Drawing Includes 234

A.3 UML s Extends Relation 235

Guideline 13:Draw Higher Goals Higher 235

Guideline 15:Use Different Arrow Shapes 236

Figure A.2 Drawing Extends 236

Guideline 14:Draw Extending Use Cases Lower 236

Correct Use of Extends 237

Figure A.3 Three interrupting use cases extending a base use case 237

Extension Points 237

A.4 UML s Generalizes Relations 239

Correct Use of Generalizes 239

Figure A.4 Drawing Generalizes 240

Hazards of Generalizes 240

Guideline 16:Draw General Goals Higher 240

Figure A.5 Hazardous generalization一closing a big deal 241

Figure A.6 Correctly closing a big deal 241

A.5 Subordinate versus Sub Use Cases 242

A.6 Drawing Use Case Diagrams 242

Guideline 17:User Goals in a Context Diagram 243

Guideline18: Supporting Actors on the Right 243

A.7 Write Text-based Use Cases Instead 243

Chapter 3, page 51 245

Appendix B Answers to (Some)Exercises 245

Chapter 4, page 60 246

Chapter 5, page 79 247

Chapter 6, page 85 248

Chapter 7, page 98 249

Use Case 38 ?Use the Order Processing System? 250

Use Case 39 ?Buy Stocks Over the Web? 251

Chapter 11, page 138 252

Use Case 40 ?Perform Clean Spark Plugs Service? 252

Chapter 8, page 110 252

Appendix C Glossary 253

Main Terms 253

Use Case Types 255

Diagrams 256

Appendix D Readings 257

Books Referenced in the Text 257

Articles Referenced in the Text 257

Useful Online Resources 258

Index 259