🎉 Hooray! After 3 years of work, I've finally released the ebook on design patterns! Check it out »
Mediator

Mediator in Swift

Mediator is a behavioral design pattern that reduces coupling between components of a program by making them communicate indirectly, through a special mediator object.

The Mediator makes it easy to modify, extend and reuse individual components because they’re no longer dependent on the dozens of other classes.

Usage of the pattern in Swift

Complexity:

Popularity:

Usage examples: The most popular usage of the Mediator pattern in Swift code is facilitating communications between GUI components of an app. The synonym of the Mediator is the Controller part of MVC pattern.

Mediator in Other Languages

Design Patterns: Mediator in Java Design Patterns: Mediator in C# Design Patterns: Mediator in PHP Design Patterns: Mediator in Python Design Patterns: Mediator in Ruby Design Patterns: Mediator in TypeScript