𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Java design patterns: a tutorial

✍ Scribed by Cooper, James William


Publisher
Addison-Wesley Professional
Year
2000;2001
Tongue
English
Leaves
348
Edition
4. printing
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Java developers know that design patterns offer powerful productivity benefits -- but until now, few patterns books have been specific enough to address their programming challenges. With Java Design Patterns, there's finally a hands-on, practical design patterns guide focused specifically on real-world Java development. Java Design Patterns is structured as a series of short chapters, each describing one Java 1.2 design pattern and providing one or more complete, working, visual example programs, complete with UML diagrams illustrating how the classes interact. The book covers three main categories of design patterns: creational, structural, and behavioral. Author James W. Cooper demonstrates several patterns at work in the context of development with the Java Foundation Classes (JFC) and Swing; and also presents several detailed case studies of Java development with design patterns. For all Java programmers, software engineers, and application developers.

✦ Table of Contents


Cover......Page 1
Contents......Page 6
Preface......Page 16
Acknowledgments......Page 18
Section 1 What Are Design Patterns?......Page 20
Chapter 1 Introduction......Page 22
Defining Design Patterns......Page 24
The Learning Process......Page 25
Notes on Object-Oriented Approaches......Page 26
The Java Foundation Classes......Page 27
Java Design Patterns......Page 28
Chapter 2 UML Diagrams......Page 30
Inheritance......Page 31
Interfaces......Page 32
Composition......Page 33
Visual SlickEdit Project Files......Page 34
Section 2 Creational Patterns......Page 36
How a Factory Works......Page 38
The Two Subclasses......Page 39
Building the Simple Factory......Page 40
Factory Patterns in Math Computation......Page 42
Programs on the CD-ROM......Page 43
Chapter 4 The Factory Method......Page 44
The Event Classes......Page 46
Straight Seeding......Page 47
Other Factories......Page 49
Programs on the CD-ROM......Page 50
Chapter 5 The Abstract Factory Pattern......Page 52
A GardenMaker Factory......Page 53
How the User Interface Works......Page 55
Consequences of the Abstract Factory Pattern......Page 56
Programs on the CD-ROM......Page 57
Creating a Singleton Using a Static Method......Page 58
Exceptions and Instances......Page 59
Creating an Instance of the Class......Page 60
Providing a Global Point of Access to a Singleton Pattern......Page 61
The javax.comm Package as a Singleton......Page 62
Other Consequences of the Singleton Pattern......Page 65
Programs on the CD-ROM......Page 66
Chapter 7 The Builder Pattern......Page 68
An Investment Tracker......Page 69
Calling the Builders......Page 71
The Check Box Builder......Page 73
Consequences of the Builder Pattern......Page 74
Programs on the CD-ROM......Page 75
Chapter 8 The Prototype Pattern......Page 76
Using the Prototype......Page 77
Using the Prototype Pattern......Page 80
Prototype Managers......Page 83
Cloning Using Serialization......Page 84
Thought Question......Page 85
Summary of Creational Patterns......Page 86
Section 3 Structural Patterns......Page 88
Moving Data between Lists......Page 90
Using the JFC JList Class......Page 92
Pluggable Adapters......Page 97
Adapters in Java......Page 98
Programs on the CD-ROM......Page 100
Chapter 10 The Bridge Pattern......Page 102
The Class Diagram......Page 104
Extending the Bridge......Page 105
Java Beans as Bridges......Page 106
Consequences of the Bridge Pattern......Page 107
Programs on the CD-ROM......Page 108
Chapter 11 The Composite Pattern......Page 110
An Implementation of a Composite......Page 111
The Employee Classes......Page 112
The Boss Class......Page 114
Building the Employee Tree......Page 116
Self-Promotion......Page 117
Doubly Linked List......Page 118
Composites in Java......Page 119
Programs on the CD-ROM......Page 120
Decorating a CoolButton......Page 122
Using a Decorator......Page 124
The Class Diagram......Page 126
Decorating Borders in Java......Page 127
Nonvisual Decorators......Page 128
Decorators, Adapters, and Composites......Page 131
Programs on the CD-ROM......Page 132
Chapter 13 The FaΓ§ade Pattern......Page 134
Building the FaΓ§ade Classes......Page 135
Consequences of the FaΓ§ade Pattern......Page 139
Notes on Installing and Running the dbFrame Program......Page 140
Programs on the CD-ROM......Page 141
Chapter 14 The Flyweight Pattern......Page 142
Example Code......Page 143
Flyweight Uses in Java......Page 148
Copy-on-Write Objects......Page 149
Programs on the CD-ROM......Page 150
Chapter 15 The Proxy Pattern......Page 152
Sample Code......Page 153
Enterprise Java Beans......Page 155
Summary of Structural Patterns......Page 156
Section 4 Behavioral Patterns......Page 158
Chapter 16 Chain of Responsibility Pattern......Page 160
Applicability......Page 161
Sample Code......Page 162
The List Boxes......Page 164
Programming a Help System......Page 167
A Chain or a Tree?......Page 170
Examples in Java......Page 171
Thought Questions......Page 172
Programs on the CD-ROM......Page 173
Motivation......Page 174
Command Objects......Page 175
Building Command Objects......Page 176
The Command Pattern......Page 178
The Command Pattern in the Java Language......Page 180
Consequences of the Command Pattern......Page 181
Providing Undo......Page 182
Thought Questions......Page 186
Programs on the CD-ROM......Page 187
Motivation......Page 188
Simple Report Example......Page 189
Interpreting the Language......Page 190
Objects Used in Parsing......Page 191
Reducing the Parsed Stack......Page 194
Implementing the Interpreter Pattern......Page 196
Consequences of the Interpreter Pattern......Page 200
Programs on the CD-ROM......Page 201
Motivation......Page 202
Sample Code......Page 203
Filtered Iterators......Page 204
Consequence of the Iterator Pattern......Page 207
Thought Question......Page 208
Programs on the CD-ROM......Page 209
An Example System......Page 210
Interactions between Controls......Page 212
Sample Code......Page 213
Mediators and Command Objects......Page 216
Single Interface Mediators......Page 217
Programs on the CD-ROM......Page 218
Motivation......Page 220
Implementation......Page 221
Sample Code......Page 222
Consequences of the Memento Pattern......Page 226
Programs on the CD-ROM......Page 227
Chapter 22 The Observer Pattern......Page 228
Watching Colors Change......Page 229
The Message to the Media......Page 232
The JList as an Observer......Page 233
Consequences of the Observer Pattern......Page 235
Programs on the CD-ROM......Page 236
Sample Code......Page 238
Switching between States......Page 243
How the Mediator Interacts with the StateManager......Page 244
Consequences of the State Pattern......Page 246
Programs on the CD-ROM......Page 247
Motivation......Page 248
Sample Code......Page 249
The Context Class......Page 250
The Program Commands......Page 251
Drawing Plots in Java......Page 252
Consequences of the Strategy Pattern......Page 255
Programs on the CD-ROM......Page 256
Motivation......Page 258
Template Method Patterns in Java......Page 260
Sample Code......Page 261
Templates and Callbacks......Page 265
Programs on the CD-ROM......Page 266
Motivation......Page 268
Sample Code......Page 270
Visiting Several Classes......Page 272
Bosses are Employees, Too......Page 274
Catch-All Operations Using Visitors......Page 275
Consequence of the Visitor Pattern......Page 276
Programs on the CD-ROM......Page 277
Section 5 Design Patterns and the Java Foundation Classes......Page 278
Installing and Using Swing......Page 280
The Swing Class Hierarchy......Page 281
Setting the Look and Feel......Page 282
Making a JxFrame Class......Page 283
A Simple Two-Button Program......Page 284
More on JButton......Page 285
Programs on the CD-ROM......Page 286
Radio Buttons......Page 288
JToggleButton......Page 289
Programs on the CD-ROM......Page 290
Action Objects......Page 292
Design Patterns in the Action Object......Page 295
Programs on the CD-ROM......Page 296
Chapter 31 The JList Class......Page 298
List Selections and Events......Page 299
Changing a List Display Dynamically......Page 300
A Sorted JList with a ListModel......Page 301
Sorting More-Complicated Objects......Page 303
Getting Database Keys......Page 305
Adding Pictures in List Boxes......Page 307
Programs on the CD-ROM......Page 308
A Simple JTable Program......Page 310
Cell Renderers......Page 314
Rendering Other Kinds of Classes......Page 315
Selecting Cells in a Table......Page 317
Patterns Used in This Image Table......Page 318
Programs on the CD-ROM......Page 320
Chapter 33 The JTree Class......Page 322
Summary......Page 324
Section 6 Case Studies......Page 326
Chapter 34 Sandy and the Mediator......Page 328
Chapter 35 Herb’s Text Processing Tangle......Page 332
Chapter 36 Mary’s Dilemma......Page 334
Bibliography......Page 336
B......Page 338
C......Page 339
D......Page 340
F......Page 341
I......Page 342
J......Page 343
M......Page 344
P......Page 345
S......Page 346
T......Page 347
W......Page 348

