Observer-Pattern (EN)

Concept

A pattern for event-driven communication between objects

Architecture

flowchart LR   A[Subject] -->|Notification| B[Observer 1]   A -->|Notification| C[Observer 2]   A -->|Notification| D[Observer N]   E[Client] -->|Registration/Unregistration| A 

In Context

  • Typically used together with the MVC architectural pattern
  • Related to: Publisher-Subscriber, Event-Driven Architecture
  • Example use: GUI programming (response to user input)
Quelle: AI Generated