Visitor Design Pattern

Visitor Design Pattern

Derek Banas

11 лет назад

275,160 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@gandamraviteja7019
@gandamraviteja7019 - 19.11.2023 15:32

Superb awesome explanation You really helped me a lot
Thanks feels very tiny word for your work

Ответить
@calebm6485
@calebm6485 - 28.09.2023 07:57

This was super helpful!

Ответить
@raphaelfogaca
@raphaelfogaca - 08.07.2023 15:13

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!

Ответить
@tharinduwijekoon1669
@tharinduwijekoon1669 - 03.07.2023 19:48

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!

Ответить
@vutranang8053
@vutranang8053 - 12.06.2023 18:41

the legend

Ответить
@sakuranooka
@sakuranooka - 05.06.2023 23:48

Why not simply define a function calculateTax() that is implemented for each one of the classes Liquor, Tobacco and Necessity? The the code would be simpler: don't need a TaxVisitor, simply create milk and then milk->calculateTax(). As milk is a Necessity, it would call the correct calculateTax() function, wouldn't it?

Ответить
@rohitahuja5565
@rohitahuja5565 - 19.04.2023 09:03

Brilliant!

Ответить
@aidando5047
@aidando5047 - 01.03.2023 08:36

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.

Ответить
@JasonRobards2
@JasonRobards2 - 19.02.2023 20:48

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.

Ответить
@anything0212
@anything0212 - 11.12.2022 02:45

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.

Ответить
@thomasgong5538
@thomasgong5538 - 24.08.2022 14:19

Your voice is excellent! Like a British Broadcaster named Jerimy Clarkson.

Ответить
@arpitnot4u
@arpitnot4u - 14.08.2022 18:16

its 2022 and still your videos are the best 🙂

Ответить
@ronrolle7610
@ronrolle7610 - 30.04.2022 17:51

best to the topic I have ever seen / thank you

Ответить
@blake5226
@blake5226 - 26.04.2022 16:27

Thanks for the video! It explained the concept very simply and clearly.

Ответить
@wadebeveridge3208
@wadebeveridge3208 - 17.02.2022 03:59

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!

Ответить
@gumball5836
@gumball5836 - 23.01.2022 20:07

Your videos on design patterns are simply the best!!!!

Ответить
@stepbystepcoding4113
@stepbystepcoding4113 - 21.01.2022 18:08

Godsend video for sure, where did you learn how to do all this? are you just good at reading technical textbooks? or did you have a really good teacher? or how did this happen?, I'm always curious like how things came to be

Ответить
@user-mw3gu9ih4v
@user-mw3gu9ih4v - 14.12.2021 00:20

Your video's are a godsend

Ответить
@steff420
@steff420 - 12.12.2021 19:31

very well made video. thank you

Ответить
@stefanvercillo2234
@stefanvercillo2234 - 18.11.2021 23:03

Awesome video, super helpful and concise. Ur a G Derek Bannanas .

Ответить
@silvermoon7719
@silvermoon7719 - 27.09.2021 20:20

2 words "thank you"

Ответить
@andylinkOFFICIAL
@andylinkOFFICIAL - 24.09.2021 21:39

The thing I don't like about this pattern is that it needs an a really good explanation in order to understand it.

Ответить
@mangaldev
@mangaldev - 25.05.2021 08:20

Milk was 3.47 in 2012 ? Still costs the same after 9 years.

Ответить
@shadaflorida4248
@shadaflorida4248 - 20.03.2021 02:17

this is amazing and such a concise explanation! <3

Ответить
@wesm6747
@wesm6747 - 20.02.2021 11:07

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!

Ответить
@Sleeperknot
@Sleeperknot - 10.02.2021 13:51

I like the order in which you listed the items - liquor, tobacco and then food :) Helpful video by the way!

Ответить
@HarshPrriyaOfficial
@HarshPrriyaOfficial - 20.12.2020 22:43

Why it is important to have a accept method within each of item? For example: Can't we directly call taxCalc.visit(milk) instead of milk.accept(taxCalc)? In that way, we absolutely have to make no change in the item object.

Ответить
@TehPobo
@TehPobo - 29.11.2020 06:59

I vote for android development!

Ответить
@joaofernandes681
@joaofernandes681 - 23.11.2020 18:34

This is probably the easiest design pattern

Ответить
@TuringMachines
@TuringMachines - 11.11.2020 00:35

Must have a donate button !!!!

Ответить
@fssene1462
@fssene1462 - 17.10.2020 00:09

Hi.
After some times of thinking about it.

What the difference between Visitor and Strategy ?

I Think maybe visitor helps to make a global report about what your class have inside her, but you want to use this global report for many very different things (it's scray how it can be different uses) when Strategy is one family of algorithms so it's restricted, visitor is not.

Am I true or not ?
Thanks.

Ответить
@salahaosamaelhoseneyali7019
@salahaosamaelhoseneyali7019 - 05.10.2020 09:28

greeeeeeeeeeeeeeeat

Ответить
@LudwigvanBeethoven2
@LudwigvanBeethoven2 - 07.09.2020 22:51

Doesn't visitor pattern violate SRP or LSP? Maybe i want to add method only for type X but not Y

Ответить
@indian2339
@indian2339 - 11.08.2020 17:06

thank you!

Ответить
@dummyone5845
@dummyone5845 - 04.08.2020 14:10

Hi Sir, I just went through your video. It is very simple and straight forward.
I have a question on this content.
In client.cs Instead of calling milk.accept(taxCalc); Why cant we write TaxCalc.Visit(milk);
I don't understand why we need an IVisitable interface and the accept method at all.

Ответить
@BMgutsi
@BMgutsi - 21.07.2020 20:00

The voice 🔥🔥🔥🔥

Ответить
@shaikzillani6106
@shaikzillani6106 - 11.05.2020 19:18

I'm watching a 7 year old video because design patterns never gets old or get updated.

Ответить
@EMAD8366
@EMAD8366 - 20.04.2020 05:14

To be honest you explain codes and DP in the best way! thanks a lot.

Ответить
@fj12n3
@fj12n3 - 18.04.2020 21:15

This does not do a good job of explaining the need for the visitor pattern. Based on your example in main, what is stopping you from just calling taxCalc.visit(milk); instead of using accept? It makes it seem like the accept functionality just adds extra baggage in this scenario.

Ответить
@ratias0
@ratias0 - 31.03.2020 19:30

Excellent, thank you very much

Ответить
@janrabe5371
@janrabe5371 - 20.03.2020 16:11

the easiest implementation of this pattern is when your language supports extensions methods, e.g. c#, swift, kotlin (assuming your visitor does not need manage state)

Ответить
@kaizun
@kaizun - 13.03.2020 06:39

I LOVE YOU

Ответить
@pamagee2011
@pamagee2011 - 07.02.2020 17:03

Good presentation. Am I the only one who thinks that this pattern violates Open-Closed?

Ответить
@crimsonalucard
@crimsonalucard - 20.12.2019 07:41

func simplewaytotaxwithoutbeinganidiot(x float) float {
return x*0.15
}


beerprice := 4.00;


newPrice = simplewaytotaxwithoutbeinganidiot(beerprice);

Ответить
@rodrickee
@rodrickee - 10.12.2019 20:09

YOU ARE A G O D

Ответить
@maliklanlokun3614
@maliklanlokun3614 - 24.11.2019 20:34

GREAT VIDEO! Help! i need urgent explanation on how to draw a polyline using the visitor design pattern...Can if you can please send me your email so i can contact you directly that will be appreciated

Ответить
@shikhasingh4657
@shikhasingh4657 - 23.11.2019 16:28

Such a nice video series!! Plus you have such a cute voice :)

Ответить
@b4hr4m
@b4hr4m - 16.11.2019 12:49

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.

Ответить
@FaizaanDatoo
@FaizaanDatoo - 19.10.2019 01:21

I LOVE YOU DEREK

Ответить