没有合适的资源?快使用搜索试试~ 我知道了~
首页Design Patterns, Elements of Reusable Object-Oriented Software
资源详情
资源评论
资源推荐

Design Patterns
Elements of reusable Object-Oriented
Software.

Preface to book ............................................................................................................... 10
Foreword......................................................................................................................... 12
Guide to readers.............................................................................................................. 13
Introduction .................................................................................................................... 14
What is a Design Pattern?.................................................................................... 15
Design Patterns in Smalltalk MVC ..................................................................... 17
Describing Design Patterns ................................................................................. 18
The Catalog of Design Patterns........................................................................... 20
Organizing the Catalog........................................................................................ 21
How Design Patterns Solve Design Problems..................................................... 23
How to Select a Design Pattern ........................................................................... 39
How to Use a Design Pattern............................................................................... 41
A Case Study .................................................................................................................. 42
Design Problems.................................................................................................. 42
Document Structure............................................................................................. 43
Formatting ........................................................................................................... 48
Embellishing the User Interface .......................................................................... 51
Supporting Multiple Look-and-Feel Standards ................................................... 54
Supporting Multiple Window Systems ............................................................... 58
User Operations ................................................................................................... 64
Spelling Checking and Hyphenation ................................................................... 70
Summary.............................................................................................................. 80
Creational Patterns.......................................................................................................... 83
Abstract Factory ......................................................................................................... 88
Intent.................................................................................................................... 88
Also Known As ................................................................................................... 88
Motivation ........................................................................................................... 88
Applicability ........................................................................................................ 89
Structure .............................................................................................................. 89
Participants .......................................................................................................... 89
Collaborations...................................................................................................... 90
Consequences ...................................................................................................... 90
Implementation.................................................................................................... 90
Sample Code........................................................................................................ 92
Known Uses......................................................................................................... 95
Related Patterns ................................................................................................... 95
Builder ........................................................................................................................ 97
Intent.................................................................................................................... 97
Motivation ........................................................................................................... 97
Applicability ........................................................................................................ 98
Structure .............................................................................................................. 98
Participants .......................................................................................................... 98
2

Collaborations...................................................................................................... 99
Consequences ...................................................................................................... 99
Implementation.................................................................................................. 100
Sample Code...................................................................................................... 100
Known Uses....................................................................................................... 104
Related Patterns ................................................................................................. 105
Factory Method ........................................................................................................ 106
Intent..................................................................................................................... 106
Also Known As ................................................................................................. 106
Motivation ......................................................................................................... 106
Applicability ...................................................................................................... 107
Structure ............................................................................................................ 107
Participants ........................................................................................................ 107
Collaborations.................................................................................................... 107
Consequences .................................................................................................... 107
Implementation.................................................................................................. 109
Sample Code...................................................................................................... 112
Known Uses....................................................................................................... 114
Related Patterns ................................................................................................. 114
Prototype................................................................................................................... 115
Intent..................................................................................................................... 115
Motivation ......................................................................................................... 115
Applicability ...................................................................................................... 116
Structure ............................................................................................................ 117
Participants ........................................................................................................ 117
Collaborations.................................................................................................... 117
Consequences .................................................................................................... 117
Implementation.................................................................................................. 118
Sample Code...................................................................................................... 120
Known Uses....................................................................................................... 123
Related Patterns ................................................................................................. 123
Singleton................................................................................................................... 124
Intent..................................................................................................................... 124
Motivation ......................................................................................................... 124
Applicability ...................................................................................................... 124
Structure ............................................................................................................ 124
Participants ........................................................................................................ 124
Collaborations.................................................................................................... 125
Consequences .................................................................................................... 125
Implementation.................................................................................................. 125
Sample Code...................................................................................................... 128
Known Uses....................................................................................................... 130
Related Patterns ................................................................................................. 130
Discussion of Creational Patterns............................................................................. 131
3

Structural Patterns ........................................................................................................ 133
Adapter ..................................................................................................................... 135
Intent..................................................................................................................... 135
Also Known As ................................................................................................. 135
Motivation ......................................................................................................... 135
Applicability ...................................................................................................... 136
Structure ............................................................................................................ 136
Participants ........................................................................................................ 137
Collaborations.................................................................................................... 137
Consequences .................................................................................................... 137
Implementation.................................................................................................. 139
Sample Code...................................................................................................... 141
Known Uses....................................................................................................... 144
Related Patterns ................................................................................................. 145
Bridge ....................................................................................................................... 146
Intent..................................................................................................................... 146
Also Known As ................................................................................................. 146
Motivation ......................................................................................................... 146
Applicability ...................................................................................................... 147
Structure ............................................................................................................ 148
Participants ........................................................................................................ 148
Collaborations.................................................................................................... 149
Consequences .................................................................................................... 149
Implementation.................................................................................................. 149
Sample Code...................................................................................................... 150
Known Uses....................................................................................................... 154
Related Patterns ................................................................................................. 155
Composite................................................................................................................. 156
Intent..................................................................................................................... 156
Motivation ......................................................................................................... 156
Applicability ...................................................................................................... 157
Structure ............................................................................................................ 157
Participants ........................................................................................................ 158
Collaborations.................................................................................................... 158
Consequences .................................................................................................... 158
Implementation.................................................................................................. 159
Sample Code...................................................................................................... 162
Known Uses....................................................................................................... 164
Related Patterns ................................................................................................. 165
Decorator .................................................................................................................. 166
Intent..................................................................................................................... 166
Also Known As ................................................................................................. 166
Motivation ......................................................................................................... 166
Applicability ...................................................................................................... 167
4

Structure ............................................................................................................ 168
Participants ........................................................................................................ 168
Collaborations.................................................................................................... 168
Consequences .................................................................................................... 168
Implementation.................................................................................................. 169
Sample Code...................................................................................................... 171
Known Uses....................................................................................................... 173
Related Patterns ................................................................................................. 174
Facade....................................................................................................................... 175
Intent..................................................................................................................... 175
Motivation ......................................................................................................... 175
Applicability ...................................................................................................... 176
Structure ............................................................................................................ 177
Participants ........................................................................................................ 177
Collaborations.................................................................................................... 177
Consequences .................................................................................................... 177
Implementation.................................................................................................. 178
Sample Code...................................................................................................... 178
Known Uses....................................................................................................... 181
Related Patterns ................................................................................................. 182
Flyweight.................................................................................................................. 184
Intent..................................................................................................................... 184
Motivation ......................................................................................................... 184
Applicability ...................................................................................................... 186
Structure ............................................................................................................ 187
Participants ........................................................................................................ 187
Collaborations.................................................................................................... 188
Consequences .................................................................................................... 188
Implementation.................................................................................................. 189
Sample Code...................................................................................................... 189
Known Uses....................................................................................................... 194
Related Patterns ................................................................................................. 195
Proxy......................................................................................................................... 196
Intent..................................................................................................................... 196
Also Known As ................................................................................................. 196
Motivation ......................................................................................................... 196
Applicability ...................................................................................................... 197
Structure ............................................................................................................ 198
Participants ........................................................................................................ 198
Collaborations.................................................................................................... 199
Consequences .................................................................................................... 199
Implementation.................................................................................................. 199
Sample Code...................................................................................................... 201
Known Uses....................................................................................................... 204
5
剩余353页未读,继续阅读
















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0