Lecture thumbnail 0:01 / 1:13 In this section of the course.

We’re going to take a look at the mediator design pattern.

And this design pattern facilitates the communication between components by letting the components be

unaware 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 a classic example is this set of 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 that 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 referential

access to one another.

Stop Play Play Play Start Play information alert