Art of objects
Yun-Tung, Lau
Art of objects object-oriented design and architecture - Boston Addison-Wesley 2001 - xv,363,ip.
CONTENTS
Preface xiii
Organization of the Book ix
Online Resources x
Acknowledgments xi
Basic Concepts 1
1.1 The Nature of Objects 1
1.2 Unified Modeling Language 3
1.3 UML Notation Basics 4
1.4 Object Creation and Destruction 6
1.5 Associations and Links 7
1.5.1 Binary Associations and Links 8
1.5.2 Ordering and Sorting 9
1.5.3 Navigation and Referential Integrity 10
1.5.4 Ternary and Higher Order Associations 11
1.6 Aggregation and Composition 13
1.7 Servant Classes and Delegation 14
1.8 Inheritance 15
1.8.1 Inherited versus Servant Classes 16
1.8.2 Polymorphism and Object Substitution 17
1.9 Exercises 19
2 Common Patterns in Static Design 21
2.1 Collection Managers. 21
2.2 Containers 23
2.3 Self-Containing Classes, Hierarchies, and Networks 25
2.4 Relationship Loops. . 26
2.4.1 Relationship Fission . 30
2.4.2 Inheritance of Relationship Loops 31
2.4.3 Double Loops 32
2.4.4 Three-Tier Relationship Loops 32
2.5 Binary Association Classes 33
2.5.1 Implementing Binary Association Classes 36
2.5.2 Recursive Association Class 38
2.6 The Handle-Body Pattern 39
2.7 Dynamic Schema. 40
2.8 Shared Object Pools 41
2.9 Object Model for Extensible Markup Language 43
2.9.1 XML Basics 44
2.9.2 XML Object Models 46
2.9.3 The Strengths and Weaknesses of XML 48
2.10 Case Study: ATM System Software—Part 1 49
2.10.1 Project Description 49
2.10.2 State Analysis and Design 50
2.11 Case Study: Shared Whiteboard—Part 1 53
2.12 Case Study: Access Control Lists—Part 1 61
2.13 Exercises 63
chapter 3 Persistent Objects 69
3.1 Transactions and Database Management Systems 70
3.2 Object-Oriented Databases 71
3.2.1 Database Roots and Extents 72
3.2.2 Persistence-Enabled Objects 74
3.2.3 Destruction of Persistent Objects 75
3.2.4 Schema Evolution . 76
3.3 Relational Databases 76
3.4 Mapping Persistent Objects to Tables . 77
3.4.1 Classes and Binary Associations 78
3.4.2 Aggregation, Composition, and Servant Classes 80
3.4.3 Ternary and Higher Order Associations 81
3.4.4 Reducing Ternary Associations to Binary Ones 82
3.4.5 Degenerate Ternary Associations 85
3.4.6 Inheritance 88
3.4.7 Mapping Rules Summary 90
3.5 A Critical Comparison Between Relational and
Object-Oriented Databases 91
3.5.1 Optimization of Relational Tables 93
3.5.2 Optimization of Persistent Objects 95
3.6 Case Study: ATM System Software—Part 2 97
3.7 Case Study: Shared Whiteboard—Part 2 97
3.8 Case Study: A Rental Business—Part 1 98
3.8.1 Initial Analysis and Design 98
3.8.2 Full Object Design for Multiple Stores 101
3.8.3 Detailed Object Designs 101
3.9 Case Study: Access Control Lists—Part 2 110
3.10 Exercises 116
4 Advanced Topics in Object Modeling 125
4.1 Abstract Classes 125
4.2 Multiple Inheritance 126
4.3 Interfaces 128
4.4 Inner Classes. 129
4.5 Collections 130
4.6 Packages 131
4.7 Components 132
4.8 Nodes 133
4.9 UML Notation Basics for Dynamic Modeling 134
4.10 Reverse Engineering and Irreducible Patterns 135
4.11 Exercises 137
5 Dynamic Object Modeling Basics 139
5.1 Use Case Analyses 139
5.2 Sequence Diagrams 141
5.3 The Client/Server Model and Distributed Objects 144
5.4 Interface Definition and Client/Server
Development 146
5.5 The CORBA Standard 148
5.6 Interface Definition Language 150
5.7 Statechart Diagrams 154
5.8 Case Study: ATM System Software—Part 3 156
5.9 Case Study: Shared Whiteboard—Part 3 159
5.10 Case Study: A Rental Business—Part 2 162
5.11 Case Study: Access Control Lists—Part 3 165
5.12 Exercises 166
Common Interface Design Patterns 169
6.1 Object Wrappers 169
6.2 Object Adapters 171
6.3 Object Factories and Managers. 172
6.4 Interfaces as Servant Classes 173
6.5 Servant Interfaces in Event Processing 175
6.5.1 Single Event Pushing and Observer 176
6.5.2 Callbacks from Server Objects 177
6.5.3 Subscription and Notification 177
6.5.4 Model-View-Controller 180
6.6 Relationship Loops with Interfaces 182
6.7 Inheritance Ladders 183
6.8 CORBA Objects 183
6.9 CORBA Client Stubs 188
6.10 Tactics in Designing Distributed Objects 189
6.11 Proxy and Surrogate Objects 191
6.12 Case Study: ATM System Software—Part 4 192
6.13 Case Study: Shared Whiteboard—Part 4 197
6.13.1 Message Port—An Infrastructure for a
Collaboration Group 197
6.13.2 Sequence Diagrams for MessagePort 201
6.14 Case Study: Access Control Lists—Part 4 203
6.15 Exercises 204
chapter 7 Object-Oriented Architecture 207
7.1 Notations for Architecture Diagrams 208
7.2 Procedural Processing Systems 209
7.3 Client/Server Systems 211
7.3.1 "Thin Clients" and Object IDs 213
7.3.2 Web Applications Using the MVC Framework 215
7.4 Layered Systems 217
7.4.1 Layering with Servant Objects 219
7.5 Three-Tier and Multi-Tier Systems . 221
7.5.1 Clustering and Serializing 223
7.6 Agents . 226
7.7 Aggregations and Federations 228
7.8 Architectural Patterns in UML 230
7.9 Case Study: ATM System Software—Part 5 233
7.10 Case Study: Shared Whiteboard—Part 5 236
7.10.1 The Shared Whiteboard Aggregation 236
7.10.2 Image Exchange Formats and Policies 237
7.10.3 The Interface and Control Layers . 240
7.10.4 Synchronization and Related Issues 244
7.10.5 Trace Table for Requirements 246
7.11 Case Study: A Rental Business—Part 3 247
7.12 Case Study: The Enterprise JavaBeans Framework 249
7.12.1 Static Structures 249
7.12.2 Resource Management Strategies 253
7.12.3 Dynamic Behaviors of Entity Beans 254
7.13 Exercises 258
chapter s Summaries and Notes 259
8.1 Chapter 1 Summary and Notes . 259
8.2 Chapter 2 Summary and Notes 260
8.3 Chapter 3 Summary and Notes 261
8.4 Chapter 4 Summary and Notes 262
8.5 Chapter 5 Summary and Notes 263
8.5.1 Notes on CORBA-COM Interoperability 264
8.6 Chapter 6 Summary and Notes 264
8.7 Chapter 7 Summary and Notes 265
8.8 Case Studies Summary 266
chapter 9 Answers to Exercises 269
9.1 Chapter 1 Exercise Answers 269
9.2 Chapter 2 Exercise Answers 274
9.3 Chapter 3 Exercise Answers 294
9.4 Chapter 4 Exercise Answers. 310
9.5 Chapter 5 Exercise Answers 313
9.6 Chapter 6 Exercise Answers 318
9.7 Chapter 7 Exercise Answers 328
Appendix a Quick References for Object Designers 341
Appendix b Sample Code Reference List 347
Appendix c Features of Object-Oriented Languages 351
References 353
Index 357
9780201711615
005.11 / LAU
Art of objects object-oriented design and architecture - Boston Addison-Wesley 2001 - xv,363,ip.
CONTENTS
Preface xiii
Organization of the Book ix
Online Resources x
Acknowledgments xi
Basic Concepts 1
1.1 The Nature of Objects 1
1.2 Unified Modeling Language 3
1.3 UML Notation Basics 4
1.4 Object Creation and Destruction 6
1.5 Associations and Links 7
1.5.1 Binary Associations and Links 8
1.5.2 Ordering and Sorting 9
1.5.3 Navigation and Referential Integrity 10
1.5.4 Ternary and Higher Order Associations 11
1.6 Aggregation and Composition 13
1.7 Servant Classes and Delegation 14
1.8 Inheritance 15
1.8.1 Inherited versus Servant Classes 16
1.8.2 Polymorphism and Object Substitution 17
1.9 Exercises 19
2 Common Patterns in Static Design 21
2.1 Collection Managers. 21
2.2 Containers 23
2.3 Self-Containing Classes, Hierarchies, and Networks 25
2.4 Relationship Loops. . 26
2.4.1 Relationship Fission . 30
2.4.2 Inheritance of Relationship Loops 31
2.4.3 Double Loops 32
2.4.4 Three-Tier Relationship Loops 32
2.5 Binary Association Classes 33
2.5.1 Implementing Binary Association Classes 36
2.5.2 Recursive Association Class 38
2.6 The Handle-Body Pattern 39
2.7 Dynamic Schema. 40
2.8 Shared Object Pools 41
2.9 Object Model for Extensible Markup Language 43
2.9.1 XML Basics 44
2.9.2 XML Object Models 46
2.9.3 The Strengths and Weaknesses of XML 48
2.10 Case Study: ATM System Software—Part 1 49
2.10.1 Project Description 49
2.10.2 State Analysis and Design 50
2.11 Case Study: Shared Whiteboard—Part 1 53
2.12 Case Study: Access Control Lists—Part 1 61
2.13 Exercises 63
chapter 3 Persistent Objects 69
3.1 Transactions and Database Management Systems 70
3.2 Object-Oriented Databases 71
3.2.1 Database Roots and Extents 72
3.2.2 Persistence-Enabled Objects 74
3.2.3 Destruction of Persistent Objects 75
3.2.4 Schema Evolution . 76
3.3 Relational Databases 76
3.4 Mapping Persistent Objects to Tables . 77
3.4.1 Classes and Binary Associations 78
3.4.2 Aggregation, Composition, and Servant Classes 80
3.4.3 Ternary and Higher Order Associations 81
3.4.4 Reducing Ternary Associations to Binary Ones 82
3.4.5 Degenerate Ternary Associations 85
3.4.6 Inheritance 88
3.4.7 Mapping Rules Summary 90
3.5 A Critical Comparison Between Relational and
Object-Oriented Databases 91
3.5.1 Optimization of Relational Tables 93
3.5.2 Optimization of Persistent Objects 95
3.6 Case Study: ATM System Software—Part 2 97
3.7 Case Study: Shared Whiteboard—Part 2 97
3.8 Case Study: A Rental Business—Part 1 98
3.8.1 Initial Analysis and Design 98
3.8.2 Full Object Design for Multiple Stores 101
3.8.3 Detailed Object Designs 101
3.9 Case Study: Access Control Lists—Part 2 110
3.10 Exercises 116
4 Advanced Topics in Object Modeling 125
4.1 Abstract Classes 125
4.2 Multiple Inheritance 126
4.3 Interfaces 128
4.4 Inner Classes. 129
4.5 Collections 130
4.6 Packages 131
4.7 Components 132
4.8 Nodes 133
4.9 UML Notation Basics for Dynamic Modeling 134
4.10 Reverse Engineering and Irreducible Patterns 135
4.11 Exercises 137
5 Dynamic Object Modeling Basics 139
5.1 Use Case Analyses 139
5.2 Sequence Diagrams 141
5.3 The Client/Server Model and Distributed Objects 144
5.4 Interface Definition and Client/Server
Development 146
5.5 The CORBA Standard 148
5.6 Interface Definition Language 150
5.7 Statechart Diagrams 154
5.8 Case Study: ATM System Software—Part 3 156
5.9 Case Study: Shared Whiteboard—Part 3 159
5.10 Case Study: A Rental Business—Part 2 162
5.11 Case Study: Access Control Lists—Part 3 165
5.12 Exercises 166
Common Interface Design Patterns 169
6.1 Object Wrappers 169
6.2 Object Adapters 171
6.3 Object Factories and Managers. 172
6.4 Interfaces as Servant Classes 173
6.5 Servant Interfaces in Event Processing 175
6.5.1 Single Event Pushing and Observer 176
6.5.2 Callbacks from Server Objects 177
6.5.3 Subscription and Notification 177
6.5.4 Model-View-Controller 180
6.6 Relationship Loops with Interfaces 182
6.7 Inheritance Ladders 183
6.8 CORBA Objects 183
6.9 CORBA Client Stubs 188
6.10 Tactics in Designing Distributed Objects 189
6.11 Proxy and Surrogate Objects 191
6.12 Case Study: ATM System Software—Part 4 192
6.13 Case Study: Shared Whiteboard—Part 4 197
6.13.1 Message Port—An Infrastructure for a
Collaboration Group 197
6.13.2 Sequence Diagrams for MessagePort 201
6.14 Case Study: Access Control Lists—Part 4 203
6.15 Exercises 204
chapter 7 Object-Oriented Architecture 207
7.1 Notations for Architecture Diagrams 208
7.2 Procedural Processing Systems 209
7.3 Client/Server Systems 211
7.3.1 "Thin Clients" and Object IDs 213
7.3.2 Web Applications Using the MVC Framework 215
7.4 Layered Systems 217
7.4.1 Layering with Servant Objects 219
7.5 Three-Tier and Multi-Tier Systems . 221
7.5.1 Clustering and Serializing 223
7.6 Agents . 226
7.7 Aggregations and Federations 228
7.8 Architectural Patterns in UML 230
7.9 Case Study: ATM System Software—Part 5 233
7.10 Case Study: Shared Whiteboard—Part 5 236
7.10.1 The Shared Whiteboard Aggregation 236
7.10.2 Image Exchange Formats and Policies 237
7.10.3 The Interface and Control Layers . 240
7.10.4 Synchronization and Related Issues 244
7.10.5 Trace Table for Requirements 246
7.11 Case Study: A Rental Business—Part 3 247
7.12 Case Study: The Enterprise JavaBeans Framework 249
7.12.1 Static Structures 249
7.12.2 Resource Management Strategies 253
7.12.3 Dynamic Behaviors of Entity Beans 254
7.13 Exercises 258
chapter s Summaries and Notes 259
8.1 Chapter 1 Summary and Notes . 259
8.2 Chapter 2 Summary and Notes 260
8.3 Chapter 3 Summary and Notes 261
8.4 Chapter 4 Summary and Notes 262
8.5 Chapter 5 Summary and Notes 263
8.5.1 Notes on CORBA-COM Interoperability 264
8.6 Chapter 6 Summary and Notes 264
8.7 Chapter 7 Summary and Notes 265
8.8 Case Studies Summary 266
chapter 9 Answers to Exercises 269
9.1 Chapter 1 Exercise Answers 269
9.2 Chapter 2 Exercise Answers 274
9.3 Chapter 3 Exercise Answers 294
9.4 Chapter 4 Exercise Answers. 310
9.5 Chapter 5 Exercise Answers 313
9.6 Chapter 6 Exercise Answers 318
9.7 Chapter 7 Exercise Answers 328
Appendix a Quick References for Object Designers 341
Appendix b Sample Code Reference List 347
Appendix c Features of Object-Oriented Languages 351
References 353
Index 357
9780201711615
005.11 / LAU