Forem

Cover image for Observer design pattern
Bizznessia.dev
Bizznessia.dev

Posted on

2

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)

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay