Design patterns - Typescript

Mediator

Mediator facilitates communication between various components, so that, instead of them communicating dirrectly, they communicate through the mediator.

In the example below we have a Stock Exchange (mediator) that allows Brokers (components) to trade.
The example is oversimplified, that is why it is adviced to imagine this system to include thousand of brokers.

Loading...