Design Patterns - Observer Pattern

Опубликовано: 24 Июль 2026
на канале: Web Dev Journey
325
16

The Gang of Four describe the proxy pattern as:
"Defining a one-to-many dependency between objects so that when one object changes state, all of its dependents are notified "and updated automatically."

********** Real Life Uses **********
It is heavily used in GUI toolkits and event listener. In java the button(subject) and onClickListener(observer) are modelled with observer pattern.

Social media, RSS feeds, email subscription in which you have the option to follow or subscribe and you receive latest notification.

All users of an app on play store gets notified if there is an update.

********** BOOKS **********
Design Patterns: Elements of Reusable Object-Oriented Software: https://amzn.to/2MuSVWb

********** GitHub **********
https://github.com/webdevjourneyWDJ/D...