The Observer Pattern, in the Real World
The Observer Pattern defines a one-to-many dependency between objects so that when one object changes state, all of its dependents are notified and updated automatically. Being Loosely Coupled - Subjects and observers are "loosely coupled"They interact,but have little knowledge of each other. - Subject only knowsThe observer implements a specific interface.Does not need to know concrete class or..
Java
2017. 4. 28. 17:29