ashandoak / pattern-library

A multi-language library containing implementations of common software design and architecture patterns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DGL 104 Pattern Library

A multi-language library containing implementations of common software design and architecture patterns

Documentation Table of Contents

Library Table of Contents

  • [Model View ViewModel](Kaia-pattern-library-main/patterns/Architectual/Model View ViewModel (MVVM))
  • [Model View Controller](Kaia-pattern-library-main/patterns/Architectual/Model View Controller (MVC)

Definition of Observer Pattern

The observer pattern is a behavioral design pattern often used in software development.

The purpose of the observer pattern is to establish a one-to-many dependency between objects. An object known as the subject maintains a list of it's dependents, called observers. The subject automatically notifies these observers of any state changes it undergoes, typically achieved by invoking one of their methods.

This pattern is often employed in software systems to ensure consistency among multiple components or to notify interested parties about specific events.

As an example, consider a scenario using the analogy of a publisher/subscriber relationship. In this analogy, the publisher acts as the subject, while the subscribers represent the observers. Whenever a significant event occurs to the publisher, it notifies the subscribers by invoking specific notification methods on their objects. This process ensures that subscribers are quickly informed of important updates.

References

Design Patterns and Refactoring. (n.d.). Sourcemaking.com. https://sourcemaking.com/design_patterns/observer

Refactoring Guru. (2014). Observer. Refactoring.guru. https://refactoring.guru/design-patterns/observer

Observer pattern. (2022, November 13). Wikipedia. https://en.wikipedia.org/wiki/Observer_pattern#:~:text=In%20software%20design%20and%20engineering

Definition of Singelton Pattern

References

Articles / Websites

Contributions

About

A multi-language library containing implementations of common software design and architecture patterns


Languages

Language:Dart 44.3%Language:JavaScript 17.5%Language:Java 15.2%Language:Kotlin 14.6%Language:Lua 8.4%