Book contents
- Frontmatter
- Contents
- INTRODUCTION
- GETTING STARTED WITH JAVA
- MIGRATING TO JAVA
- TECHNIQUES 101
- MODELING AND PATTERNS
- THE CONCEPTUAL MODEL: WHAT'S THE OBJECT?
- REFINING SKILLS FOR EXPRESSIVE CONCEPTUAL MODELS
- DISTRIBUTED OBSERVER CHAINS
- EVENT NOTIFIER: A PATTERN FOR EVENT NOTIFICATION
- ANALYSIS PATTERNS
- JAVA IN A DISTRIBUTED WORLD
- THREADS
- USER INTERFACES
- SECURITY
- TESTING
- PERFORMANCE
- REALITY CHECK
- INDEX
DISTRIBUTED OBSERVER CHAINS
Published online by Cambridge University Press: 06 July 2010
- Frontmatter
- Contents
- INTRODUCTION
- GETTING STARTED WITH JAVA
- MIGRATING TO JAVA
- TECHNIQUES 101
- MODELING AND PATTERNS
- THE CONCEPTUAL MODEL: WHAT'S THE OBJECT?
- REFINING SKILLS FOR EXPRESSIVE CONCEPTUAL MODELS
- DISTRIBUTED OBSERVER CHAINS
- EVENT NOTIFIER: A PATTERN FOR EVENT NOTIFICATION
- ANALYSIS PATTERNS
- JAVA IN A DISTRIBUTED WORLD
- THREADS
- USER INTERFACES
- SECURITY
- TESTING
- PERFORMANCE
- REALITY CHECK
- INDEX
Summary
Objects are good. Patterns are good. Networks are good.
These statements have almost become IT axioms in the last few years. I'm not going to buck the trend here. Objects are indeed good. Networks and patterns help to make them even better. I'm going to show a relatively easy way to link these three things together.
Well designed object-oriented applications share a common topology (see Riel, A. Object-Oriented Design Heuristics. Addison-Wesley, 1996.) By topology I mean the natural features of an entity and their structural relationships. A well-planned object model will spread out the application logic within a system. Related data and behavior will be kept in logical, isolated units. Structuring applications in this way promotes reuse, facilitates comprehension, and minimizes the effects of change.
One side effect of partitioning a system in this way is the need for these “logical isolated units” to communicate with each other. Using controller classes to organize the communication is not a viable solution because it concentrates the system's intelligence in a single place. How can we share information without cluttering our design?
The Observer pattern (see Gamma, E., R. Helm, R. Johnson, and J. Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1995.) provides a possible answer to our question. In the applicability section of the pattern description we find that Observer is a good way to “notify other objects without making assumptions about who these objects are.
- Type
- Chapter
- Information
- More Java Gems , pp. 121 - 130Publisher: Cambridge University PressPrint publication year: 2000