Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Mediator pattern
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{confused|Broker pattern}} {{short description|Software architecture design pattern}} In [[software engineering]], the '''mediator pattern''' defines an object that [[Encapsulation (computer programming)|encapsulates]] how a set of objects interact. This pattern is considered to be a [[behavioral pattern]] due to the way it can alter the program's running behavior. In object-oriented programming, programs often consist of many [[class (computer science)|classes]]. [[Business logic]] and [[computation]] are distributed among these classes. However, as more classes are added to a program, especially during [[Software maintenance|maintenance]] and/or [[refactoring]], the problem of [[communication]] between these classes may become more complex. This makes the program harder to read and maintain. Furthermore, it can become difficult to change the program, since any change may affect code in several other classes. With the mediator pattern, communication between objects is encapsulated within a '''mediator object'''. Objects no longer communicate directly with each other, but instead communicate through the mediator. This reduces the dependencies between communicating objects, thereby reducing [[Coupling (computer programming)|coupling]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)