Skip to content

design-pattern-list/observer-pattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Observer Pattern

Type

The Observer Design Pattern is a behavioral pattern.

Description

The observer design pattern gives you the ability to trigger an operation in a class (the observer) when the observable class changes its state.

Use

  1. When a class needs to know when a another object its state changes.

Prevent

  1. From the need to implement a polling system (every x minutes, check for changes in object y).

Simple Structure

alt text

Advanced Structure

alt text

References

  1. https://refactoring.guru/design-patterns/observer

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages