A Classic Example: GUI Mediators
You will probably most often encounter the MEDIATOR pattern when you develop an application with a GUI. Such applications tend to become thick, gathering code that you can refactor into other classes. The FlightPanel class in Chapter 4, Facade, initially performed three roles.
Before you refactored it, this class acted as a display panel, as a complete GUI application, and as a flight path calculator. After refactoring, the application that launches the flight panel display became simple, containing just a few lines of code. Large applications, however, can remain complex after this type of refactoring, even when they contain just the logic that creates components and that arranges for the components' interaction. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access