SlideShare une entreprise Scribd logo
1  sur  10
Mediator pattern
Intent
● Define an object that encapsulates how a set of
objects interact.
● Design an intermediary to decouple many
peers.
● Promote the many-to-many relationships
between interacting peers
Problem
● dependencies between the potentially reusable
pieces demonstrates the "spaghetti code"
phenomenon.
Motivation
● By consolidating all interaction in a single class,
we can regain elegance and reusability.
UML
Examples
Pros & Cons
Pros:
● Decouples colleagues, which facilitates independent
variations of the colleague and mediator classes.
● Simplifies protocol by replacing many-to-many interaction
with one-to-one interaction
Cons:
● Reducing the complexity of Colleagues increases
the complexity of the Mediator itself.
Related patterns
● Observer: the Mediator class may be
implemented using an Observer
● Facade: is similar to a Mediator, but with one-
way communication from the Facade to its
subsystem classes..
Mediator

Contenu connexe

Tendances

The visitor design pattern
The visitor design patternThe visitor design pattern
The visitor design patternSamnang Chhun
 
Sofwear deasign and need of design pattern
Sofwear deasign and need of design patternSofwear deasign and need of design pattern
Sofwear deasign and need of design patternchetankane
 
Javascript design patterns
Javascript design patternsJavascript design patterns
Javascript design patternsGomathiNayagam S
 
Design Pattern For C# Part 1
Design Pattern For C# Part 1Design Pattern For C# Part 1
Design Pattern For C# Part 1Shahzad
 
Advanced OOP - Laws, Principles, Idioms
Advanced OOP - Laws, Principles, IdiomsAdvanced OOP - Laws, Principles, Idioms
Advanced OOP - Laws, Principles, IdiomsClint Edmonson
 
Object Oriented Principles
Object Oriented PrinciplesObject Oriented Principles
Object Oriented PrinciplesEmprovise
 
Java design patterns
Java design patternsJava design patterns
Java design patternsShawn Brito
 
PATTERNS04 - Structural Design Patterns
PATTERNS04 - Structural Design PatternsPATTERNS04 - Structural Design Patterns
PATTERNS04 - Structural Design PatternsMichael Heron
 
Software Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural PatternsSoftware Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural PatternsSergey Aganezov
 
Jump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design PatternJump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design PatternNishith Shukla
 
Design pattern composite 20120413 joncash 01
Design pattern composite 20120413 joncash 01Design pattern composite 20120413 joncash 01
Design pattern composite 20120413 joncash 01LearningTech
 
Design Patterns - 03 Composite and Flyweight Pattern
Design Patterns - 03 Composite and Flyweight PatternDesign Patterns - 03 Composite and Flyweight Pattern
Design Patterns - 03 Composite and Flyweight Patterneprafulla
 

Tendances (20)

The visitor design pattern
The visitor design patternThe visitor design pattern
The visitor design pattern
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Sofwear deasign and need of design pattern
Sofwear deasign and need of design patternSofwear deasign and need of design pattern
Sofwear deasign and need of design pattern
 
Javascript design patterns
Javascript design patternsJavascript design patterns
Javascript design patterns
 
Design Pattern For C# Part 1
Design Pattern For C# Part 1Design Pattern For C# Part 1
Design Pattern For C# Part 1
 
Advanced OOP - Laws, Principles, Idioms
Advanced OOP - Laws, Principles, IdiomsAdvanced OOP - Laws, Principles, Idioms
Advanced OOP - Laws, Principles, Idioms
 
Object Oriented Principles
Object Oriented PrinciplesObject Oriented Principles
Object Oriented Principles
 
Java design patterns
Java design patternsJava design patterns
Java design patterns
 
Visitor pattern
Visitor patternVisitor pattern
Visitor pattern
 
Composite Design Pattern
Composite Design PatternComposite Design Pattern
Composite Design Pattern
 
PATTERNS04 - Structural Design Patterns
PATTERNS04 - Structural Design PatternsPATTERNS04 - Structural Design Patterns
PATTERNS04 - Structural Design Patterns
 
Software Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural PatternsSoftware Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural Patterns
 
Jump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design PatternJump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design Pattern
 
OOP design patterns
OOP design patternsOOP design patterns
OOP design patterns
 
Oop concepts
Oop conceptsOop concepts
Oop concepts
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Design pattern composite 20120413 joncash 01
Design pattern composite 20120413 joncash 01Design pattern composite 20120413 joncash 01
Design pattern composite 20120413 joncash 01
 
Bridge pattern
Bridge patternBridge pattern
Bridge pattern
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
Design Patterns - 03 Composite and Flyweight Pattern
Design Patterns - 03 Composite and Flyweight PatternDesign Patterns - 03 Composite and Flyweight Pattern
Design Patterns - 03 Composite and Flyweight Pattern
 

En vedette

Observer Pattern
Observer PatternObserver Pattern
Observer PatternAkshat Vig
 
Scalable JavaScript Design Patterns
Scalable JavaScript Design PatternsScalable JavaScript Design Patterns
Scalable JavaScript Design PatternsAddy Osmani
 
