This article describes the Mediator design pattern. This is a behavioral design pattern, a category of
design pattern used by software engineers, when writing computer programs.
This article describes the Mediator design pattern. This is a behavioral design pattern, a category of
design pattern used by software engineers, when writing computer programs.
This article describes the Mediator design pattern. This is a /li>
A Mediator is a
design pattern, used in software engineering, to communicate between parts within an application. It provides a unified interface.
It is defined as a
behavioral design pattern because messages can cause the program to behave differently, like actions resulting from an event message.
As programs grow in complexity, and more and more classes and relationships are added, it becomes harder to follow the chain of communication around the code. The mediator pattern attempts to centralize and standardize the methods and channels of communication
around the application, thus reducing complexity, enhancing readability and maintainability.
The mediator is especially useful in projects are built around the MVVM pattern, because it enables communication between separate and unrelated ViewModels, which may reside in different parts of the application (like separate windows), or from deep within
autogenerated controls (like in cells of DataGrid).