Episode
Design Patterns: Observer and Publish-Subscribe
This is the fourth of an eight part series where Robert is joined by Phil Japikse to discuss design patterns. A design pattern is a best practice you can use in your code to solve a common problem. In this episode, Phil demonstrates the Observer pattern. In this pattern, an object, called the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods. Phil also compares the Observer pattern to the Publish-Subscribe pattern.
Episodes in this series:
- Command/Memento patterns
- Strategy pattern
- Template Method pattern
- Observer/Publish-Subscribe patterns (this episode)
- Singleton pattern
- Factory patterns
- Adapter/Facade patterns
- Decorator pattern
Resources
This is the fourth of an eight part series where Robert is joined by Phil Japikse to discuss design patterns. A design pattern is a best practice you can use in your code to solve a common problem. In this episode, Phil demonstrates the Observer pattern. In this pattern, an object, called the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods. Phil also compares the Observer pattern to the Publish-Subscribe pattern.
Episodes in this series:
- Command/Memento patterns
- Strategy pattern
- Template Method pattern
- Observer/Publish-Subscribe patterns (this episode)
- Singleton pattern
- Factory patterns
- Adapter/Facade patterns
- Decorator pattern
Resources
Have feedback? Submit an issue here.