sales-order architecture, e-tail system, 232, 233 sales-tax algorithm/rule, 234-237, 239-240, 256-257 scalability, 221 SELECT command, 279, 280 seniormost pattern, 203, 205, 222 Sequence Diagram, 30, 38-40, 131 SequencelnputStream class, 250 Shape class creating, 97 deriving new classes from, 100, 128 implementing behaviors for, 98 shape-drawing programs, 125-136, 141-149, 157-161 Shape object, 111-112 Shapes program, 4, 22-23 sheet-metal expert system, 45-47. See also CAD/CAM side effects, unwanted, 9, 10, 24 Silverstein, Murray, 72 single-threaded applications, 255, 261 Singleton pattern, 255-258 code examples, 257, 262 contrasted with Double -Checked Locking pattern, 255, 261 and e-tailing case study, 256-257 how it works, 256 intent/purpose of, 255, 256, 258 key features of, 258 and multithreaded applications, 255, 259, 261 simplified view of, 258 smart data, 110 software design applying building-design principles to, 186, 188, 193-194 and open-closed principle, 218 and preformed parts, 188 and principle of containing variation, 223-225 Index 333 and principle of designing from context, 218-222 rules for good, 192-193 software development anticipating changes to code, 5, 6-7, 229-232 breaking problem into steps, 4-5 focusing on short-term vs. long-term issues, 229-232 Fowler's perspectives, 13-14, 15-16 object-oriented approach to, 1, 14-21 (See also object-oriented paradigm) specialized classes, 114 specification perspective, 13, 16, 119-121 SQL database, accessing, 279-282 State Diagram, 30 Strategy pattern, 237-240 and Abstract Factory pattern, 300 and class explosion, 239-240 and e-tailing case study, 239-240, 298 intent/purpose of, 237, 238 key features of, 238 object-oriented principles used in, 237 simplified view of, 238 stream I/O, 248-250 StringBuf ferlnputstream class, 250 structural patterns, 264 structured programming, 3, 10, 26 Structured Query Language, 279 subclass, 18, 114 superclass, 19, 27 switches, 165, 166, 167, 169 synchronization, 258, 260 T target class, 102 tax-calculation algorithm/rule, 234-237, 239-240, 256-257 taxAmount method, 235 Template Method pattern, 280-284 and Analysis Matrix, 299 and e-tailing case study, 280-282
334 Index Template Method pattern, continued and Factory Method pattern, 286 intent/purpose of, 280, 283, 284 key features of, 283 simplified view of, 283 terminology CAD/CAM, 46-48 object-oriented paradigm, 21, 27 Timeless Way of Building, The, 72, 185-186, 194-195, 309 U UML, 29-41 accessibility notation, 33 defined, 29-30 defining parameters in, 235 diagrams and their purposes, 30 (See also specific diagrams) Object:Class notation, 40 reasons for using, 31, 40 recommended books on, 314— 316 using notes in, 36, 40-41 Unified Modeling Language. See UML uninitialized variables, 25 unwanted side effects, 9, 10, 24 update method, 268 user requirements anticipating/dealing with changes in, 10-14, 23, 125, 227-232 problems associated with, 6 reasons for changes in, 6-7 understanding, 296 uses relationship, 3 5 V variability analysis, 119, 138-139, 199, 219,307-309 variables encapsulating, 115-119, 140 uninitialized, 25 variations identilying relationships between, 224 principle of containing, 223-225 real-world examples, 291-292 steps for analyzing, 292 strategies for handling, 116-119, 121, 140, 146, 234 verification, address, 265-266 visibility, 20 Visitor pattern, 299 visual language, 29 Vlissides, John. See Gang of Four vocabulary. See terminology w Web site, companion (for this book), 313-314 welcome letter, e-tailing case study, 265-266 WelcomeLetter class, 265-266 wrappers, 104 wrapping, 101, 104, 106 X XP, 318
- Page 1 and 2:
------==Proudly Presented by MODELE
- Page 3 and 4:
xvi Preface From Object Orientation
- Page 5 and 6:
xviii Preface Patterns are supposed
- Page 7 and 8:
xx Preface A slight digression. The
- Page 9 and 10:
xxii Preface abstractly and because
- Page 11 and 12:
xxiv Preface Approach Rationale A N
- Page 13 and 14:
xxvi Preface Acknowledgments Almost
- Page 16 and 17:
Overview CHAPTER 1 The Object-Orien
- Page 18 and 19:
Chapter 1 The Object-Oriented Parad
- Page 20 and 21:
Chapter 1 The Object-Oriented Parad
- Page 22 and 23:
Chapter 1 The Object-Oriented Parad
- Page 24 and 25:
Chapter 1 The Object-Oriented Parad
- Page 26 and 27:
Chapter 1 The Object-Oriented Parad
- Page 28 and 29:
Table 1-2 Objects and Their Respons
- Page 30 and 31:
Chapter 1 The Object-Oriented Parad
- Page 32 and 33:
Chapter 1 The Object-Oriented Parad
- Page 34 and 35:
Chapter 1 The Object-Oriented Parad
- Page 36 and 37:
The main program would now look lik
- Page 38 and 39:
Chapter 1 The Object-Oriented Parad
- Page 40 and 41:
Table 1-4 Object-Oriented Terminolo
- Page 42 and 43:
3O Part I • An Introduction to Ob
- Page 44 and 45:
32 Part I • An Introduction to Ob
- Page 46 and 47:
34 Part I • An Introduction to Ob
- Page 48 and 49:
36 Part I • An Introduction to Ob
- Page 50 and 51:
38 Part I • An Introduction to Ob
- Page 52 and 53:
4O Part I • An Introduction to Ob
- Page 54 and 55:
PART II The Limitations of Traditio
- Page 56 and 57:
CHAPTER 3 A Problem That Cries Out
- Page 58 and 59:
Chapter 3 • A Problem That Cries
- Page 60 and 61:
Chapter 3 • A Problem That Cries
- Page 62 and 63:
Chapter 3 • A Problem That Cries
- Page 64 and 65:
Figure 3-6 Class diagram of my solu
- Page 66 and 67:
Summary Chapter 3 • A Problem Tha
- Page 68 and 69:
58 Part II • The Limitations of T
- Page 70 and 71:
6O Part II • The Limitations of T
- Page 72 and 73:
Chapter 4 • A Standard Object-Ori
- Page 74 and 75:
Chapter 4 • A Standard Object-Ori
- Page 76 and 77:
Example 4-6 C++ Code Fragments: Imp
- Page 78 and 79:
Part Overview PART III Design Patte
- Page 80 and 81:
Overview CHAPTER 5 An Introduction
- Page 82 and 83:
Chapter 5 An Introduction to Design
- Page 84 and 85:
Chapter 5 An Introduction to Design
- Page 86 and 87:
Chapter 5 An Introduction to Design
- Page 88 and 89:
Table 5-2 Key Features of Patterns
- Page 90 and 91:
Chapter 5 An Introduction to Design
- Page 92 and 93:
Figure 5-2 A miter joint Chapter 5
- Page 94 and 95:
Chapter 5 An Introduction to Design
- Page 96 and 97:
Overview CHAPTER 6 The Facade Patte
- Page 98 and 99:
This person would determine how I a
- Page 100 and 101:
Field Notes: The Facade Pattern Fac
- Page 102 and 103:
Summary Chapter 6 • The Facade Pa
- Page 104 and 105:
96 Part III • Design Patterns Int
- Page 106 and 107:
98 Part III • Design Patterns How
- Page 108 and 109:
1OO Part III • Design Patterns /
- Page 110 and 111:
1O2 Part III • Design Patterns Th
- Page 112 and 113:
1O4 Part III • Design Patterns Co
- Page 114 and 115:
1O6 Part III • Design Patterns Ad
- Page 116 and 117:
CHAPTER 8 Expanding Our Horizons Ov
- Page 118 and 119:
1. Make a preliminary design withou
- Page 120 and 121:
Chapter 8 • Expanding Our Horizon
- Page 122 and 123:
Chapter 8 • Expanding Our Horizon
- Page 124 and 125:
Chapter 8 • Expanding Our Horizon
- Page 126 and 127:
Chapter 8 • Expanding Our Horizon
- Page 128 and 129:
Chapter 8 • Expanding Our Horizon
- Page 130 and 131:
124 Part III • Design Patterns It
- Page 132 and 133:
126 Part III Design Patterns Proper
- Page 134 and 135:
128 Part III Design Patterns But, t
- Page 136 and 137:
130 Part III Design Patterns Unders
- Page 138 and 139:
132 Part III Design Patterns This s
- Page 140 and 141:
134 Part III Design Patterns An alt
- Page 142 and 143:
136 Part III Design Patterns It sti
- Page 144 and 145:
138 Part III Design Patterns Learni
- Page 146 and 147:
140 Part III Design Patterns Strate
- Page 148 and 149:
142 Part III Design Patterns Tying
- Page 150 and 151:
144 Part III Design Patterns One ru
- Page 152 and 153:
146 Part III Design Patterns From a
- Page 154 and 155:
148 Part III Design Patterns Exampl
- Page 156 and 157:
150 Part III Design Patterns The es
- Page 158 and 159:
152 Part III Design Patterns Compou
- Page 160 and 161:
154 Part III Design Patterns A usef
- Page 162 and 163:
156 Part III Design Patterns Concep
- Page 164 and 165:
158 Part III Design Patterns Exampl
- Page 166 and 167:
160 Part III Design Patterns Exampl
- Page 168 and 169:
CHAPTER 10 The Abstract Factory Pat
- Page 170 and 171:
Chapter 1O • The Abstract Factory
- Page 172 and 173:
Chapter 1O • The Abstract Factory
- Page 174 and 175:
Chapter 1O • The Abstract Factory
- Page 176 and 177:
Figure 1O-5 The ResFactory encapsul
- Page 178 and 179:
Figure 1O-6 Intermediate solution u
- Page 180 and 181:
In this pattern, Chapter 1O • The
- Page 182 and 183:
Chapter 1O • The Abstract Factory
- Page 184 and 185:
Chapter 1O • The Abstract Factory
- Page 186 and 187:
Chapter 1O • The Abstract Factory
- Page 188 and 189:
CHAPTER 11 How Do Experts Design? O
- Page 190 and 191:
Design is often thought of as a pro
- Page 192 and 193:
Design is often thought of as a pro
- Page 194 and 195:
It is only possible to make a place
- Page 196 and 197:
that it shared its patterns with ot
- Page 198 and 199:
Alexander's Steps Discussion Identi
- Page 200 and 201:
Chapter 11 • How Do Experts Desig
- Page 202 and 203:
198 Part IV • Putting It All Toge
- Page 204 and 205:
2OO Part IV • Putting It All Toge
- Page 206 and 207:
2O2 Part IV • Putting It All Toge
- Page 208 and 209:
2O4 Part IV • Putting It AM Toget
- Page 210 and 211:
Chapter 12 • Solving the CAD/CAM
- Page 212 and 213:
Chapter 12 • Solving the CAD/CAM
- Page 214 and 215:
Chapter 12 • Solving the CAD/CAM
- Page 216 and 217:
Chapter 12 • Solving the CAD/CAM
- Page 218 and 219:
Chapter 12 • Solving the CAD/CAM
- Page 220 and 221:
CHAPTER 13 The Principles and Strat
- Page 222 and 223:
Chapter 13 • The Principles and S
- Page 224 and 225:
Chapter 13 • The Principles and S
- Page 226 and 227:
Chapter 13 • The Principles and S
- Page 228 and 229:
Chapter 13 • The Principles and S
- Page 230 and 231:
228 Part V • Handling Variations
- Page 232 and 233:
23O Part V • Handling Variations
- Page 234 and 235:
232 Part V • Handling Variations
- Page 236 and 237:
234 Part V • Handling Variations
- Page 238 and 239:
236 Part V • Handling Variations
- Page 240 and 241:
238 Part V • Handling Variations
- Page 242 and 243:
24O Part V • Handling Variations
- Page 244 and 245:
242 Part V • Handling Variations
- Page 246 and 247:
244 Part V • Handling Variations
- Page 248 and 249:
246 Part V • Handling Variations
- Page 250 and 251:
248 Part V • Handling Variations
- Page 252 and 253:
25O Part V • Handling Variations
- Page 254 and 255:
252 Part V • Handling Variations
- Page 256 and 257:
254 Part V • Handling Variations
- Page 258 and 259:
256 Part V • Handling Variations
- Page 260 and 261:
258 Part V • Handling Variations
- Page 262 and 263:
26O Part V • Handling Variations
- Page 264 and 265:
262 Part V • Handling Variations
- Page 266 and 267:
264 Part V • Handling Variations
- Page 268 and 269:
266 Part V • Handling Variations
- Page 270 and 271:
268 Part V • Handling Variations
- Page 272 and 273:
27O Part V • Handling Variations
- Page 274 and 275:
272 Part V • Handling Variations
- Page 276 and 277:
274 Part V • Handling Variations
- Page 278 and 279:
276 Part V • Handling Variations
- Page 280 and 281:
Overview CHAPTER 18 The Template Me
- Page 282 and 283:
Chapter 18 • The Template Method
- Page 284 and 285:
Intent Problem Solution Participant
- Page 286 and 287:
CHAPTER 19 The Factory Method Patte
- Page 288 and 289:
The Factory Method Pattern Chapter
- Page 290 and 291:
Summary Chapter 19 • The Factory
- Page 292 and 293:
292 Part V • Handling Variations
- Page 294 and 295:
294 Part V • Handling Variations
- Page 296 and 297:
296 Part V • Handling Variations
- Page 298 and 299:
298 Part V • Handling Variations
- Page 300 and 301:
Figure 2O-1 Using Strategy patterns
- Page 302 and 303:
3O2 Part V • Handling Variations
- Page 304 and 305:
CHAPTER 21 Design Patterns Reviewed
- Page 306 and 307: Chapter 21 • Design Patterns Revi
- Page 308 and 309: Chapter 21 • Design Patterns Revi
- Page 310 and 311: Figure 21-1 The relationships betwe
- Page 312 and 313: CHAPTER 22 Bibliography This book h
- Page 314 and 315: • Meyer, B., Object-Oriented Soft
- Page 316 and 317: • See http://java.sun.com/j2se/L3
- Page 318 and 319: Personal Favorites It is my belief
- Page 320 and 321: Spradely, J. P., The Ethnographic I
- Page 322 and 323: Section Overview Section 3: Design
- Page 324 and 325: How do we get good quality repeated
- Page 326 and 327: Or again, people are creatures of h
- Page 328 and 329: this book is not a book about writi
- Page 330 and 331: …The details can confuse the solu
- Page 332 and 333: Patterns help us see the forest for
- Page 334 and 335: Design Pattern Matrix Design Patter
- Page 336 and 337: Design Pattern Matrix How it is imp
- Page 338 and 339: Design Pattern Matrix How it is imp
- Page 340 and 341: Design Pattern Matrix How it is imp
- Page 342 and 343: Design Pattern Matrix How it is imp
- Page 344 and 345: Design Pattern Matrix Is there vari
- Page 346 and 347: : (colon), connecting object and cl
- Page 348 and 349: usiness rules defining, 238 encapsu
- Page 350 and 351: decompression object, 249 decorator
- Page 352 and 353: FilterlnputStream class, 250 flexib
- Page 354 and 355: notifyObservers method, 272 NULL te