Lucky Crystal Collections
Lucky Crystal CollectionsLucky Crystal Collections
Lucky Crystal CollectionsJoy Lee
 
Cruise celebrity eclipse algemene informatie
Cruise celebrity eclipse   algemene informatieCruise celebrity eclipse   algemene informatie
Cruise celebrity eclipse algemene informatieLuc De Smedt
 
Scheepsbezoek queen elizabeth 2015
Scheepsbezoek queen elizabeth 2015Scheepsbezoek queen elizabeth 2015
Scheepsbezoek queen elizabeth 2015Luc De Smedt
 
Kauri Cliffs Golf Course Yardage Chart
Kauri Cliffs Golf Course Yardage Chart Kauri Cliffs Golf Course Yardage Chart
Kauri Cliffs Golf Course Yardage Chart Paul Thornton
 
PSYCHO COMIC SLIDES
PSYCHO COMIC SLIDESPSYCHO COMIC SLIDES
PSYCHO COMIC SLIDESLillian June
 
Epc assignment 1 photo blog
Epc assignment 1 photo blogEpc assignment 1 photo blog
Epc assignment 1 photo blogLillian June
 
Wynn energy resources and agriculture
Wynn energy resources  and agricultureWynn energy resources  and agriculture
Wynn energy resources and agriculturePeter Wynn
 
Offshore manufacturing
Offshore manufacturingOffshore manufacturing
Offshore manufacturingCrossprof.com
 
0527 asus cloud day 開放。引領數位內容進軍國際 – 華碩雲端市集
0527 asus cloud day 開放。引領數位內容進軍國際 – 華碩雲端市集0527 asus cloud day 開放。引領數位內容進軍國際 – 華碩雲端市集
0527 asus cloud day 開放。引領數位內容進軍國際 – 華碩雲端市集ASUSCloud
 
Disruptive businesses
Disruptive businessesDisruptive businesses
Disruptive businessesCrossprof.com
 

En vedette (20)

Memento pattern
Memento patternMemento pattern
Memento pattern
 
Observer Pattern
Observer PatternObserver Pattern
Observer Pattern
 
Observer pattern
Observer patternObserver pattern
Observer pattern
 
Scalable JavaScript Design Patterns
Scalable JavaScript Design PatternsScalable JavaScript Design Patterns
Scalable JavaScript Design Patterns
 
Lucky Crystal Collections
Lucky Crystal CollectionsLucky Crystal Collections
Lucky Crystal Collections
 
Cruise celebrity eclipse algemene informatie
Cruise celebrity eclipse   algemene informatieCruise celebrity eclipse   algemene informatie
Cruise celebrity eclipse algemene informatie
 
Osha assig.
Osha assig.Osha assig.
Osha assig.
 
Scheepsbezoek queen elizabeth 2015
Scheepsbezoek queen elizabeth 2015Scheepsbezoek queen elizabeth 2015
Scheepsbezoek queen elizabeth 2015
 
Indi go airlines
Indi go airlinesIndi go airlines
Indi go airlines
 
Kauri Cliffs Golf Course Yardage Chart
Kauri Cliffs Golf Course Yardage Chart Kauri Cliffs Golf Course Yardage Chart
Kauri Cliffs Golf Course Yardage Chart
 
SISTEMA NERVIOSO
SISTEMA NERVIOSOSISTEMA NERVIOSO
SISTEMA NERVIOSO
 
PSYCHO COMIC SLIDES
PSYCHO COMIC SLIDESPSYCHO COMIC SLIDES
PSYCHO COMIC SLIDES
 
ECONS REPORT
ECONS REPORTECONS REPORT
ECONS REPORT
 
Private Label
Private LabelPrivate Label
Private Label
 
Charter airline
Charter airlineCharter airline
Charter airline
 
Epc assignment 1 photo blog
Epc assignment 1 photo blogEpc assignment 1 photo blog
Epc assignment 1 photo blog
 
Wynn energy resources and agriculture
Wynn energy resources  and agricultureWynn energy resources  and agriculture
Wynn energy resources and agriculture
 
Offshore manufacturing
Offshore manufacturingOffshore manufacturing
Offshore manufacturing
 
0527 asus cloud day 開放。引領數位內容進軍國際 – 華碩雲端市集
0527 asus cloud day 開放。引領數位內容進軍國際 – 華碩雲端市集0527 asus cloud day 開放。引領數位內容進軍國際 – 華碩雲端市集
0527 asus cloud day 開放。引領數位內容進軍國際 – 華碩雲端市集
 
Disruptive businesses
Disruptive businessesDisruptive businesses
Disruptive businesses
 

Similaire à Mediator

Object Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshopObject Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshopMohammad Shawahneh
 
Design Patterns Part1
Design Patterns  Part1Design Patterns  Part1
Design Patterns Part1Tom Chen
 
Grasp oose week 14.pdf
Grasp oose week 14.pdfGrasp oose week 14.pdf
Grasp oose week 14.pdfNaveedChughtai
 
Design Principles to design Patterns
Design Principles to design PatternsDesign Principles to design Patterns
Design Principles to design PatternsFaizan Haider
 
