Sei sulla pagina 1di 375

Contents

Preface ................................................................................................
Organization of the Book ..........................................................
Online Resources ......................................................................
Acknowledgments .....................................................................

CHAPTER 1 Basic Concepts ............................


:..............................................................
1.1 . The Nature of 0bjects ...............................................................
1.2 Unified Modeling Language ......................................................
1.3 UML Notation Basics ...............................................................
1.4 Object Creation and Destruction ...............................................
1.5 Associations and Links ..............................................................
1.5.1 Binary Associations and Links ......................................
1.5.2 Ordering and Sorting ....................................................
1.5.3 Navigation and Referential Integrity .............................
1.5.4 Ternary and Higher Order Associations ........................
1.6 Aggregation and Composition ..................................................
1.7 Servant Classes and Delegation .................................................
1.8 Inheritance ................................................................................
1.8.1 Inherited versus Servant Classes ....................................
1.8.2 Polymorphism and Object Substitution ........................
1.9 Exercises ...................................................................................

CHAPTER 2 Common Patterns in Static Design..........................................................


2.1 Collection Managers .................................................................
2.2 Containers ................................................................................
2.3 Self-containing Classes. Hierarchies. and Networks .................

iii
iv CONTENTS

Relationship Loops ...................................................................


2.4.1 Relationship Fission .....................................................
2.4.2 Inheritance of Relationship Loops ................................
2.4.3 Double Loops' .............................................................
2.4.4 Three-Tier Relationship Loops' ...................................
Binary Association Classes ........................................................
2.5.1 Implementing Binary Association Classes .....................
2.5.2 Recursive Association Class ..........................................
The Handle-Body Pattern ..........................................................
Dynamic Schema .......................................................................
Shared Object Pools ..................................................................
Object Model for Extensible Markup Language ........................
2.9.1 XML Basics ..................................................................
2.9.2 XML Object Models ....................................................
2.9.3 The Strengths and Weaknesses of XML ........................
Case Study: ATM System Software-Part 1...............................
2.10.1 Project Description .......................................................
2.10.2 State Analysis and Design .............................................
Case Study: Shared Whiteboard-Part 1 ...................................
Case Study: Access Control Lists-Part 1 ..................................
Exercises ...................................................................................

CHAPTER 3 Persistent Objects..................... .


..............................................................
3.1 Transactions and Database Management Systems .....................
3.2 Object-Oriented Databases .......................................................
3.2.1 Database Roots and Extents .......................................
3.2.2 Persistence-Enabled Objects .........................................
3.2.3 Destruction of Persistent Objects ..................................
3.2.4 Schema Evolution .........................................................
3.3 Relational Databases .................................................................
3.4 Mapping Persistent Objects to Tables ........................................
3.4.1 Classes and Binary Associations ..................................
3.4.2 Aggregation, Composition, and Servant Classes ...........
3.4.3 Ternary and Higher Order Associations ........................
3.4.4 Reducing Ternary Associations to Binary Ones* ...........
3.4.5 Degenerate Ternary Associations' ................................
3.4.6 Inheritance ...................................................................
3.4.7 Mapping Rules Summary .............................................
3.5 A Critical Comparison Between Relational and
Object-Oriented Databases .......................................................
3.5.1 Optimization of Relational Tables ................................
3.5.2 Optimization of Persistent Objects ...............................
CONTENTS V

3.6 Case Study: ATM System S o f t w a r e p a r t 2 ...............................


3.7 Case Study: Shared Whiteboard-Part 2 ...................................
3.8 Case Study: A Rental Business-Part 1......................................
3.8.1 Initial Analysis and Design ...........................................
3.8.2 Full Object Design for Multiple Stores ..........................
3.8.3 Detailed Object Designs................................................
3.9 Case Study: Access Control Lists-Part 2 ..................................
3.10 Exercises ...................................................................................

CHAPTER 4 Advanced Topics in Object Modeling......................................................


