From 9088a415db91ac4fbb808b4789edd8b801b1257a Mon Sep 17 00:00:00 2001 From: Miguel <159189630+MiguelAntonioRS@users.noreply.github.com> Date: Mon, 20 Oct 2025 12:32:28 -0400 Subject: [PATCH] docs: add real-world example to Observer pattern README --- observer/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/observer/README.md b/observer/README.md index 6b8a700771f3..ade8458ccde9 100644 --- a/observer/README.md +++ b/observer/README.md @@ -209,3 +209,10 @@ Trade-offs: * [Head First Design Patterns: Building Extensible and Maintainable Object-Oriented Software](https://amzn.to/49NGldq) * [Pattern-Oriented Software Architecture Volume 1: A System of Patterns](https://amzn.to/3xZ1ELU) * [Refactoring to Patterns](https://amzn.to/3VOO4F5) + +## Real-World Example + +The Observer pattern is widely used in event-driven architectures. +For instance, in Java Swing or JavaFX applications, UI components can register listeners +to react to user actions without tightly coupling the business logic to the interface. +This makes the system more modular and easier to extend.