DEV Community

Cover image for Observer design pattern
HeyBaldur
HeyBaldur

Posted on

Observer design pattern

Observer is a behavioral design pattern that allows some objects to notify other objects about changes in their state.

Usage examples: The Observer pattern is pretty common in C# code, especially in the GUI components. It provides a way to react to events happening in other objects without coupling to their classes.

Identification: The pattern can be recognized by subscription methods, that store objects in a list and by calls to the update method issued to objects in that list.

Check how to implement Observer Design Pattern in https://github.com/HeyBaldur/ObserverDesignPattern

Top comments (0)