In this section of the course we're going to take a look at the mediate or design pattern and this design
pattern facilitates the communication between components by letting the components be aware of each
other's presence or absence in the system.
So the motivation for using this design pattern is basically the following essentially in typical systems
like for example a chat room your components may go in and out of the system at any time.
So the classic example is this set off participants in a chat room or for example the set of players
in some sort of online game.
So it makes no sense for the different participants to have direct references to one another because
those references can go dead at any time.
So the solution here is to have all of the components refer to some sort of central component the facilitates
communication and that component happens to be the mediator.
So the mediator design pattern necessitates a component that simply facilitates communication between
the different components.
Without them necessarily being aware of each other or having direct or preferential access to one another.