O'Reilly logo

Java™ Design Patterns: A Tutorial by James W. Cooper

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required