✦ Subjects


Computer Science;Programming;Reference


πŸ“œ SIMILAR VOLUMES


cover
✍ Cooper, James William, 1943- πŸ“‚ Library πŸ“… 2000 πŸ› Reading, Mass. : Addison-Wesley 🌐 English

System requirements for accompanying computer disc: JDK1.2; Windows 95/98/NT; JVISION

Java Design Patterns: A Tutorial
✍ James W. Cooper πŸ“‚ Library πŸ“… 2000 πŸ› Addison-Wesley Professional 🌐 English

Design patterns have become a staple of object-oriented design and programming by providing elegant, easy-to-reuse, and maintainable solutions to commonly encountered programming challenges. However, many busy Java programmers have yet to learn about design patterns and incorporate this powerful tec

Java Design Patterns A Tutorial
✍ James W. Cooper πŸ“‚ Library πŸ“… 2000 πŸ› Addison-Wesley Professional 🌐 English

Java developers know that design patterns offer powerful productivity benefits but until now, few patterns books have been specific enough to address their programming challenges. With Java Design Patterns, theres finally a hands-on, practical design patterns guide focused specifically on real-world

Java(TM) Design Patterns: A Tutorial(
✍ James W. Cooper πŸ“‚ Library πŸ“… 2000 πŸ› addison-wesley 🌐 English

Design patterns have become a staple of object-oriented design and programming by providing elegant, easy-to-reuse, and maintainable solutions to commonly encountered programming challenges. However, many busy Java programmers have yet to learn about design patterns and incorporate this powerful tec

C# Design Patterns: A Tutorial
✍ James William Cooper πŸ“‚ Library πŸ“… 2002 πŸ› Addison-Wesley Professional 🌐 English

<span>Design patterns are elegant, adaptable, and reusable solutions to everyday software development problems. Programmers use design patterns to organize objects in programs, making them easier to write and modify. This text is a practical guide to writing C# programs using the most common pattern

C# Design Patterns: A Tutorial
✍ James W. Cooper πŸ“‚ Library πŸ“… 2002 πŸ› Addison-Wesley Professional 🌐 English

The first book for C# programmers on how to use Design Patterns. Explains how to write C# programs using some of the most common design patterns. Softcover. CD-ROM included.