Mediator Design Pattern

preview_player
Показать описание

Welcome to my Mediator Design Pattern Tutorial! The Mediator design pattern is used to handle communication between related objects (Colleagues). All communication is handled by a Mediator Object and the Colleagues don't need to know anything about each other to work together.

The Gang of Four description: Allows loose coupling by encapsulating the way disparate sets of objects interact and communicate with each other.  Allows for the actions of each object set to vary independently of one another.
Рекомендации по теме
Комментарии
Автор

Thank you :) Yes, design patterns are learned through practice. When a programmer gets to the point in which they begin studying topics like patterns, refactoring, OOD, etc. they have to become an artist rather then a rule follower. Most programmers never progress to that point. Anyone can paint by numbers, but great programmers expand their canvas through practice. Just my opinion

derekbanas
Автор

I have a very different educational background and I had serious doubts when I took the software design patterns course last semester. Your videos really helped me to understand design patterns and pass the course. Thanks a lot.

ozgunozankilic
Автор

hey, teacher Derek. I have finished all your design pattern tutorials today, it is really helpful. 

bryantkong
Автор

Very nice tutorial, this is ever the best video tutorial covering such confusing subject for software developers.

hurricanos
Автор

This video deserves like even for Colleagues classes names))

StrangerSaret
Автор

I have watched SooooOoo many of your videos now that "Well, hello internet!" and "please leave any questions or comments in the comments' section below: otherwise till next time." are now firmly ingrained in the speech centers of my brain (a bit like ghosting/retention of a menu on a plasma TV screen). I love it though!

sunmustbedestroyed
Автор

Hi Derek, a thing about shortcuts. In eclipse, the getter/setter methods and constructor can be created in a single click by placing the mouse inside the class body, right-click->source->Generate Getters and Setters and right-click->source->Generate Constructor using fields. I am sure you must be aware of those, but if included in your videos, other viewers too can learn.

smuralimohan
Автор

Many of these Design Patterns are so similar that its easy to get confused :)

herp_derpingson
Автор

Hi Derek! Thank you so much. I cannot tell you how much your tutorials have helped me :)

sharathkumar
Автор

You are correct that String.equals should be used, but == works in this situation because the == operator checks whether the references to the objects are equal.

derekbanas
Автор

You're very welcome :) I only do this because you guys have been so nice to me.

derekbanas
Автор

I'm so grateful for your channel! It's a really nice thing to see someone use examples outside of the bullshit todo app stuff.

noherczeg
Автор

I see Mediator patter as basically dependency inversion principle

usmansbk
Автор

Thank you very much. I'm glad you're finding it useful :)

derekbanas
Автор

Yes I should do an eclipse shortcut video. I try to avoid doing them only because I can never count on people seeing past tutorials. I try to make self contained videos whenever possible.

derekbanas
Автор

Thank you :) I'm glad you enjoy them. Yes you are correct it would be bad to eliminate that. At the time I deleted it just to get it out of the way.

derekbanas
Автор

I have that tutorial in the works along with Spring, Hibernate and much more. I'll see what I can sneak in while I make my Android / Games / C tutorial. Thanks for the compliments :)

derekbanas
Автор

If you made it all the way to the design patterns tutorials youre ready for Android. The only thing that seems to confuse people is the heavy use of the MVC pattern. If you're comfortable with that you shouldn't have any problems. Feel free to ask me questions

derekbanas
Автор

In this pattern - wouldn't you need to make your Mediator a singleton? BTW - love these. It's like tutorials for programmers.

jamiemarshall
Автор

Whats the use of colleguecode, seems to know who is the source but i haven't seen it is used. Basically how it will stop notifying the source.

subhashkonda