I would be so glad if you make an owesome series like this discussing solid principles in detail. Thank for the great explaination and keep rocking ❤️❤️
hello, Ty so much for the video the info on this series is awesome but i got a question -> the bridge here is the Abstract Class Restaurant?? i believe make more sense that the American - Italian Rest works as a bridge cause connect [ Pizza - Restaurant]
It seems that the bridge pattern is the strategy pattern (the pizza as a strategy through DI), with an extra abstraction for the Restaurant(the class implementing the strategy), is this observation correct? Thank you for these videos, they are great!
Can't figure what does the "pizza.SetToppings" mean. or, more specifically what is the " .SetWhatever ". I know what it should do, but it does not work, it says that it needs to be declared previously, but where should I declare it, how can I change that string while the object is being made? My code gives "null" where all the toppings, sauce and crust types should be. Plz send help!
Thanks for the explanation! A quick question, is this pattern viable for dependent abstractions and implementations ? I think I have a case which I can apply bridge pattern to refactor it but I'm not sure yet. In the case of restaurant - pizza example, is it possible to use this pattern when we have to do different sauce logic for American Veggie Pizza vs Italian one? if we were to write this with conditionals, we would say: if(american && pizza.type == "Veggie"){ //logic } But of course this leads to non-extensible code. If bridge cannot be applied in this case, is there any pattern that can be helpful?
Glad it was helpful! Am not sure I really got ur question, but if you wanted to do something specific for the Italian Veggie Pizza Sauce, all you have to do is add an additional method at the level of the pizza that deals with sauce instead of just "setSauce" and inside the Italian restaurant u'll insert additional logic there and call the method. When you check the type of the pizza inside the restaurant you break the contract of the pattern and make it closeable for extension. Remember as you said, here we are moving in independent dimensions. If you wanted to create products based on a certain dependency between them (if I got you right) I suggest you check our video on the Factory Method Pattern: ruclips.net/video/EdFq_JIThqM/видео.html. Cheers!
I have never been able understand design pattern so clearly. Thank you so much from bottom of my heart.
We're here to help! Thanks for the support :)
Best explanation in YT for bridge pattern
Thanks a lot! Glad you think so :)
I never understood this pattern before, but now it is clear what is about.
Thanks
Now I finally got, what the Bridge Pattern is actually about! Thanks!
Glad it helped :)
All informations I needed, no less, no more, in five minutes. Thanks a lot mates
Tanks, finally I Understand bridge pattern
I would be so glad if you make an owesome series like this discussing solid principles in detail.
Thank for the great explaination and keep rocking ❤️❤️
Thanks a lot for the support! You can start by taking a look at: ruclips.net/video/HoA6aZPR5K0/видео.html. More videos are on the way! Stay Tuned!
your videos are underrated
Great explanation! Thanks!!!
Nice explanation, now I am hungry.
dude thank you very much
Thanks for making this! Very informative.
Glad it was helpful!
you made it look easy thank you
very helpful, nice video!
hello, Ty so much for the video the info on this series is awesome but i got a question -> the bridge here is the Abstract Class Restaurant?? i believe make more sense that the American - Italian Rest works as a bridge cause connect [ Pizza - Restaurant]
I'm little confused here because it looks like Factory pattern right?
Check our video on factories, and let us know how we can help!: ruclips.net/video/EdFq_JIThqM/видео.html
It seems that the bridge pattern is the strategy pattern (the pizza as a strategy through DI), with an extra abstraction for the Restaurant(the class implementing the strategy), is this observation correct?
Thank you for these videos, they are great!
Can't figure what does the "pizza.SetToppings" mean. or, more specifically what is the " .SetWhatever ". I know what it should do, but it does not work, it says that it needs to be declared previously, but where should I declare it, how can I change that string while the object is being made?
My code gives "null" where all the toppings, sauce and crust types should be. Plz send help!
The Best
Thanks for the explanation!
A quick question, is this pattern viable for dependent abstractions and implementations ? I think I have a case which I can apply bridge pattern to refactor it but I'm not sure yet.
In the case of restaurant - pizza example, is it possible to use this pattern when we have to do different sauce logic for American Veggie Pizza vs Italian one?
if we were to write this with conditionals, we would say:
if(american && pizza.type == "Veggie"){
//logic
}
But of course this leads to non-extensible code.
If bridge cannot be applied in this case, is there any pattern that can be helpful?
Glad it was helpful!
Am not sure I really got ur question, but if you wanted to do something specific for the Italian Veggie Pizza Sauce, all you have to do is add an additional method at the level of the pizza that deals with sauce instead of just "setSauce" and inside the Italian restaurant u'll insert additional logic there and call the method.
When you check the type of the pizza inside the restaurant you break the contract of the pattern and make it closeable for extension. Remember as you said, here we are moving in independent dimensions. If you wanted to create products based on a certain dependency between them (if I got you right) I suggest you check our video on the Factory Method Pattern: ruclips.net/video/EdFq_JIThqM/видео.html. Cheers!
Great video!
you give me a Jordanian vibes, am i mistaken?
But the way you described the problem easily leads to the Abstract factory design pattern.
A lot of problems can be solved by applying multiple patterns, the main aim of these videos is to explain the pattern itself :)
@@geekific it’s okay, most of them were helpful I was just pointing out a possible source of confusion
Turns out all I needed to be able to understand this pattern easily was a pizza example 😂
😂
2:00 looks like template method pattern
It is pretty easy to confuse patterns! Keep digging :)
Pizza jokes. Love it. :D