<<< Observer Structure | Index | Observer Sample >>> |
The observer pattern is often associated with the Model-View-Controller, or MVC paradigm.
In MVC, the observer pattern is used between the model and the view.
Modification in the model triggers notifications sent to the view observers.
For example, Java Swing is issuing change notifications to its views via the PropertyChangeNotification mechanism.
Model classes (Java beans) behave as Subjects.
View classes, associated with visible items, behave as Observers.
When changes are made to the model, the views are updated accordingly.
<<< Observer Structure | Index | Observer Sample >>> |