decompression object, 249 decorator objects chaining, 244, 250, 252 defined, 243 Decorator pattern, 243-254 and Analysis Matrix, 299 class diagram, 244 code examples, 246-247, 252-254 and e-tailing case study, 243, 244-248 and GoF classification system, 264 intent/purpose of, 243, 251 key features of, 251 power of, 250 simplified view of, 251 and stream I/O, 248-250 decoupling. See also coupling and Bridge pattern, 123, 133, 151 defined, 124 as pattern category, 264, 265 decryption object, 249 deleteOJbserver method, 272 dependency relationship, 35, 38, 266, 274 Dependents pattern, 267 Deployment Diagram, 30 derived class, 18, 19, 27, 34 design. See also software design Alexander's approach to, 181-195 complexification in, 189-190 and preformed parts, 188 as process of synthesis, 187, 194 rules for good, 192 design patterns. See also specific design patterns alternate ways of viewing/studying, 136-137, 217 and Analysis Matrix, 299 carpenter example, 81-84, 216 categories of, 263-265 and commonality/variability analysis, 307-309 composite, 152 compound, 152 and contextual design, 310 deriving, 138 Index 327 and encapsulation, 306-307 key features, 79 Abstract Factory pattern, 176 Adapter pattern, 102 Bridge pattern, 151 Decorator pattern, 251 Facade pattern, 90 Factory Method pattern, 288 Observer pattern, 273 Singleton pattern, 258 Strategy pattern, 238 Template Method pattern, 283 and object-oriented paradigm, 71, 85, 305-306 and open-closed principle, 218 origins of, 72-77 and principle of designing from context, 218-222 reasons for studying, 71, 80-86 recommended books on, 314— 316 seminal work on, 69, 78 solving CAD/CAM problem with, 197-216 subscribing to e-zine, 314 Website, 313-314 destructor, 25-26, 27 detach (Observer) method, 268 details, delaying commitment to, 64 device-driver, using switch to control, 164-171, 180 doQuery method, 281-282, 286 Double-Checked Locking pattern, 258-262 code examples, 261, 262 contrasted with Singleton pattern, 255, 261 intent/purpose of, 255 and multithreaded applications, 255, 258-259, 261 draw method, 144 draw_a_circle method, 126 draw_a_line method, 126 drawCircle method, 126, 129- 130, 144
328 Index drawing programs, 125-136, 141-149, 157-161 drawLine method, 126, 127, 130, 144 driver, using switch to control, 164-171, 180 E e-commerce system. See e-tailing case study e-tailing case study address verification, 265-266 and Analysis Matrix, 292-302 customer coupons, 269-271 database access, 279-282, 285-286 and design patterns Abstract Factory pattern, 299 Decorator pattern, 243, 244-248 Observer pattern, 267-272 Singleton pattern, 256-257 Strategy pattern, 239-240, 298 Template Method pattern, 280-282 international or der-processing, 292-302 printed sales ticket, 241-243, 244-248, 301 sales-order architecture, 232-234 tax rules, 234-237, 256-257 welcome letter, 265-266 e-zine, design patterns, 314 Eckel, Bruce, 178 electronic magazine, design patterns, 314 electronic-retailing. See e-tailing case study encapsulation advantages of, 24 and Bridge pattern, 156 defined, 20, 21, 27 and Facade pattern, 92, 93 and Observer pattern, 275 and Strategy pattern, 237, 239 tax-rules example, 234 traditional vs. new view of, 112-115, 140 types of, 114 errors. See bugs; debugging ESPRIT consortium, 77 expert system defined, 46 describing problem to be solved by, 48-51 extracting information for, 45-46, 49 understanding terminology, 46-48 explosion, class, 64, 65, 132, 134, 239-240 extensibility, software, 218 extreme Programming, recommended book on, 318 F Facade pattern, 87-93 and CAD/CAM problem, 92, 200, 210-211 contrasted with Adapter pattern, 104-106 determining relationship with other patterns, 203-205 intent/purpose of, 87, 89 key features of, 90 and principle of containing variation, 224 and principle of designing from context, 222 simplified view of, 90 ways of using, 91-92, 93 Factory Method pattern, 285-289 intent/purpose of, 287, 288 key features of, 288 simplified view of, 288 and Template Method, 286 ways of using, 287, 289 Factory objects, 169, 175, 250 features, expert system defined, 46-47 extracting from dataset, 49-50 generating NC set commands for, 50 FilelnputStream class, 250
- 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 352 and 353: FilterlnputStream class, 250 flexib
- Page 354 and 355: notifyObservers method, 272 NULL te
- Page 356 and 357: sales-order architecture, e-tail sy