Understanding The Visitor Design Pattern

  Рет қаралды 57,111

Ryan Schachte

Ryan Schachte

Күн бұрын

Please support me on Patreon: / thesimpleengineer
/ thesimpengineer / schachte
ryan-schachte.com
Don't forget to subscribe! ➨ Website -
➨ New Video! - • Docker Client, Images ...
➨ / the-simple-engineer-80...
➨ Github - github.com/schachte
---------------------------------------------------------------
Welcome to my Visitor Design Pattern Tutorial! This is the last part of my design pattern video tutorial.
The Visitor design pattern allows you to add methods to classes of different types without much altering to those classes. You can make completely different methods depending on the class used with this pattern.
With both the video and the code above you should be able to start using this pattern in your code easily.
Credit: www.javagists.com/java-visito...

Пікірлер: 164
@TheSimpleEngineer
@TheSimpleEngineer 5 жыл бұрын
Let me know what design patterns you want to learn!
@TheSimpleEngineer
@TheSimpleEngineer 5 жыл бұрын
@@dg10mcdos cool 🙂 I'll do that one next
@hinathahseen8643
@hinathahseen8643 5 жыл бұрын
Thanks for the above one. Double dispatch couldn't be simplified more.Can you t explain examples of Extension object and Template method design pattern:)
@mirazzaidi
@mirazzaidi 5 жыл бұрын
Can you do a decorator?
@deepankarsingh7230
@deepankarsingh7230 5 жыл бұрын
Can you please make a video on strategy design pattern?
@Nemecis313
@Nemecis313 4 жыл бұрын
I would like to understand the Mediator design pattern if possible. Thank you for this video!!
@mehmeterdem7581
@mehmeterdem7581 5 жыл бұрын
This is probably the best video on the net for this pattern with a perfect example.Thank you!
@piotrpieniak738
@piotrpieniak738 5 жыл бұрын
I'm so grateful for it, good job! I always struggle with theoretical explanations and definitions, so combining them with actual examples made it so much easier to understand.
@chiranjeevisaride8655
@chiranjeevisaride8655 3 жыл бұрын
The best explanation anyone can find on this planet. Absolutely loved it!!
@ilstam9942
@ilstam9942 5 жыл бұрын
Awesome explanation and helpful example! I hadn't realize before about the double dispatch problem. I really liked that you didn't over-explain things keeping it short and to the point. Also thumbs up for cutting out the tedious parts where you just paste code. Thank you!
@soumenadhikary4332
@soumenadhikary4332 3 жыл бұрын
This is one of the best explanations of double dispatch I have come across!
@YakimRachev
@YakimRachev 4 жыл бұрын
The greatest tutorial for the Visitor pattern I found so far! Thanks.
@prateeksingh4078
@prateeksingh4078 5 жыл бұрын
loved the way you explained it with an implementation made the video so much more intuitive!!
@rahulsaxena9103
@rahulsaxena9103 2 жыл бұрын
He has made the pattern as easy to understand as hard it is going through other explanations on the web. Amazing!!
@deepankarsingh7230
@deepankarsingh7230 5 жыл бұрын
Amazing explanation. I like discussions a lot when it cover the background as well like why something is needed, current limitations in some paradigm and ways to solve that. Thanks a lot for the video. :)
@fakhrshaheen3394
@fakhrshaheen3394 5 жыл бұрын
very well explained.it's really one of the most underrated patterns
@zizimouad8291
@zizimouad8291 2 жыл бұрын
THE only video explain this pattern in the right way ! explination, diagramme and exemple with code all are perfect
@speyck
@speyck Жыл бұрын
Gotta be the best explanation of the pattern I've seen yet. Thank you for making this free :)
@nikolaradovanovic4883
@nikolaradovanovic4883 2 жыл бұрын
Great content. Much cleaner than many of docs I read.
@herrgrillparzer
@herrgrillparzer 3 жыл бұрын
Such a clear explanation and great examples. Thank you so much for this 😊
@PrashantGangwar
@PrashantGangwar Жыл бұрын
I've seen lot of videos on this pattern but this is most real life understanding video on Visitor pattern, Thanks for this amazing video... luckily found this
@sohailiftikhar207
@sohailiftikhar207 3 жыл бұрын
Beautifully explained.
@samilozcelik8356
@samilozcelik8356 4 жыл бұрын
Thank you. Perfect explanation with a perfect example.
@tobechukwunwatu848
@tobechukwunwatu848 3 жыл бұрын
Concise!, Clear!! and Simple!!! Thank You!
@amitsamratmaurya3170
@amitsamratmaurya3170 3 жыл бұрын
Best content so far!! You won't need to read anything else after watching this.
@michaeljuergen4326
@michaeljuergen4326 3 жыл бұрын
Very good explenation, this is the Video I was searching for the whole time
@glenndify1
@glenndify1 3 жыл бұрын
One of the best explanation of the visitor pattern
@dhapategeetanjali741
@dhapategeetanjali741 3 жыл бұрын
I wonder all over the internet to find the best to learn visitor design pattern and finally landed here and writing comments middle of the video, This is an awesome video so far I came across. Buddy keep it up you are the best.. !!!!
@FernandoNavarro_1
@FernandoNavarro_1 3 жыл бұрын
Very clear presentation and illustrative code. Thanks
@Rastrigin
@Rastrigin 2 жыл бұрын
great job man, love your setup as well
@burakkirazli3759
@burakkirazli3759 3 жыл бұрын
This is the most clear explanation I have ever seen.
@bimarshsharma7556
@bimarshsharma7556 2 жыл бұрын
Thanks for the clear and straightforward explanation.
@TheFrogfather1
@TheFrogfather1 Жыл бұрын
Nice clear explanation. Thank you!
@MirekKrenc
@MirekKrenc 2 жыл бұрын
Very well explained. Thanks!
@nadiadima9449
@nadiadima9449 3 жыл бұрын
Very clearly and neatly done. Thank you!
@williamquintero3133
@williamquintero3133 3 жыл бұрын
Excelent bro... i've just spend a lot of time trying to understand this patterm. And you did it in just 30min :) thanks..
@itsnaafiess7193
@itsnaafiess7193 2 жыл бұрын
Very good explanation. So far the best explanation and presentation on this pattern and finally I got it understood. Thank you very much.
@whatever6223
@whatever6223 2 жыл бұрын
Excellent explanation. Thank you very much!
@lucykuo4769
@lucykuo4769 4 жыл бұрын
Finally found a great video for visitor pattern! Hope you can make more design pattern tutorials
@ambarishkapil8004
@ambarishkapil8004 3 жыл бұрын
This was very nicely explained. Thanks
@cursedkid25
@cursedkid25 5 жыл бұрын
I genuinely loved your video and your explanation
@yolokazinogantsho8111
@yolokazinogantsho8111 3 жыл бұрын
Great great great explanation. Totally understood! Big thanks
@reallylordofnothing
@reallylordofnothing Жыл бұрын
really good video. came here to understand rsql-parser visitor pattern. I can see that this pattern explains open closed principle very well
@csforlyfe4206
@csforlyfe4206 4 жыл бұрын
Very good explanation of the concept! Helped a lot!
@drewenia
@drewenia 4 жыл бұрын
The best video on the internet. Thanks for.
@jaydenhooper
@jaydenhooper Жыл бұрын
Excellent explanation!
@andreslipinski5922
@andreslipinski5922 4 жыл бұрын
Thank you for doing this. Really clear explanation.
@karanagarwal3091
@karanagarwal3091 5 жыл бұрын
Beautifully explained
@AlbertoGS1990
@AlbertoGS1990 5 жыл бұрын
You are the best explaining design patterns. You should make a single video for every single pattern in the book. Thanks a lot for your teach.
@gunjanchaudhary9716
@gunjanchaudhary9716 2 жыл бұрын
The best Explanation !
@simoncatteau2879
@simoncatteau2879 3 жыл бұрын
Very clear video!
@HassanBadir
@HassanBadir 4 жыл бұрын
damn, this is well explained, when I look for a new topic to study I usually run through multiple videos until I understand it completely, this time i watched the whole video once and got it on first time this was amazing thanks a lot man, big like!
@andrewprotasenya7469
@andrewprotasenya7469 3 жыл бұрын
thank you very much, I finally understood the essence of this pattern
@AnewbproMC
@AnewbproMC 5 жыл бұрын
Amazing video! Thanks for the explanation
@rezasaidafkan8698
@rezasaidafkan8698 3 жыл бұрын
Crisp! Good job!
@ArvindDevaraj1
@ArvindDevaraj1 4 жыл бұрын
very clear explanation of visitor pattern with real world examples
@luyandamsomi8402
@luyandamsomi8402 2 жыл бұрын
great job man, really appreciated💪👏
@aelafdev
@aelafdev 3 жыл бұрын
by far much cleaner explanation. visitor is mystrio no more. thank you
@saeedmirzaei1
@saeedmirzaei1 4 жыл бұрын
Excellent explanation. Thanks so much.
@deepakkeswani3241
@deepakkeswani3241 4 жыл бұрын
Super explanation of Visitor Design pattern.
@saurabhchaturvedi6982
@saurabhchaturvedi6982 3 жыл бұрын
Awesommest post on the internet on Visitor Design Pattern !! Understood everything in such a simple way that its gonna stuck in my mind forever !! Subscribed !! Thank you..may you have many more "Visitors" on your channel 😅🤟!
@TommyBoy7Heads
@TommyBoy7Heads 2 жыл бұрын
Legend.. thanks for the great explanation man.
@rohitupadhyay9964
@rohitupadhyay9964 4 жыл бұрын
Awesome tutorial, thanks very much.
@kankipatisaikumar
@kankipatisaikumar 3 жыл бұрын
@the simple engineer Great explanation, easy to memorize
@ivannav
@ivannav 4 жыл бұрын
Great job!
@jellyoful
@jellyoful 5 жыл бұрын
Brilliant explanation.
@agatalach2855
@agatalach2855 4 жыл бұрын
This is a great video. Super clear explanation, great example, and the whole video was really well done. Thanks so much for your work, it's really helped me understand the pattern and I am now going to go check out your channel for more content, which I'm sure will be as good :) thumbs up!
@ruixue6955
@ruixue6955 3 жыл бұрын
2:50 UML dia of Visitor Pattern 4:20 the original piece of hierarchy 6:50 why - single vs double dispatch 7:39 single dispatch 8:14 what single dispatch allows us to do 9:58 double dispatch: interaction of 2 objects 10:12 example 10:28 modify the interface: in Animal interface, add makeSound(Dog) and makeSound(Cat) 11:45 *compile error* due to not support on double dispatch
@usamakhawaja8571
@usamakhawaja8571 5 жыл бұрын
Just half way through the video, and I would like to say "Good Job". (y)
@Kavorka666
@Kavorka666 4 жыл бұрын
this is great video. I wish you would continue more on this playlist.
@atulsaxena4286
@atulsaxena4286 4 жыл бұрын
Very nice videos probably the best on the internet. Please do other patterns as well with the same kind of explanations you have done in these videos. Thanks.
@JoshuaKisb
@JoshuaKisb 4 жыл бұрын
Wow. awesome video. great explanation. thank you
@deltaphilip8611
@deltaphilip8611 3 жыл бұрын
Finally make sense. Knowing what to accomplish makes it easier to understand how to do it
@ravikumaralabaka472
@ravikumaralabaka472 4 жыл бұрын
Thanks for detailed explanation
@rolandsoftwareguy2515
@rolandsoftwareguy2515 2 жыл бұрын
Excellent explanation especially of the why. A lot of tutorials just go straight into the how. I think given the extensibility problem, I might have initially gone down the passing of delegate route or maybe another interface - but I guess this seems somewhat tidier. Note to any other C# Developers reading before watching, the video is still easy to follow. Well Done 👍🏾
@MrEthera
@MrEthera 4 жыл бұрын
This was amazing! A colleague of mine used this pattern without using "visitor" in the name. I understood the structure and how to use his design, but I didn't fully grasp everything that was going on or how he even came up with it. He mentioned visitor and here I am. Thanks for the concise but real world example.
@TheSimpleEngineer
@TheSimpleEngineer 4 жыл бұрын
Great to hear!
@dattatreykulkarni6472
@dattatreykulkarni6472 4 жыл бұрын
Good Job Bro!!!
@andres5709
@andres5709 2 жыл бұрын
i'm no kidding there's a job offer in play here, and I have to deliver a code using this very pattern and i couldn't get it before watching this amazing explanation of yours! thank you for time and help from Brazil!
@genovo
@genovo 3 жыл бұрын
Problem: 12:56 Solution: 28:00 Fantastic video!
@sv3167
@sv3167 3 жыл бұрын
Wow, pretty legit!! I understand!! Thanks a lot!
@adamblance3346
@adamblance3346 2 жыл бұрын
Thank you! So many other videos on this feel rushed and don't go into enough detail.
@tamilmanimuthusamy5506
@tamilmanimuthusamy5506 5 жыл бұрын
Very good explanation
@MrJonnis13
@MrJonnis13 3 жыл бұрын
Simply excellent explanation of this design pattern. As you said, this one is underestimated but it is super useful. Please consider doing some other design patterns, especially the "not easy" ones Thanks again for this video
@eliyahuspeyer1696
@eliyahuspeyer1696 Жыл бұрын
your wonderful! thank you!
@stephane3115
@stephane3115 5 жыл бұрын
great explanation!
@TheSimpleEngineer
@TheSimpleEngineer 5 жыл бұрын
Thanks, glad you enjoyed!
@kinvain
@kinvain 3 жыл бұрын
Really like your video. Especially that you extend fake Animal interface use case to something more realistic.
@ashrasmun1
@ashrasmun1 5 жыл бұрын
I would love to see constructive criticism from someone who disliked this video. I think it's unbelievably helpful, especially given that you explained the whole "dispatch" thing, which is not obvious at all for beginners. Thank you very much!
@TheSimpleEngineer
@TheSimpleEngineer 5 жыл бұрын
Thanks, glad you liked it!
@samitabbakh8409
@samitabbakh8409 Жыл бұрын
Really nice explanation. I hope you would do a complete playlist of all design patterns. It is a shame that you made only 3 design patterns.
@mohamedsleymi4318
@mohamedsleymi4318 Жыл бұрын
Wow thanks man
@rsdntevl
@rsdntevl 5 жыл бұрын
Thanks for the intuitive example! a larger font would be great
@allen0hu
@allen0hu 3 жыл бұрын
WTF this is so well explained! Thanks, saved my finals :)
@DigitomProductions
@DigitomProductions 4 жыл бұрын
Thanks for this video. Life saver :)
@krishnasagaralugubelli8752
@krishnasagaralugubelli8752 4 жыл бұрын
Thank you
@kushal800
@kushal800 Жыл бұрын
best video. love from india
@peacefulwater9689
@peacefulwater9689 3 жыл бұрын
very good video, explaining single vs double dispatch really cleared it up. The only thing I didn't like was the intro
@XxTonys555xX
@XxTonys555xX 3 жыл бұрын
thanks
@LemmeTellMe
@LemmeTellMe 5 жыл бұрын
Good job on the video, heads up though the intro music could be tuned down a bit since it feels a lot louder than the rest of the audio
@martinx3856
@martinx3856 4 жыл бұрын
Good job, nice voice
@mrowox
@mrowox 7 ай бұрын
This is really fantastic. Is it possible to combine this pattern with the Factory pattern for example to dynamically determing which credit card to use in a certain scenario
@mirazzaidi
@mirazzaidi 5 жыл бұрын
Great explanation! I am just wondering why you didn't overloaded the visit method in Visitor interface with Concrete element parameters and created 3 separate methods for each method.
@leepoking
@leepoking 2 жыл бұрын
Too good
@illosophycom
@illosophycom 5 жыл бұрын
Isn't this still tightly coupled though? If you get rid of the Bronze Card or add a Platinum card, you have to update your OfferVisitor interface and all of the classes that implement OfferVisitor right? That's still a maintenance nightmare. It seems like the problem wasn't solved but just relocated.
@TheSimpleEngineer
@TheSimpleEngineer 5 жыл бұрын
There will always be some coupling, but the amount is reduced as your class base grows large.
@256sks
@256sks 3 жыл бұрын
Thank you for good explanation. Your final implementation require small correction. Visitors classes should have overloaded method rather than different name for different CreditCard. Otherwise it will work without double dispatch.
@atamanson
@atamanson 4 жыл бұрын
Thanks for the awesome videos. Would you say Visitor pattern is suitable for basket/cart system ?
@AB-os3jy
@AB-os3jy 2 жыл бұрын
it would be a hit if you could do a series or video that puts together and deploys a multi platform mobile app. bonus if it has animation , audio and 3d capability.
Understanding The Factory Design Pattern
22:40
Ryan Schachte
Рет қаралды 18 М.
Understanding Dockerfiles From Scratch
18:52
Ryan Schachte
Рет қаралды 22 М.
Sigma Girl Past #funny #sigma #viral
00:20
CRAZY GREAPA
Рет қаралды 30 МЛН
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 49 МЛН
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 25 МЛН
Dependency Injection & Inversion of Control
11:00
Ryan Schachte
Рет қаралды 193 М.
IPv4, CIDR, and VPC Subnets Made Simple!
23:47
Ryan Schachte
Рет қаралды 196 М.
Why Use Design Patterns When Python Has Functions?
23:23
ArjanCodes
Рет қаралды 100 М.
The Visitor Design Pattern
11:39
Design Patterns Lectures
Рет қаралды 14 М.
Docker Client, Images and Containers
14:21
Ryan Schachte
Рет қаралды 25 М.
Design Patterns in Plain English | Mosh Hamedani
1:20:01
Programming with Mosh
Рет қаралды 1,3 МЛН
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 757 М.
Sigma Girl Past #funny #sigma #viral
00:20
CRAZY GREAPA
Рет қаралды 30 МЛН