4.1 Abstract Classes ........................................................................
4.2 Multiple Inheritance..................................................................
4.3 Interfaces ..................................................................................
4.4 Inner Classes .............................................................................
4.5 Collections ................................................................................
4.6 Packages ...................................................................................
4.7 Components .............................................................................
4.8 Nodes .......................................................................................
4.9 UML Notation Basics forSDynamicModeling ...........................
4.10 Reverse Engineering and Irreducible Patterns ............................
4.1 1 Exercises ...................................................................................

CHAPTER 5 Dynamic Object Modeling Basics.........................................................


5.1 Use Case Analyses .....................................................................
5.2 Sequence Diagrams ...................................................................
5.3 The Client /Server Model and Distributed Objects .....................
5.4 Interface Definition and ClientIServer
Development .............................................................................
5.5 The CORBA Standard ..............................................................
5.6 Interface Definition Language ...................................................
5.7 Statechart Diagrams ..................................................................
5.8 Case Study: ATM System Software-Part 3 ...............................
5.9 Case Study: Shared Whiteboard-Part 3 ...................................
5.10 Case Study: A Rental Business-Part 2 ......................................
5.1 1 Case Study: Access Control Lists-Part 3 ..................................
5.12 Exercises ...................................................................................

CHAPTER 6 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
vi CONTENTS
.

Servant Interfaces in Event Processing .......................................


6.5.1 Single Event Pushing and Observers ..............................
6.5.2 Callbacks from Server Objects ......................................
6.5.3 Subscription and Notification .......................................
6.5.4 Model-View-Controller ................................................
Relationship Loops with Interfaces ...........................................
Inheritance Ladders...................................................................
CORBA Objects ........................................................................
CORBA Client Stubs .................................................................
Tactics in Designing Distributed Objects* .................................
Proxy and Surrogate Objects .....................................................
Case Study: ATM System Software-Part 4 ...............................
Case Study: Shared Whiteboard-Part 4 ...................................
6.13.1 Message Port-An Infrastructure for a
Collaboration Group ....................................................
6.1 3.2 Sequence Diagrams for Messageport ............................
Case Study: Access Control Lists-Part 4 ..................................
Exercises ...................................................................................

CHAPTER 7 Object-Oriented Architecture ....................................................................


207
7.1 Notations for ArChitecture Diagrams ........................................ 208
7.2 Procedural Processing Systems .................................................. 209
7.3 ClientIServer 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.1 1 Case Study: A Rental Business-Part 3 ...................................... 247
CONTENTS vii
-.

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 8 Summaries and Notes................................................................................


8.1 Chapter 1 Summary and Notes .................................................
8.2 Chapter 2 Summary and Notes .................................................
8.3 Chapter 3 Summary and Notes .................................................
8.4 Chapter 4 Summary and Notes .................................................
8.5 Chapter 5 Summary and Notes .................................................
8.5.1 Notes on CORBA-COM Interoperability .....................
8.6 Chapter 6 Summary and Notes .................................................
8.7 Chapter 7 Summary and Notes .................................................
8.8 Case Studies Summary ..............................................................

CHAPTER 9 Answers to Exercises.................................................................................


9.1 Chapter 1 Exercise Answers .....................................................
9.2 Chapter 2 Exercise Answers .....................................................
9.3 Chapter 3 Exercise Answers .....................................................
9.4 Chapter 4 Exercise Answers .....................................................
9.5 Chapter 5 Exercise Answers .....................................................
9.6 Chapter 6 Exercise Answers .....................................................
9.7 Chapter 7 Exercise Answers .....................................................

A P P E N D I X .A Quick References for Object Designers.................................................. 341

APPENDIX B Sample Code Reference list ................................................................... 347

APPENDIX c Features of Object-Oriented Languages ................................................. 351

References.......................................................................................... 3.53
Index .................................................................................................... 357
This page is left blank intentionally.
This page is left blank intentionally.
This page is left blank intentionally.
This page is left blank intentionally.
This page is left blank intentionally.
This page is left blank intentionally.
This page is left blank intentionally.

Potrebbero piacerti anche