Observer Pattern
The Observer pattern is a behavioral design pattern in which an object (the subject) maintains a list of dependents (observers) and automatically notifies them of any state changes, typically by calling a method on each observer.
10 resources across 4 libraries
Glossary Terms(2)
Observer Pattern
The Observer pattern is a behavioral design pattern in which an object (the subject) maintains a list of dependents (observers) and automatically notifies them…
Strategy Pattern
The Strategy pattern is a behavioral design pattern that defines a family of interchangeable algorithms, encapsulates each one behind a common interface, and l…
Study Notes(2)
Observer Pattern
The Observer pattern lets a Subject notify a dynamic list of Observers automatically whenever its state changes, decoupling event producers from consumers.
Observer Pattern
A behavioral pattern where a subject maintains a list of observers and notifies them automatically of any state changes.
Cheat Sheets(1)
Interview Questions(5)
What is the Observer Pattern?
The Observer pattern defines a one-to-many dependency where a subject notifies a list of registered observers automatically whenever its state changes.
What is the MVC Pattern?
MVC (Model-View-Controller) is an architectural pattern that separates an application into three interconnected parts: the Model holds data and business logic,…
Observer vs Pub/Sub Pattern
The Observer pattern is a direct, in-process relationship where a Subject holds references to its Observers and notifies them synchronously, while Publish/Subs…
What is Event-Driven OOP Design?
Event-driven OOP design is a style where objects communicate by publishing and reacting to events rather than calling each other directly, so a source object f…
What is a Listener Interface?
A listener interface is a contract, usually with one or a small number of methods, that a class implements so it can be registered with an event source and be…