Javascript Design Patterns #7 - Mediator Pattern
Vložit
- čas přidán 16. 11. 2019
- What is the Mediator pattern?
The Mediator pattern provides central authority over a group of objects by controlling how these objects interact with each other. The "central" object is known as the 'mediator'. The mediator pattern is useful in scenarios where every object needs to be aware of any state change in any other object in the group.
📚Materials/References:
GitHub Code: github.com/pkellz/devsage/blo...
"Design Patterns Explained Simply" Ebook: payhip.com/b/MLtJ
🌎 Find Me Here:
Twitter: / realdevsage
Ebooks: payhip.com/devsage
Discord: / discord
Merch: cottonbureau.com/people/devsage
🤖 GitHub: github.com/pkellz/devsage/blob/master/DesignPatterns/Mediator.js
📕"Design Patterns Explained Simply" Ebook: payhip.com/b/MLtJ
💙 Twitter: twitter.com/realDevSage
📙 Ebooks: payhip.com/devsage
💥 Discord: discord.gg/BP8wPv6raA
Bro you’re underrated. Keep this format and bring more design pattern videos. It’s a great way to start out learning design patterns. You know how to separate the jargon from the actual concepts. Highly appreciate your efforts.
Thanks man
Great explanations. Thanks to you I used strategy pattern in my work and code became cleaner and better to read much more.
this is the cleanest way I've ever seen anyone explaining design patterns before amazing :)
Glad you think so!
Thank you for the video, I'm doing a js couse,whenever I don't understand something I come here,you make it more clear.
Good stuff - yes please more design pattern videos. Thanks!
Wow, it was an interesting explanation, imho the example with chatroom is convenient and maybe tend to be the best one :) Thx so much!
Your demostration is so much better than my paid course on Udemy on this topic! Thank you so much!
😁😁
I think this is the way I naturally think when writing code.
Great videos. Very concise and focused. Definitely subscribing!
Stumbled upon your pattern videos now. Great explanation with the examples. Nice
Glad you like them!
What a great explanation and example. Greetings from México 🇲🇽🇲🇽🇲🇽 !!
Thanks Marco!
I was about to ask if you doing more but I realised you dropped this yesterday 😅🔥👍🏾
Man you nailed it
Thank you
You're welcome
Great stuff, just bought your book. Great info here.
Appreciate it. My plan is to push it out in the next few days
I enjoyed this tutorial. I see myself making a vueJS app using this pattern and concept.
Appreciate you man
Appreciate your help!
No problem!
i before E except after C! Music to my ears lmao
Thanks for the video! Its time to.. Pub/Sub pattern!!
I like the PubSub a little more, its less coupled and easier to think about. Although this pattern is great for an actual chat system
Very good explanation as always !
Are you going to explain all design patterns from the GOF ?
If so, it'll be great if you could make a video about the fly weight patern in javascript.
Thanks again for all your videos. Short and well explained....perfect ! !
I probably won't do all of them because some patterns just aren't very suited for javascript, but I'll definitely consider the flyweight pattern for one of my future videos!
Thank you! You are a great teacher !
Hey DevSage!
I've got a question. What is the main difference between The Observer Pattern and The Mediator Pattern? When to use which? I've read in Addy Osmani's book, called ,,Javascript Design Patterns", they are very similar methods but I didn't get the point right when to use first or second pattern.
Thank you!
Question, why do you choose to use functions and add prototypes instead of creating classes? (I do a lot of python and am learning about node design patterns)
I suppose they could have been done either way. Ultimately, it's because the examples I used to learn these patterns for myself were written with functions and prototypes.
Thank you for the wonderful video. It helps a lot:-)
Can we make Chatroom members object to Array type
Yes I suppose you could. That might complicate things a little though
Chatroom is not doing some routing, aren't you supposed to use the chatroom members property to find the toMember?
Is this the design patterns for service registry for microservices ?
I don't know
Please explain stat pattern on web pages changing
Thank you
Hi to me in console.log from this result:
$ {fromMember.name} to $ {this.name}: $ {message}
it doesn't give me dialogues, as output, where I'm wrong.
thanks
Not sure. Compare your code to the code in the Github
I think you have missed to wrap with backtick ‘’
Pls more pattern
Really not a fan of your code formatting style but love your explanation of patterns :)