Javascript Design Patterns #7 - Mediator Pattern

Sdílet
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

Komentáře • 46

  • @DevSage
    @DevSage  Před 3 lety +4

    🤖 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

  • @johnyepthomi892
    @johnyepthomi892 Před 2 lety +6

    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.

  • @rozacek
    @rozacek Před 10 měsíci

    Great explanations. Thanks to you I used strategy pattern in my work and code became cleaner and better to read much more.

  • @abdelrhmanshokr7546
    @abdelrhmanshokr7546 Před 2 lety +3

    this is the cleanest way I've ever seen anyone explaining design patterns before amazing :)

  • @fithurriague
    @fithurriague Před 3 lety +1

    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.

  • @rudijstar
    @rudijstar Před 4 lety +8

    Good stuff - yes please more design pattern videos. Thanks!

  • @GSySte
    @GSySte Před rokem

    Wow, it was an interesting explanation, imho the example with chatroom is convenient and maybe tend to be the best one :) Thx so much!

  • @Dhhddsisi
    @Dhhddsisi Před 2 lety +1

    Your demostration is so much better than my paid course on Udemy on this topic! Thank you so much!

  • @clingyking2774
    @clingyking2774 Před rokem

    I think this is the way I naturally think when writing code.

  • @diegodelatorre2868
    @diegodelatorre2868 Před 4 lety +4

    Great videos. Very concise and focused. Definitely subscribing!

  • @be2wa
    @be2wa Před 2 lety +1

    Stumbled upon your pattern videos now. Great explanation with the examples. Nice

  • @SocketsGuru
    @SocketsGuru Před 2 lety +1

    What a great explanation and example. Greetings from México 🇲🇽🇲🇽🇲🇽 !!

  • @codedealers7501
    @codedealers7501 Před 4 lety +1

    I was about to ask if you doing more but I realised you dropped this yesterday 😅🔥👍🏾

  • @mohamedeltaquee5236
    @mohamedeltaquee5236 Před 2 lety +1

    Man you nailed it
    Thank you

  • @robertp3596
    @robertp3596 Před 3 lety +1

    Great stuff, just bought your book. Great info here.

    • @DevSage
      @DevSage  Před 3 lety

      Appreciate it. My plan is to push it out in the next few days

  • @PhilanJames
    @PhilanJames Před 4 lety +1

    I enjoyed this tutorial. I see myself making a vueJS app using this pattern and concept.

  • @audioplatform6299
    @audioplatform6299 Před 3 lety +1

    Appreciate your help!

  • @perschonca
    @perschonca Před 2 lety +1

    i before E except after C! Music to my ears lmao

  • @andreasdevjs298
    @andreasdevjs298 Před 4 lety +2

    Thanks for the video! Its time to.. Pub/Sub pattern!!

  • @Cognitoman
    @Cognitoman Před 4 lety +1

    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

  • @jeanmarcpourchel307
    @jeanmarcpourchel307 Před 4 lety +1

    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 ! !

    • @DevSage
      @DevSage  Před 4 lety

      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!

  • @nafisnawalnahiyan5032
    @nafisnawalnahiyan5032 Před 4 lety +4

    Thank you! You are a great teacher !

  • @nenozidic1549
    @nenozidic1549 Před 2 lety

    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!

  • @robertp3596
    @robertp3596 Před 3 lety +1

    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)

    • @DevSage
      @DevSage  Před 3 lety

      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.

  • @manibharathipattilingam3582

    Thank you for the wonderful video. It helps a lot:-)
    Can we make Chatroom members object to Array type

    • @DevSage
      @DevSage  Před 3 lety

      Yes I suppose you could. That might complicate things a little though

  • @aldwincinco1792
    @aldwincinco1792 Před rokem

    Chatroom is not doing some routing, aren't you supposed to use the chatroom members property to find the toMember?

  • @theotherme9965
    @theotherme9965 Před 2 lety +1

    Is this the design patterns for service registry for microservices ?

  • @mohamedeltaquee5236
    @mohamedeltaquee5236 Před 2 lety

    Please explain stat pattern on web pages changing
    Thank you

  • @giampieropagliara1896
    @giampieropagliara1896 Před 4 lety +1

    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

  • @Tony.Nguyen137
    @Tony.Nguyen137 Před měsícem +1

    Pls more pattern

  • @anthonybendeler947
    @anthonybendeler947 Před 3 lety +1

    Really not a fan of your code formatting style but love your explanation of patterns :)