Chapter 20. The Mediator Pattern
When a program consists of a number of isolated classes, the logic and computation is divided among these classes. However, as more of these isolated classes are developed in the program, communication between them becomesmore complex. The more that each class needs to know about themethods ofanother class, the more tangled the class structure can become, therebymaking the program harder to read and harder to maintain.Further, itcan become difficult to change the program, since any changemight affect code in several other classes. The Mediator pattern addresses this problem by promoting looser coupling between these classes. Itaccomplishes this by beingthe only class that has detailed knowledge of themethods of ...
Get Java™ Design Patterns: A Tutorial now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.