Architecture and design
Architecture and designArchitecture and design
Architecture and designhimanshu_airon
 
Single Responsibility Principle
Single Responsibility PrincipleSingle Responsibility Principle
Single Responsibility PrincipleBADR
 
Behavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanBehavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanPriyanka Pradhan
 
what is differance between abstract class and interface ppt
what is differance between abstract class and interface pptwhat is differance between abstract class and interface ppt
what is differance between abstract class and interface pptmanojsharma469262
 
Advanced Programming _Abstract Classes vs Interfaces (Java)
Advanced Programming _Abstract Classes vs Interfaces (Java)Advanced Programming _Abstract Classes vs Interfaces (Java)
Advanced Programming _Abstract Classes vs Interfaces (Java)Professor Lili Saghafi
 
Share Discovering the Power of Object-Oriented Programming 🔍💪
Share Discovering the Power of Object-Oriented Programming 🔍💪Share Discovering the Power of Object-Oriented Programming 🔍💪
Share Discovering the Power of Object-Oriented Programming 🔍💪parichehresmailian1
 
From Good to SOLID: How to become a better PHP developer
From Good to SOLID: How to become a better PHP developerFrom Good to SOLID: How to become a better PHP developer
From Good to SOLID: How to become a better PHP developerKaterina Trajchevska
 
Software architecture
Software architectureSoftware architecture
Software architectureInam Soomro
 
Lecture 4-oop class diagram
Lecture 4-oop class diagramLecture 4-oop class diagram
Lecture 4-oop class diagramktuonlinenotes
 
Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questionsjinaldesailive
 
Boston Startup School - OO Design
Boston Startup School - OO DesignBoston Startup School - OO Design
Boston Startup School - OO DesignBryan Warner
 

Similaire à Mediator (20)

Object Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshopObject Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshop
 
Design Patterns Part1
Design Patterns  Part1Design Patterns  Part1
Design Patterns Part1
 
Grasp oose week 14.pdf
Grasp oose week 14.pdfGrasp oose week 14.pdf
Grasp oose week 14.pdf
 
Design Principles to design Patterns
Design Principles to design PatternsDesign Principles to design Patterns
Design Principles to design Patterns
 
Agile cards
Agile cardsAgile cards
Agile cards
 
Unified Modelling Language
Unified Modelling Language Unified Modelling Language
Unified Modelling Language
 
Architecture and design
Architecture and designArchitecture and design
Architecture and design
 
Mediator.pptx
Mediator.pptxMediator.pptx
Mediator.pptx
 
Concepts of oops
Concepts of oopsConcepts of oops
Concepts of oops
 
Single Responsibility Principle
Single Responsibility PrincipleSingle Responsibility Principle
Single Responsibility Principle
 
Behavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanBehavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka Pradhan
 
what is differance between abstract class and interface ppt
what is differance between abstract class and interface pptwhat is differance between abstract class and interface ppt
what is differance between abstract class and interface ppt
 
Advanced Programming _Abstract Classes vs Interfaces (Java)
Advanced Programming _Abstract Classes vs Interfaces (Java)Advanced Programming _Abstract Classes vs Interfaces (Java)
Advanced Programming _Abstract Classes vs Interfaces (Java)
 
Share Discovering the Power of Object-Oriented Programming 🔍💪
Share Discovering the Power of Object-Oriented Programming 🔍💪Share Discovering the Power of Object-Oriented Programming 🔍💪
Share Discovering the Power of Object-Oriented Programming 🔍💪
 
From Good to SOLID: How to become a better PHP developer
From Good to SOLID: How to become a better PHP developerFrom Good to SOLID: How to become a better PHP developer
From Good to SOLID: How to become a better PHP developer
 
Software architecture
Software architectureSoftware architecture
Software architecture
 
Lecture 4-oop class diagram
Lecture 4-oop class diagramLecture 4-oop class diagram
Lecture 4-oop class diagram
 
Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questions
 
Mca 504 dotnet_unit4
Mca 504 dotnet_unit4Mca 504 dotnet_unit4
Mca 504 dotnet_unit4
 
Boston Startup School - OO Design
Boston Startup School - OO DesignBoston Startup School - OO Design
Boston Startup School - OO Design
 

Dernier

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Dernier (20)

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

Mediator

  • 2. Intent ● Define an object that encapsulates how a set of objects interact. ● Design an intermediary to decouple many peers. ● Promote the many-to-many relationships between interacting peers
  • 3. Problem ● dependencies between the potentially reusable pieces demonstrates the "spaghetti code" phenomenon.
  • 4. Motivation ● By consolidating all interaction in a single class, we can regain elegance and reusability.
  • 5. UML
  • 7.
  • 8. Pros & Cons Pros: ● Decouples colleagues, which facilitates independent variations of the colleague and mediator classes. ● Simplifies protocol by replacing many-to-many interaction with one-to-one interaction Cons: ● Reducing the complexity of Colleagues increases the complexity of the Mediator itself.
  • 9. Related patterns ● Observer: the Mediator class may be implemented using an Observer ● Facade: is similar to a Mediator, but with one- way communication from the Facade to its subsystem classes..