Preface vii
Acknowledgments xxi
PART I The Case for Use Cases and Aspects 1
Chapter 1 Problem to Attack 3
1.1 The Use of Components Today 3
1.1.1 Building a System with Components 4
1.1.2 Benefits of Components 6
1.2 Limitation of Components 6
1.2.1 Inability to Keep Peers Separate 8
1.2.2 Inability to Keep Extensions Separate 9
1.3 Approaching a Solution 11
1.3.1 Early Support for Extensions 12
1.3.2 Support for Extensions in UML 15
1.4 Keeping Concerns Separate 16
Chapter 2 Attacking the Problem with Aspects 17
2.1 Approaching a Solution with Aspects 17
2.2 Keeping Peers Separate with Aspects 19
2.3 Keeping Extensions Separate with Aspects 21
2.4 Need for Methodological Guidance 26
Chapter 3 Today with Use Cases 29
3.1. Use Cases in Brief 29
3.2 Use-Case-Driven Development 32
3.3 Roles and Benefits of Use Cases 34
3.4 Gaps in the Use-Case Technique 34
3.5 Bridging the Gaps with Aspects 35
Chapter 4 Tomorrow with Use-Case Modules 37
4.1 Building Systems in Overlays with Use-Case Slices 38
4.2 Keeping Peer Use Cases Separate 40
4.3 Keeping Extension Use Cases Separate 42
4.4 Developing with Use-Case Modules 45
PART II Modeling and Capturing Concerns with Use
Cases 49
Chapter 5 Modeling Concerns with Use Cases 51
5.1 Use-Case Modeling 51
5.2 Use-Case Instances and Flows of Events 53
5.3 Describing Use Cases 54
5.4 Visualizing Use-Case Flows 57
5.5 Summary and Highlights 60
Chapter 6 Structuring Use Cases 61
6.1 Use-Case Relationships 61
6.2 Use-Case Extend Relationship 63
6.3 Use-Case Include Relationship 70
6.4 Use-Case Generalization 73
6.5 Utility Use Cases 77
6.6 Summary and Highlights 79
Chapter 7 Capturing Concerns with Use Cases 81
7.1 Understanding Stakeholder Concerns 81
7.1.1 Understanding the Problem Domain 82
7.1.2 Eliciting System Features 83
7.1.3 Dealing with Functional and Nonfunctional Requirements 84
7.2 Capturing Application Use Cases 86
7.2.1 Identifying Use-Case Variability 87
7.2.2 Handling Use.Case Variability 88
7.2.3 Dealing with Extension Use Cases 91
7.3 Capturing Infrastructure Use Cases 93
7.3.1 The Perform Transaction Use Case 94
7.3.2 Structuring Infrastructure Use Cases 96
7.3.3 Describing Infrastructure Use Cases 98
7.3.4 Dealing with Systemwide Concerns 100
7.4 Summary and Highlights 101
PART III Keeping Concerns Separate with Use-Case Modules 103
Chapter 8 Keeping Peer Use-Case Realizations Separate with Aspects 105
8.1 Realizing Peer Use Cases 106
8.1.1 Collaborations 106
8.1.2 Realizing a Use Case 108
8.1.3 Overlap between Peer Use-Case Realizations 110
8.2 Keeping Use-Case Specifics Separate 111
8.2.1 Composing Use-Case-Specific Classes 113
8.2.2 Composing Use-Case-Specific Class Extensions 115
8.2.3 Collaborations in Use-Case Slices 117
8.3 Dealing with Overlap 118
8.3.1 Included Use.Case Slice 119
8.3.2 Generalized Use-Case Slice 121
8.3.3 Non-Use-Case-Specific Slice 123
8.4 Summary and Highlights 125
Chapter 9 Keeping Extensions Separate with Pointcuts 127
9.1 Realizing Extension Use Cases 128
9.2 Keeping Modularity of Extension Use-Case Realizations 129
9.2.1 Operation Extensions 130
9.2.2 Pointcuts 133
9.3 Parameterizing Pointcuts 135
9.3.1 Identifying Parameters 136
9.3.2 Defining Parameters 137
9.3.3 Parameterizing Pointcuts in AOP 138
9.4 Generalizing Extension Use-Case Realizations 139
9.5 Templating Use-Case Slices 142
9.6 Summary and Highlights 144
Chapter 10 Building Systems with Use-Case Modules 145
10.1 A System Comprises Models 146
10.2 Use-Case Model 147
10.3 Analysis Model 148
10.3.1 Language of Analysis 149
10.3.2 Conducting Analysis 150
10.4 Design and Implementation Models 152
10.4.1 Language of Design and Implementation 152
10.4.2 Conducting Design and Implementation 154
10.5 Use-Case Modules Cut Across Models 154
10.5.1 Preserving the Structure of the Use-Case Model 155
10.5.2 A Use-Case Module Contains Use-Case Slices 157
10.5.3 Use-Case Module Relationships 158
10.6 Composing and Configuring Use-Case Modules 159
10.7 Summary and Highlights 161
PART IV Establishing an Architecture Based on Use Cases and Aspects 163
Chapter 11 Road to a Resilient Architecture 167
11.1 What Is Architecture? 168
11.2 What Is a Good Architecture? 168
11.3 Steps to Establish an Architecture Baseline 170
11.4 Begin with a Platform-Independent Structure 174
11.4.1 Element Structure 174
11.4.2 Use-Case Structure 177
11.5 Overlay Platform Specifics on Top 179
11.5.1 Choosing the Platform 179
11.5.2 Keeping Platform Specifics Separate 181
11.6 Summary and Highlights 184
Chapter 12 Separating Functional Requirements with Application Peer Use Cases 187
12.1 Analyzing Application UseCases 188
12.1.1 Identifying Classes 189
12.1.2 Allocating Use-Case Behavior to Classes 190
12.2 Keeping Application Use Cases Separate 195
12.2.1 Element Structure 195
12.2.2 Use-Case Structure 196
12.3 Designing Application Use Cases 199
12.3.1 Identifying Design Elements 200
12.3.2 Identifying Components and Interfaces 203
12.4 Refining Design Elements 205
12.4.1 Keeping Class Extensions Separate 205
12.4.2 Keeping Operation Extensions Separate 207
12.4.3 Keeping State Transitions Separate 209
12.5 Summary and Highlights 211.
Chapter 13 Separating Functional Requirements with Application-Extension UseCases 213
13.1 Analyzing Application-Extension Use Cases 214
13.1.1 Identifying Classes 215
13.1.2 Identifying Pointcuts 216
13.1.3 Allocating Use-Case Behavior to Classes 218
13.2 Keeping Application-Extension Use Cases Separate 220
13.2.1 Structuring Alternate Flows 221
13.2.2 Keeping Alternate Flows Separate 222
13.3 Designing Application-Extension Use Cases 224
13.3.1 Designing Operation Extensions 224
13.3.2 Identifying Component Interfaces from Use-Case Extensions 225
13.3.3 Dealing with Multiple Extensions to a Use Case 226
13.3.4 Extending Multiple Use Cases 229
13.4 Dealing with Changes in the Base 230
13.4.1 Applying Reflection 232
13.4.2 Applying Design Patterns 232
13.4.3 Applying Adaptive Programming 235
13.5 Summary and Highlights 236
Chapter 14 Separating Nonfunctional Requirements with Infrastructure Use Cases 239
14.1 Analyzing an Infrastructure Use Case 240
14.1.1 Identifying Classes 241
14,1.2 Identifying Pointcuts 242
14.1.3 Allocating Use-Case Behavior to Classes 245
14.2 Keeping Infrastructure Use Cases Separate 247
14.3 Designing Infrastructure Use Cases 250
14.3.1 Applying the Infrastructure Use-Case Slice with Aspects 251
14.3.2 Applying the Infrastructure Use-Case Slice with Filters 252
14.3.3 Identifying Components in the Infrastructure Layer 255
14.4 Dealing with Multiple Infrastructure Use Cases 256
14.5 Summary and Highlights 261
Chapter 15 Separating Platform Specifics with Platform-Specific Use-Case Slices 263
15.1 Keeping Platform Specifics Separate 264
15.1.1 Three-Tier Systems 264
15.1.2 Tier Packages 266
15.1.3 Modeling Tiers with Infrastructure Use Cases 268
15.2 Overlaying User Interfaces 269
15.2.1 Minimal Use-Case Design without Presentation Specifics 270
15.2.2 A Web Presentation Mechanism in J2EE 271
15.2.3 Designing the Presentation Mechanism 273
15.2.4 Applying the Presentation Mechanism 275
15.3 Overlaying Distdbution 276
15.3.1 Minimal Use-Case Design without Distribution 277
15.3.2 An EJB Distribution Mechanism 278
15.3.3 Designing the Distribution Mechanism 281
15.3.4 Applying the Distribution Mechanism 286
15.4 Overlaying Persistency 290
15.4.1 Minimal Use-Case Design without Persistence 291
15.4.2 A Relational Persistency Mechanism in J2EE 292
15.4.3 Designing Persistency Mechanism 293
15.4.4 Applying the Persistency Mechanism 297
15.5 Preserving the Use-Case Structure 298
15.6 Summary and Highlights 299
Chapter 16 Separating Tests with Use-Case Test Slices 301
16.1 Test-First Approach 301
16.2 Identifying Test Cases from Use Cases 303
16.2.1 Identifying Test Cases from Use-Case Flows 304
16.2.2 Identifying Test Cases from Use-Case Variables 305
16.2.3 Identifying Test Cases across Multiple Application Use Cases 306
16.2.4 Identifying Test Cases for the Infrastructure and the Platform Specifics 306
16.2.5 Identifying Performance Test Cases 307
16.3 Identifying Elements to Be Tested 308
16.4 Designing and Implementing Tests 310
16.4.1 Designing a Test Infrastructure 312
16.4.2 Designing a Test Case 316
16.5 Summary and Highlights 317
Chapter 17 Evaluating the Architecture 319
17.1 Putting It Together 319
17.2 Evaluating Separation of Concerns 324
17.2.1 Evaluating Design Elements 325
17.2.2 Evaluating Design Packages 325
17.2.3 Evaluating Use-Case Structures 327
17.2.4 Automating the Evaluation 329
17.2.5 Enforcing the Separation of Concerns 330
17.3 Evaluating and Achieving Systemwide Concerns 332
17.3.1 Evaluating and Achieving Maintainability 332
17.3.2 Evaluating and Achieving Extensibility 332
17.3.3 Evaluating and Achieving Portability 333
17.3.4 Evaluating and Achieving Reusability 334
17.3.5 Evaluating and Achieving Performance and Reliability 334
17.4 Summary and Highlights 336
Chapter 18 Describing the Architecture 339
18.1 Architecture Description Comprises Architectural Views 340
18.2 Architectural View of the Use-Case Model 342
18.3 Architectural View of the Analysis Model 344
18.3.1 Architecturally Significant Analysis Elements 344
18.3.2 Architecturally Significant Use-Case Analysis Slices 346
18.4 Architectural View of the Design Model 347
18.4.1 Architecturally Significant Deployment Elements 348
18.4.2 Architecturally Significant Process Elements 348
18.4.3 Architecturally Significant Design Elements 349
18.4.4 Architecturally Significant Use-Case Design Slices 351
18.5 Summary and Highlights 352
PART V Applying Use Cases and Aspects in a Project 355
Chapter 19 Running a Project 357
19.1 Iterative Development 357
19.1.1 Phases in a Project 358
19.1.2 Activities in an Iteration 359
19.2 Estimating Development Effort 359
19.2.1 Estimation at the Beginning of a Project 360
19.2.2 Refining the Estimates 362
19.3 Planning and Controlling the Project 363
19.3.1 Estimating Project Delays 363
19.3.2 Keeping the Project on Track 364
19.4 Productivity Gains by Keeping Concerns Separate 365
19.5 Summary and Highlights 367
Chapter 20 Tailoring the Approach 369
20.1 Achieving the Right Balance 369
20.2 Selecting Disciplines to Apply 370
20.3 Adopting at Different Phases of a Project 373
20.4 Summary and Highlights 374
Chapter 21 Aspects and Beyond 375
21.1 Building a System in Extensions 375
21.2 Balancing Best Practices 376
21.3 The Road Ahead 377
Appendix A Modeling Aspects and Use-Case Slices in UML 379
Appendix B Notation Guide 387
References 395
Glossary 399
Index 407