The Observer pattern defines a one-to-many dependency dimana akeh obyek (observers) kasuwun notifikasi otomatis nalika obyek liyane (subject) ngowahi state. Iku ngaktifake decoupled, event-driven communication — luwes digunakake ing UIs, event systems, lan reactive programming.
Apa sing diduweni Observer pattern
OBSERVER → a SUBJECT maintains a list of OBSERVERS and NOTIFIES them on state changes:
→ observers SUBSCRIBE to the subject
→ when the subject changes → it notifies ALL subscribed observers automatically
→ observers react to the notification (update themselves)
→ one-to-many: one subject, many observers; DECOUPLED (subject doesn't know observer details)
