Mediator Design Pattern Tutorial with Java Example for Beginners | Mediator Design Pattern Explained
Автор: codeonedigest
Загружено: 2022-12-29
Просмотров: 770
Mediator design pattern is one of the important and widely used behavioral design pattern. Mediator enables decoupling of objects by introducing a layer in between so that the interaction between objects happen via middle layer. If the objects interact with each other directly, the system components become tightly-coupled with each other. That adds to higher maintainability cost and difficult to extend. Mediator pattern focuses on providing a mediator between objects for communication and help in implementing loose-coupling between objects.
In Mediator design pattern, Objects no longer communicate directly with each other. Many times, in projects, the communication between components is complex. Due to this the logic between the components becomes very complex. Mediator pattern helps the objects to communicate in a disassociated manner, which leads to minimizing complexity.
Real World Example of Mediator Design Pattern: Air traffic controller is a great example of mediator pattern where the airport control room works as a mediator for communication between different flights. Mediator works as a router between objects and it can have its own logic to provide way of communication. Pilots of aircraft that approaching or departing the airport, don’t communicate directly with each other. Instead, they speak to an air traffic controller. Here ATC doesn’t need to control the whole flight but just to enforce constraints in the terminal area.
Where to use Mediator Design Pattern:
1. The Mediator pattern can be used when a set of objects communicate in a complex ways and resulting interdependencies.
2. The mediator pattern can be used where unable to reuse an object because that object has many interdependencies.
3. The mediator pattern can be used to boost the security in scenario when communication parties should not know each other and mediator will help them communicate and coordinate.
Benefits of Mediator Design Pattern:
1. These patterns reduces the sub-classing, since a mediator localizes the behaviour hence changing some behaviour requires us to subclass only the mediator.
2. Components become decoupled which allows us to vary and reuse components and mediator classes independently.
3. Also, add a layer of security so that components don't know each other.
** Chapter Timestamps **
0:00 Welcome to Mediator Design Pattern
0:31 Recap of Behavior Design Pattern
1:38 Introduction of Mediator Design Pattern
2:46 ATC an Example of Mediator Design Pattern
3:35 Java code Example of Mediator Design Pattern
9:41 Where to use Mediator Design Pattern
10:16 Advantages of Mediator Design Pattern
10:54 Summary of Mediator Design Pattern
11:41 Next Video on Memento Design Pattern
#mediatorpattern #mediatordesignpattern #designpattern
** Previous Video Links **
Previous Video (Behavior Design Patterns): • Complete Tutorial on Behavioral Design Pat...
** GITHUB Project **
https://github.com/codeonedigest/java...
** CHECK OUT OUR OTHER VIDEOS **
Spring Boot Microservice with MongoDB Project: • Spring Boot Microservice Project with Mong...
Prepare Docker file, Container and Build Image: • Docker Tutorial for Beginners | Create Doc...
** CHECK OUR PLAYLISTS **
Java Design Pattern Complete Tutorial • Java Design Patterns for Student | Gang of...
Spring Boot Complete Tutorial • Spring Boot Tutorial with Project Setup, A...
Docker Containers Complete Tutorial
• Cloud & Container Tutorial with AWS Cloud ...
** Acronyms **
OOP – Object Oriented Programming Languages
GOF – Gang of Four Design Pattern
COD – Code One Digest
** References ** https://www.tutorialspoint.com/design...
** ABOUT OUR CHANNEL **
CodeOneDigest is a youtube channel that produces videos on programming languages, cloud and container technologies, Software design principles, Java frameworks in English and Hindi languages.
Dosto, CodeOneDigest youtube channel pe aapko programming languages, container technology, cloud computing, software engineering se related videos milenge.
Check out our channel here:
/ @codeonedigest
Don’t forget to subscribe!
** OUR WEBSITE **
https://codeonedigest.wordpress.com/
** GET IN TOUCH **
Email us on codeonedigest@gmail.com
FOLLOW US ON SOCIAL - LIKE, SHARE & SUBSCRIBE
Get updates or reach out to Get updates on our Social Media Profiles!
Subscribe: https://bit.ly/3NeWQ8U
Youtube: / @codeonedigest
Twitter: / codeonedigest
Facebook: / codeonedigest
Instagram: / codeonedigest
Linkedin: / codeone-digest-10b418255
Reddit: / codeonedigest
Github: https://github.com/codeonedigest
Website: https://codeonedigest.wordpress.com/
Tumblr: https://www.tumblr.com/codeonedigest
Pinterest: / codeonedigest
spring boot, design patterns in java,
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: