You are the exact reason why I continue to make these videos. Thousands of people have taken their time to write the kindest messages to me. When I was making terrible videos many of you reached out kindly and taught me how to get better. I wouldn't be doing this without your kindness and help. I'll do my best to live up to the compliments I receive :)
I've read a number of different design patterns books, I've sat through University Lectures and now I sit here studying for my Object Oriented Software Design exam by watching your Design Pattern videos. In each video, you have explained the concepts better than every text and every lecture. You deserve an award. If you accept paypal donations, I will gladly donate.
Wow thank you for the wonderful compliment :) There is no need to donate. I just ask if you think someone would benefit from my videos that you tell them about them. You're very welcome.
@@derekbanas Youre.. awesome... people like me confusing about this stuff... i read a lot of article but thats not enough.... but your video is perfect, 100% understood... i promise if i had a job .. i will donate to your patreon account...
5 years later and nothing changed. Spent half a semester in class and didn't quite get it. Watched all tutorials for Design Patterns and everything makes sense. Thank you
@@derekbanas well, to complete the complements, i watched, matlab, arduino, uml, java (94 vids), design pattern, and soon anything related to swift and android, also code refactoring and so on, i have actually a list of 30 course you provide that i will finish asap, literally, what i learn is 90% because of you, thanks Mr. Derek :)
You're very welcome :) When I make tutorials I use normally the top 3 to 5 books and at least that many online tutorials along with notes I've taken over the years. I figure that way I'll be certain to cover everything. The GOF book is considered to be the best book on patterns, but it definitely isn't the most useable so I use the best parts of every book. I'm glad it helped
This video was the first time I was taught Visitor pattern, and I feel like I really learned it well. Nicely done! Your Factory Pattern really helped me out for a game project I'm doing in school. I learn better from your videos than from my class!
Hey Derek. I've just finished your entire design patterns series. Thank you for this. They covered this stuff in university but I finally feel like I get it now.
Digged my way through the whole series. Several saturdays well spend! Amazing how I only discovered this channel 10 years after this groundbreaking series was first publisched. I remember from those days good tutorials were scarce and weren't always very easy on the ear (not you, Kahn Academy). With the poll at the end it struck me how much of it you did right, despite probably having very little to go on, and figuring things out as you went along.
Thank you so much for taking the time and effort to do these tutorials. I always wanted to learn design patterns but never had the time. Your tuts are short and simple, and I get it right away. You're a great teacher. Pls keep up the good work.
Hi Derek, Since I didn't know about this pattern before my gut reaction was as follows: Make a class called Necessities and let Liquor, Cigar and Milk extend that. Make another class called Taxes and add GetTaxedPriceFor(Necessities necessities, Date date). This method would take a commodity and the time and returns the corresponding tax for that. This way I could make a call like the following: Taxes.GetTaxedPriceFor(Milk,22/5/2017); Now, here I understand that every time you need to change tax calculations and you want to add new Necessities to the switch you need to open Taxes class and place a bunch of code in there. Soon you'll be hitting so many lines... Oh my god! (Edit: As an addition perhaps it's even better to assign types to necessities so the switch doesn't grow out of proportion and can return the taxed value for all foods for example.) In the Visitor pattern however you'll need to expand the TaxVisitor to handle this situation instead. The more implementations of Necessities you have the more you'll need to handle in the TaxVisitor. So what is the benefit here? Why should I use the Visitor pattern instead? I understand that I'm missing the point here so I kindly ask for your help. (Or any of the commenters for that matter.)
You're very welcome :) Yes you could do that, but the goal at least in this tutorial is to make everything an interface over an abstract class if at all possible. The pattern is also defined that way. There are always tradeoffs that you'll have to make decisions on depending on your situation. I always plan on needing to make changes in the future so I use interfaces whenever I can. (Just a personal opinion)
Lol Derek, you are so humble. "All 150 of you guys". You sir put out truly some of the best programming content I've ever seen on youtube, and I don't wanna sound like a kiss ass but, you change the world by providing such quality education. Much appreciation and respect for taking the time out of your day to make these vids.
This is awesome...completely understood! I was browsing for almost an hour and was not clear until I found this video! Thnks a lot... This video itself is a motivation to watch the other videos as well!! A little fast though.. :)
I totally agree! English is my second language but I understood everything. I just started to study informatics and will use your videos in future when I need some help. Your pronountiation is perfect and you explain in a very easy way. Thanks a lot!!
You're very welcome :) I will cover web services soon, but I want to cover the core java language first. By the end I'll have the most complete java tutorial. Sorry it is taking so long
Hi there! Just wanted to say a big thanks and thumbs up for all of your design pattern video's! They are much more fun to follow than reading my book, and are often also much clearer. I also love the originality of your examples to find a good real-life illustration, it makes memorizing the patterns much easier. You changed them from boring theoretical lessons to some pretty amazing things for me! Since you mention that you like to hear feedback, I'll mention that I found the examples using a non-standard libraries (like Swing) a tiny bit harder to understand and memorize, because I don't have the necessary experience yet to understand them right-off. But it's a tiny detail and off course those video's were still very helpful. Cheers, a lot!
Hi, Thank you :) I did my best to make the patterns understandable. That is my main job since other wonderful people discovered all of this stuff. Thank you for the feedback.
This is normally used when you want to add functionality, but can't change the code much at all. You can also slap on a bunch of custom methods depending on the class. I made the example simple, but it can get much more complicated if you implement many interfaces. I hope that helps
You're very welcome :) Ill get back into web development and cover those topics, but I have to cover android and game development first. Sorry, but I held a vote and that is what won
thanks a lot for presenting design patterns so lucidly in such a brief but effective videos. I find your channel to be a very useful and efficient reference while designing new software. Great work indeed.
I followed a course called Object Orientation last semester , and to be honest, I've learned just as much about it watching and implementing your tutorials in the past 3 days as I did in the course which lasted like 4 months..
Thanks a bunch for the videos. Before watching this video, I kind of thought about the whole pattern in terms of only one implementation of visitor class, so it didn't make much sense to me on why it is better than adding methods in the subclasses. But your two implementations TaxVisitor and TaxHolidayVisitor helped me come out of the shell.
Many thanks for the companionship, your videos really helped me with my read on Head First: Design Patterns and general understanding of patterns. I have to guess that's one of the books you based these tutorials around.
Great tutorial on how to implement the pattern. Could you explain when you would opt for a visitor pattern over an independent class with overloaded methods that operate on the other classes? i.e. TaxCalculator::Calculate(Necessity necessityItem), etc.
Thank you so so so much for all these videos I 'm currently in a large scale software development course and my professor has spent weeks on explaining some patterns and i've still been lost and in a couple 15 min videos you cleared up a lot Thanks again!
You're very welcome :) I'm sorry, but I don't know of such a source. There have only ever been 3 books written on refactoring ever as far as I know. This is a topic that has been kind of ignored for some reason? I plan on adding quiz functionality to my site and I'll do my best to drive home the power of each pattern when I do that
I tried at least 5 other sources to understand this design pattern but I failed. Finally, I got it by watching only half of your video while I never did java. Really good job.
Don't worry I'll be covering refactoring very soon so that you'll be able to spot when to use which patterns. It will be a long journey, but in the end those that stick with it will be enlightened :)
Hey ya! Thx you soooo much for this video tutorial! you really covered all the design patterns i need to know for my exam next week. I really like the way you explain the programming stuff!!
Very well explained. I heard before coming to this video that this was a potential solution to instanceof being used in code (which I have seen a lot of). I will try to implement it using the concepts you have passed across.
android!!! Thank you very much! Some of the design patterns are clean when you explain them, but easy to forget after some while. I hope you could also discuss the case not using the design pattern so as to contrast with design patterns.
You are really saving my butt right before finals. I'm glad you put these in depth explanations out there, because I'm beginning to figure out what my Professor was trying to explain. Thanks tremendously!
Hi Derek, Thank you so much for these great tutorials. By the way I have a question. I need a resource that has real world problems/case studies to practice for each of these patters? Would you recommend a source?
Very crisp and clear information presented beautifully in an interactive way. Loved the video. Hope to see some more technical concepts made easy by you.
Your words @10:46, " I also don't know, how much cigars cost?" just a beautiful message hidden behind those words. [good message to not to do this] Kudos, and I followed all your DP tutorials and all are worth. Thanks @Darek Banas for making an positive impact to the society. :) :)
This was exceptionally well explained as always Derek, I appreciate the effort you put into your videos. The only problem I have with this pattern is knowing when to use it at the right time. It gives the impression that it should only in be applied to existing code, but I see many large applications that use the visitor design pattern. (Like antlr, the language parser)
Thank you :) you basically use it when you want to add an operation to a hierarchy of classes while making the fewest possible modifications to that hierarchy of classes and subclasses
Which ever side wins will get their tutorial. Hopefully this won't divide everyone, but I can only pick one or the other to do next and do them the right way. I want the next tutorial to be great and perfect. That can only happen if I spend 6 months putting it together. I'll honor which ever group gets the most votes :)
Thank you sooo much! You saved my life with these videos. So useful. And keep making Android videos, there is a lot of interesting stuff to talk about there. And thanks again. ^^
You're awesome. I've completed the design patterns tutorials and checked everything into GitHub including slides and UML. I understood about 70% of it. It is a lot to think about. What's next? Looks like UML 2.0 and Refactoring is what you did after this. I'm a little confused because you also have Object Oriented Design using UML. Should I do UML 2.0 and then OOD before Refactoring?
I agree that I shouldn't and don't do that in the real world. I did it in these videos because I thought it distracted from the code and I had previously mentioned what it was for. Sorry about that. I have learned my lesson.
The visitor pattern is used when you have an interface and many subclasses that implement it. What happens when you want to add a function to all of the subclasses while causing minimal changes to the interface? By using the visitor pattern you can change the interface once and then allow an unlimited number of changes in the future to any class that implements it. Does that make sense? It is the ultimate in flexibility!
Derek, thank you for design patterns tutorials. But could you please make another tutorials on using these design patterns for web application developments? I'm personally interested in web developments but I don't know which design patterns are useful for me (Except for factory design pattern).
Ive almost watched all your videos about design patterns by now and they are so great, I wish I had found them earlier! I have been trying to implement what you´ve just done but in c++ code and Im stuck because I keep getting circular includes :( [Visitor] includes [Liquor/Tobacco/Necessity] which includes [Visitable] which includes [Visitor]. You see my problem? Do you have any idea of how I could get around this? Thanks and keep up the great work!!
Really great videos on design patterns. Could you prepare the J2EE Design Patterns as well. I really grasped all the design patterns by spending four to five hours. Excellent
11 years later, your tutorials are still the best the internet can offer. These 26 bite-sized lectures are a real masterclass. Thank you so much.
You are the exact reason why I continue to make these videos. Thousands of people have taken their time to write the kindest messages to me. When I was making terrible videos many of you reached out kindly and taught me how to get better. I wouldn't be doing this without your kindness and help. I'll do my best to live up to the compliments I receive :)
I've read a number of different design patterns books, I've sat through University Lectures and now I sit here studying for my Object Oriented Software Design exam by watching your Design Pattern videos. In each video, you have explained the concepts better than every text and every lecture. You deserve an award. If you accept paypal donations, I will gladly donate.
Wow thank you for the wonderful compliment :) There is no need to donate. I just ask if you think someone would benefit from my videos that you tell them about them. You're very welcome.
@@derekbanas Youre.. awesome... people like me confusing about this stuff... i read a lot of article but thats not enough.... but your video is perfect, 100% understood... i promise if i had a job .. i will donate to your patreon account...
5 years later and nothing changed. Spent half a semester in class and didn't quite get it. Watched all tutorials for Design Patterns and everything makes sense. Thank you
@@derekbanas well, to complete the complements, i watched, matlab, arduino, uml, java (94 vids), design pattern, and soon anything related to swift and android, also code refactoring and so on, i have actually a list of 30 course you provide that i will finish asap, literally, what i learn is 90% because of you, thanks Mr. Derek :)
You're very welcome :) When I make tutorials I use normally the top 3 to 5 books and at least that many online tutorials along with notes I've taken over the years. I figure that way I'll be certain to cover everything. The GOF book is considered to be the best book on patterns, but it definitely isn't the most useable so I use the best parts of every book. I'm glad it helped
Hi, just found out these videos 10 years after. They are the best explanation I've seen for GOF design patterns! Thank you for making this.
Thank you so much for all these design pattern tutorials. It's really good to see all these good examples of them.
This video was the first time I was taught Visitor pattern, and I feel like I really learned it well. Nicely done! Your Factory Pattern really helped me out for a game project I'm doing in school. I learn better from your videos than from my class!
Hey Derek. I've just finished your entire design patterns series. Thank you for this. They covered this stuff in university but I finally feel like I get it now.
Digged my way through the whole series. Several saturdays well spend!
Amazing how I only discovered this channel 10 years after this groundbreaking series was first publisched. I remember from those days good tutorials were scarce and weren't always very easy on the ear (not you, Kahn Academy). With the poll at the end it struck me how much of it you did right, despite probably having very little to go on, and figuring things out as you went along.
I know this was from forever ago, but I just want to say your style of videos is extremely informing and easy to follow. Well done!
Thank you so much for taking the time and effort to do these tutorials. I always wanted to learn design patterns but never had the time. Your tuts are short and simple, and I get it right away. You're a great teacher. Pls keep up the good work.
You're very welcome :) I'm very happy that this series has helped
Hey, I just wanted to let you know that these tutorials were amazing and made it very easy to understand these design patterns. Thank you!
Your videos on design patterns are simply the best!!!!
I just watched all of your "Design Pattern" Videos, it was so helpful. I really appreciate to making this series. Thanks Derek.
Norbert Klár Thank you :) I'm very happy that they helped
Thank you very much :) For some reason this is a topic that is ignored. I'm happy that people are getting something out of them
Hi Derek,
Since I didn't know about this pattern before my gut reaction was as follows:
Make a class called Necessities and let Liquor, Cigar and Milk extend that.
Make another class called Taxes and add GetTaxedPriceFor(Necessities necessities, Date date).
This method would take a commodity and the time and returns the corresponding tax for that.
This way I could make a call like the following: Taxes.GetTaxedPriceFor(Milk,22/5/2017);
Now, here I understand that every time you need to change tax calculations and you want to add new Necessities to the switch you need to open Taxes class and place a bunch of code in there. Soon you'll be hitting so many lines... Oh my god!
(Edit: As an addition perhaps it's even better to assign types to necessities so the switch doesn't grow out of proportion and can return the taxed value for all foods for example.)
In the Visitor pattern however you'll need to expand the TaxVisitor to handle this situation instead. The more implementations of Necessities you have the more you'll need to handle in the TaxVisitor.
So what is the benefit here? Why should I use the Visitor pattern instead? I understand that I'm missing the point here so I kindly ask for your help. (Or any of the commenters for that matter.)
You're very welcome :) Yes you could do that, but the goal at least in this tutorial is to make everything an interface over an abstract class if at all possible. The pattern is also defined that way. There are always tradeoffs that you'll have to make decisions on depending on your situation. I always plan on needing to make changes in the future so I use interfaces whenever I can. (Just a personal opinion)
Lol Derek, you are so humble. "All 150 of you guys". You sir put out truly some of the best programming content I've ever seen on youtube, and I don't wanna sound like a kiss ass but, you change the world by providing such quality education. Much appreciation and respect for taking the time out of your day to make these vids.
Thank you :) I do my best to cover topics completely that are normally not paid their do respect.
Thank you :) yes I'm going to do a video soon on the power of eliminating primitive use all together. Thanks for bringing that up
10yr old video and helped me a lot Derek. Glad that I was already a sub and found this video from you, you always have the best examples!
I'll incorporate DPs into my next series. Thank you for the request :)
A pattern which seemed very difficult in the Gang of Four, became very clear thanks to your video!!! Love your style...
+Kaan Etüt Merkezi Thank you :) I'm glad it helped.
Thank you very much :) I'm not very well known. I doubt the Khan Academy even knows I exist. Mr. Khan was definitely an inspiration for us all!
Derek,
Thank you for providing these tutorials, they are a great resource! It would be great if Khan Academy featured them!
the clearest video i have ever watched on visitor pattern
Happy to hear that you gonna cover more on J2EE. Thanks for your all tutorials.
Great job Derek. Thanks a lot! Your explanations were quite lucid and easy to understand.
Thank you Derek
You help me to understand what the different kinds of Design Pattern are.
+Lester You're very welcome :)
This is awesome...completely understood! I was browsing for almost an hour and was not clear until I found this video! Thnks a lot... This video itself is a motivation to watch the other videos as well!! A little fast though.. :)
michael ngangom I'm very happy that I could help :) Thank you
Agree
I totally agree! English is my second language but I understood everything. I just started to study informatics and will use your videos in future when I need some help. Your pronountiation is perfect and you explain in a very easy way. Thanks a lot!!
You're very welcome :) I will cover web services soon, but I want to cover the core java language first. By the end I'll have the most complete java tutorial. Sorry it is taking so long
Yes they will more then likely follow the C tutorial. You'll be amazed by how simple it is
Hi there!
Just wanted to say a big thanks and thumbs up for all of your design pattern video's! They are much more fun to follow than reading my book, and are often also much clearer. I also love the originality of your examples to find a good real-life illustration, it makes memorizing the patterns much easier. You changed them from boring theoretical lessons to some pretty amazing things for me!
Since you mention that you like to hear feedback, I'll mention that I found the examples using a non-standard libraries (like Swing) a tiny bit harder to understand and memorize, because I don't have the necessary experience yet to understand them right-off. But it's a tiny detail and off course those video's were still very helpful.
Cheers, a lot!
Hi, Thank you :) I did my best to make the patterns understandable. That is my main job since other wonderful people discovered all of this stuff. Thank you for the feedback.
This is normally used when you want to add functionality, but can't change the code much at all. You can also slap on a bunch of custom methods depending on the class. I made the example simple, but it can get much more complicated if you implement many interfaces. I hope that helps
You're very welcome :) Ill get back into web development and cover those topics, but I have to cover android and game development first. Sorry, but I held a vote and that is what won
Excellent and simple and I love how you showed the 'with and without' part
+Naguib Ihab Thank you :) I'm glad you found it useful
Thanks for the video! It explained the concept very simply and clearly.
this is the simplest explanation of this pattern I've ever seen until now. Thank you.
Thank you very much :) I'm glad you found it useful.
thanks a lot for presenting design patterns so lucidly in such a brief but effective videos. I find your channel to be a very useful and efficient reference while designing new software. Great work indeed.
I followed a course called Object Orientation last semester , and to be honest, I've learned just as much about it watching and implementing your tutorials in the past 3 days as I did in the course which lasted like 4 months..
Thank you :) I'm happy I could be of help
Thank you Sir for creating such a simple explanation on Visitor Design Pattern.
Thank you :) Im glad you liked it
Thank you :) Im happy that you have liked them. So, your question is how do you implement this pattern in C++?
Thanks a bunch for the videos. Before watching this video, I kind of thought about the whole pattern in terms of only one implementation of visitor class, so it didn't make much sense to me on why it is better than adding methods in the subclasses. But your two implementations TaxVisitor and TaxHolidayVisitor helped me come out of the shell.
Great I'm happy that I could help. You're very welcome :)
Many thanks for the companionship, your videos really helped me with my read on Head First: Design Patterns and general understanding of patterns. I have to guess that's one of the books you based these tutorials around.
You definitely have a very good approach to teach by examples kudos 😀👍👍
THANK YOU! was confusing learning this in class. Really needed a more "real life" example like this video provides! great job.
I'm happy I could be of help :)
This was super helpful!
Had no idea how this design pattern worked ... until I saw your video! Great explanation, thanks a lot!
Thank you 😁 I'm happy I could help
Great tutorial on how to implement the pattern. Could you explain when you would opt for a visitor pattern over an independent class with overloaded methods that operate on the other classes? i.e. TaxCalculator::Calculate(Necessity necessityItem), etc.
Thank you so so so much for all these videos I 'm currently in a large scale software development course and my professor has spent weeks on explaining some patterns and i've still been lost and in a couple 15 min videos you cleared up a lot Thanks again!
You're very welcome :) Thank you for taking the time to tell me I was able to help.
I like the order in which you listed the items - liquor, tobacco and then food :) Helpful video by the way!
You're very welcome :) I'm sorry, but I don't know of such a source. There have only ever been 3 books written on refactoring ever as far as I know. This is a topic that has been kind of ignored for some reason? I plan on adding quiz functionality to my site and I'll do my best to drive home the power of each pattern when I do that
I tried at least 5 other sources to understand this design pattern but I failed. Finally, I got it by watching only half of your video while I never did java. Really good job.
Thank you for taking the time to tell me I helped :) I appreciate it!
Don't worry I'll be covering refactoring very soon so that you'll be able to spot when to use which patterns. It will be a long journey, but in the end those that stick with it will be enlightened :)
To be honest you explain codes and DP in the best way! thanks a lot.
Thank you very much :)
Hey ya! Thx you soooo much for this video tutorial! you really covered all the design patterns i need to know for my exam next week.
I really like the way you explain the programming stuff!!
Thank you :) Best of luck on your exams
Very well explained. I heard before coming to this video that this was a potential solution to instanceof being used in code (which I have seen a lot of). I will try to implement it using the concepts you have passed across.
Thank you :) I'm glad it helped
android!!! Thank you very much!
Some of the design patterns are clean when you explain them, but easy to forget after some while. I hope you could also discuss the case not using the design pattern so as to contrast with design patterns.
Really nice video! I think I've used things like this before without standard names like accept and so on, but never knew the name.
I'll be covering both over the next 6 to 8 months. By the end, everything Java will be covered and much more
You are really saving my butt right before finals. I'm glad you put these in depth explanations out there, because I'm beginning to figure out what my Professor was trying to explain. Thanks tremendously!
You're very welcome :) Good luck on your exams.
Thank you and you are very welcome :)
Thank you Derek! You are AWESOME!
Thank you very much :)
Hi Derek, Thank you so much for these great tutorials. By the way I have a question. I need a resource that has real world problems/case studies to practice for each of these patters? Would you recommend a source?
Thank you...
Clearly understood the concept watching this.
+Rukshan Perera You're very welcome :)
Great tutorial, definitely going to bookmark your channel!
Thank you @Derek. Pretty much better than my lecturer.
Thank you very much :)
Very crisp and clear information presented beautifully in an interactive way.
Loved the video. Hope to see some more technical concepts made easy by you.
Alok Gupta Thank you for the nice compliments :)
best to the topic I have ever seen / thank you
I'll put up the voting page next week on my website. Voting will be open for a week. Thank you for your interest :)
more clear than my IT prof. thanks Derek!!
***** You're very welcome :)
Thanks for such an awesome tutorial... Really helped a lot...
Your words @10:46, " I also don't know, how much cigars cost?" just a beautiful message hidden behind those words. [good message to not to do this] Kudos, and I followed all your DP tutorials and all are worth. Thanks @Darek Banas for making an positive impact to the society. :) :)
Thank you for your kind words :) Yes I agree it is definitely a good idea to tell people to avoid tobacco
This was exceptionally well explained as always Derek, I appreciate the effort you put into your videos. The only problem I have with this pattern is knowing when to use it at the right time. It gives the impression that it should only in be applied to existing code, but I see many large applications that use the visitor design pattern. (Like antlr, the language parser)
Thank you :) you basically use it when you want to add an operation to a hierarchy of classes while making the fewest possible modifications to that hierarchy of classes and subclasses
Which ever side wins will get their tutorial. Hopefully this won't divide everyone, but I can only pick one or the other to do next and do them the right way. I want the next tutorial to be great and perfect. That can only happen if I spend 6 months putting it together. I'll honor which ever group gets the most votes :)
Awesome!!! Thank you for telling me. That is very cool :)
This guy is awesome ! Great JOB Champ, and thank you.
+Chris. Chérubin Thank you for the compliment :) You're very welcome
its 2022 and still your videos are the best 🙂
You're very welcome :)
Hi !
Thank you, sir. You have helped me with this and I appreciate that.
Happy to be of help :)
Awesome video, super helpful and concise. Ur a G Derek Bannanas .
Thank you sooo much! You saved my life with these videos. So useful. And keep making Android videos, there is a lot of interesting stuff to talk about there. And thanks again. ^^
You're very welcome :) I plan on making Android apps pretty much for the rest of next year.
Very nice Derek, thank you!
You're awesome. I've completed the design patterns tutorials and checked everything into GitHub including slides and UML. I understood about 70% of it. It is a lot to think about. What's next? Looks like UML 2.0 and Refactoring is what you did after this. I'm a little confused because you also have Object Oriented Design using UML. Should I do UML 2.0 and then OOD before Refactoring?
Thanks for this quick answer. I will be following :)
I agree that I shouldn't and don't do that in the real world. I did it in these videos because I thought it distracted from the code and I had previously mentioned what it was for. Sorry about that. I have learned my lesson.
Thanks a bunch :)
The visitor pattern is used when you have an interface and many subclasses that implement it. What happens when you want to add a function to all of the subclasses while causing minimal changes to the interface? By using the visitor pattern you can change the interface once and then allow an unlimited number of changes in the future to any class that implements it. Does that make sense? It is the ultimate in flexibility!
Thanks for the tutorial!
+Adrian Dan You're very welcome :)
great video & excellent explanation!
Superb awesome explanation You really helped me a lot
Thanks feels very tiny word for your work
Thank you very much :)
Derek, thank you for design patterns tutorials. But could you please make another tutorials on using these design patterns for web application developments? I'm personally interested in web developments but I don't know which design patterns are useful for me (Except for factory design pattern).
I just wanted to say thank you. You have helped me greatly.
I am interested to see if you do anything with web services.
Ive almost watched all your videos about design patterns by now and they are so great, I wish I had found them earlier!
I have been trying to implement what you´ve just done but in c++ code and Im stuck because I keep getting circular includes :(
[Visitor] includes [Liquor/Tobacco/Necessity] which includes [Visitable] which includes [Visitor]. You see my problem? Do you have any idea of how I could get around this? Thanks and keep up the great work!!
Really great videos on design patterns. Could you prepare the J2EE Design Patterns as well. I really grasped all the design patterns by spending four to five hours. Excellent
santosh ganji Thank you :) I hope to cover JEE soon.
Derek Banas yeah need it ASAP
Thanks, mate! Really good explanation on simple example!
+Кирилл Ольховский Thank you :) I'm glad you liked it.
Amazing, thanks a ton Derek!
+Obstinate 21 You're very welcome :) Thank you