🏢 PL/I MONOLITH DIFFICULTY: Adept Behavioral

The Observer

Define a one-to-many dependency between objects so that when one changes state, all its dependents are notified and updated automatically.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Observer
ARCANUM SCHOOL: Divination // Notification
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// PLI PATTERN //
/* The Observer */
OBSERVER: PROC OPTIONS(MAIN);
   DCL 1 OBS BASED(O_PTR),
         2 UPDATE ENTRY(POINTER);
   PUT SKIP LIST('Notifying registered observers of state change...');
END OBSERVER;

Using arrays of pointers to observer structures, the mainframe broadcasts events without tight coupling to the listeners.

Runic Tags: #observer #event #notify