filmov
tv
What's one benefit of the mediator design pattern?
Показать описание
What's one benefit of the mediator design pattern?
The mediator design pattern helps to decouple communication between different parts of your system.
In a hypothetical C# project, that would mean that you don't need to know about the type or the instance of the destination you want your message to go to. You don't really need to know anything concrete about the destination because you'll never have one module talk directly to another!
Instead, we route things through the mediator. The mediator has the responsibility of knowing how to take incoming messages and get them to the right destinations. This means that we use the mediator's API to communicate, and not necessarily the API of the destination directly.
Check out the full video:
----
📨 Sign up for my FREE email newsletter:
🗣️ Share with your network!
#designpatterns #mediator #designpattern #code
The mediator design pattern helps to decouple communication between different parts of your system.
In a hypothetical C# project, that would mean that you don't need to know about the type or the instance of the destination you want your message to go to. You don't really need to know anything concrete about the destination because you'll never have one module talk directly to another!
Instead, we route things through the mediator. The mediator has the responsibility of knowing how to take incoming messages and get them to the right destinations. This means that we use the mediator's API to communicate, and not necessarily the API of the destination directly.
Check out the full video:
----
📨 Sign up for my FREE email newsletter:
🗣️ Share with your network!
#designpatterns #mediator #designpattern #code