Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

souvik-pl/Observer_Design_Pattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

3 Commits

Repository files navigation

Observer Design Pattern

This repository accompanies the article on A Brief Introduction to Observer Pattern, providing insights into the Observer design pattern, its applications, and a practical code example. The main focus is on understanding the concept and implementing it in the context of a simple web page, specifically a profile page in an application.

Overview

The Observer pattern is a powerful software design pattern where an object, known as the subject, maintains a list of its dependents, called observers. The subject automatically notifies observers of any state changes, typically by invoking one of their methods. This pattern establishes a one-to-many dependency relationship, making it ideal for scenarios with numerous components dependent on specific events.

Use Case - Profile Page

The practical demonstration involves the creation of a simple web page, representing the profile page of an application. Users can load an image on this page, and upon successful loading, the image is displayed in two locations: the navbar and the profile page.

Running the Application

To run the application locally, follow these steps:

  1. Clone the repository: git clone [repository-url]
  2. Navigate to the project folder: cd [project-folder]
  3. Open file profile.html

Feel free to explore the code and use it as a reference while reading the article to gain a deeper understanding of the Observer pattern in action.

Happy coding! πŸš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /