Register your product to gain access to bonus material or receive a coupon.
In this book, a leading software architect presents the rock-solid foundations of object design and architecture -- and the art of applying them. The Art of Objects will help analysts, architects, and developers fully leverage today's most important object tools and technologies, including Java, UML, XML, middleware, patterns, and much more. Its real-world case studies, examples, and exercises are designed in a holistic, forward-looking manner, ensuring that whatever technologies go out of fashion, readers will have the object skills they need to succeed. Yun-Tung Lau presents the language-independent fundamentals of object design; then provides a detailed overview of the Unified Modeling Language. Building from the basics, he presents advanced approaches such as object relationship loops, and relationship fission for analyzing complex object structures. The Art of Objects contains extensive coverage of persistent objects, including mapping to relational tables, event processing objects, distributed objects, CORBA, and the Interface Definition Language. It also introduces the latest XML object models.
Preface.
Organization of the Book.
Online Resources.
Acknowledgments.
1. Basic Concepts.
The Nature of Objects.
Unified Modeling Language.
UML Notation Basics.
Object Creation and Destruction.
Associations and Links.
Binary Associations and Links.
Ordering and Sorting.
Navigation and Referential Integrity.
Ternary and Higher Order Associations.
Aggregation and Composition.
Servant Classes and Delegation.
Inheritance.
Inherited versus Servant Classes.
Polymorphism and Object Substitution.
Exercises.
Collection Managers.
Containers.
Self-Containing Classes, Hierarchies, and Networks.
Relationship Loops.
Relationship Fission.
Inheritance of Relationship Loops.
Double Loops.
Three-Tier Relationship Loops.
Binary Association Classes.
Implementing Binary Association Classes.
Recursive Association Class.
The Handle-Body Pattern.
Dynamic Schema.
Shared Object Pools.
Object Model for Extensible Markup Language.
XML Basics.
XML Object Models.
The Strengths and Weaknesses of XML.
Case Study: ATM System Software.
Project Description.
State Analysis and Design.
Case Study: Shared Whiteboard.
Case Study: Access Control Lists.
Exercises.
Transactions and Database Management Systems.
Object-Oriented Databases.
Database Roots and Extents.
Persistence-Enabled Objects.
Destruction of Persistent Objects.
Schema Evolution.
Relational Databases.
Mapping Persistent Objects to Tables.
Classes and Binary Associations.
Aggregation, Composition, and Servant Classes.
Ternary and Higher Order Associations.
Reducing Ternary Associations to Binary Ones.
Degenerate Ternary Associations.
Inheritance.
Mapping Rules Summary.
A Critical Comparison Between Relational and Object-Oriented Databases.
Optimization of Relational Tables.
Optimization of Persistent Objects.
Case Study: ATM System Software.
Case Study: Shared Whiteboard.
Case Study: A Rental Business.
Initial Analysis and Design.
Full Object Design for Multiple Stores.
Detailed Object Designs.
Case Study: Access Control Lists.
Exercises.
Abstract Classes.
Multiple Inheritance.
Interfaces.
Inner Classes.
Collections.
Packages.
Components.
Nodes.
UML Notation Basics for Dynamic Modeling.
Reverse Engineering and Irreducible Patterns.
Exercises.
Use Case Analyses.
Sequence Diagrams.
The Client/Server Model and Distributed Objects.
Interface Definition and Client/Server Development.
The CORBA Standard.
Interface Definition Language.
Statechart Diagrams.
Case Study: ATM System Software.
Case Study: Shared Whiteboard.
Case Study: A Rental Business.
Case Study: Access Control Lists.
Exercises.
Object Wrappers.
Object Adapters.
Object Factories and Managers.
Interfaces as Servant Classes.
Servant Interfaces in Event Processing.
Single Event Pushing and Observers.
Callbacks from Server Objects.
Subscription and Notification.
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.
Case Study: Shared Whiteboard.
Message Port — An Infrastructure for a Collaboration Group.
Sequence Diagrams for MessagePort.
Case Study: Access Control Lists.
Exercises.
Notations for Architecture Diagrams.
Procedural Processing Systems.
Client/Server Systems.
“Thin Clients” and Object IDs.
Web Applications Using the MVC Framework.
Layered Systems.
Layering with Servant Objects.
Three-Tier and Multi-Tier Systems.
Clustering and Serializing.
Agents.
Aggregations and Federations.
Architectural Patterns in UML.
Case Study: ATM System Software.
Case Study: Shared Whiteboard.
The Shared Whiteboard Aggregation.
Image Exchange Formats and Policies.
The Interface and Control Layers.
Synchronization and Related Issues.
Trace Table for Requirements.
Case Study: A Rental Business.
Case Study: The Enterprise JavaBeans Framework.
Static Structures.
Resource Management Strategies.
Dynamic Behaviors of Entity Beans.
Exercises.
Chapter Summary and Notes.
Notes on CORBA-COM Interoperability.
Case Studies Summary.
Chapter Exercise Answers.
Object-oriented programming relies on programming languages. However, the concepts of objects transcend any specific programming languages. Many design patterns offer efficient modeling of static and dynamic object relationships. They can be used as the building blocks for sophisticated software systems. Similarly, at a system level, object-oriented architecture provides a lucid, high-level description of interconnected objects.
Tools may change. Programming languages may go out of favor. Yet the foundation of object design and architecture, and the art of applying it, will remain sound for a long time.
This book systematically presents the basic concepts of objects and practical object design patterns (both static and dynamic). It helps readers to gain a deep understanding of the patterns, allowing them to find design solutions quickly. In addition, the topics are forward looking, encompassing persistent objects, distributed objects, interface design patterns, XML (eXtensible Markup Language) object models, Web applications with thin clients, and so forth. Going beyond the design level, the book discusses object-oriented architecture, covering clients/servers, multi-tier systems, federations, agents, and others.
The Unified Modeling Language (UML), especially its graphic notation, is used as the primary means of presentation. The contents are independent of specific programming languages, making the book a general-purpose reference. However, many exercises do relate to certain languages (mostly Java). They help bring the readers closer to implementation and foster a concrete understanding of the underlying concepts. In addition, a wide range of real-world case studies and examples help elucidate these concepts and their practical application.
I did not use UML to specify all the details of an object design. For example, the UML Object Constraint Language is not used. In my opinion, source code with adequate inline comments is the best place to document the detailed logic of object behaviors.
This book can be used as a textbook for university or industrial training courses, or as a reference book for courses on object-oriented programming languages. This book is also suitable as a reference for mid- to advanced-level software professionals and graduate students. Many exercises are derived from actual projects. They expose readers to the full complexity of real-world systems.
Organization of the BookChapter 2 discusses the common patterns in static design. The focus here is on the static relationships between classes. The dynamic or time-dependent behaviors are left to later chapters. I systematically present simple and complex patterns. They allow object designers to design with patterns rather than with individual classes.
I note that the distinction between analysis and design is vague. Analysis is more on understanding the concepts in an application domain and investigating the requirements. Design is more on finding a solution and verifying that the solution fits the requirements. With a concrete understanding of the object concepts and the relationships behind the static patterns, one would naturally apply object analyses and designs in an iterative fashion. The ultimate criterion for an appropriate object design is its fitness to the requirements.
In Chapter 3 I first present the basic concepts on database management and persistent objects. I then discuss different strategies to make objects persistent, particularly those involving object-oriented databases and relational databases. I also examine object-relational mapping in detail and give a comparison between the two types of databases.
Chapter 4 introduces some advanced topics in object modeling. They include abstract classes, multiple inheritance, interfaces, inner classes, collections, packages, and components. These are extensions to the basic object concepts. I also discuss the reverse engineering of object designs and the identification of irreducible patterns, which is presented in Chapter 2.
Chapter 5 describes modeling the dynamic behavior of objects. I discuss use case analyses and object sequence diagrams. I also introduce the important concepts of client/server and distributed objects. For distributed objects, I cover interface definition, and the Common Object Request Broker Architecture (CORBA) standard and its operational mechanisms.
Then in Chapter 6 I present various interface design patterns. These patterns are intimately related to the dynamic behaviors of their constituent objects. Such behaviors are documented with sequence diagrams. I also discuss interface patterns related to CORBA objects.
In Chapter 7 I elevate the discussion to the system level. I describe various object-oriented architectures, including procedural processing systems, client/server systems, layered systems, multi-tier systems, agents, and aggregations and federations. Note that the distinction between architecture and design is not absolute. In architecture we are more concerned with the coordination between components, overall system performance, and scaling properties. In design we focus on the details within a component, an interface, or a subsystem.
Chapter 8 gives summaries and notes for the preceding chapters, whereas Chapter 9 provides answers to all exercises.
The integrated case studies serve as real-life examples to illustrate thepractical applications of the concepts. They appear at the ends of various chapters, culminating in Chapter 7 with a discussion of their system architectures. Readers are highly recommended to work through them in some detail. A concrete understanding of the basic concepts can only be built through hands-on design and implementation.
Sections with an asterisk after their titles may be skipped during the first reading. They are topics with somewhat narrower interests. Readers who are primarily interested in software system architecture may proceed directly to Chapter 7, which can be read as a survey of different architectural patterns.
Finally, the appendices provide various reference information. In particular, Appendix A summarizes UML notations, followed by a quick look-up table to all object designs appearing in the main text and exercises. Appendix B provides a list of code samples for each chapter. Appendix C lists the features of various object-oriented languages.
Online Resources