This is lit. Couldn't find any better analogy and actual code implementation. Thanks a ton . Please share any book/website reference where i can find more such real world implementations.
Subscribed immediately after I saw such a video is uploaded. Thanks a ton. This is so much required. You have no estimate of it. Internet is short of such content
What if added double Cameral to Beverage and then decided to remove one Cameral. I mean like we are able to add something new, how can wr remove something without any changes
I think it can also happen that we have to add multiple ingredients in one beverage, in that case does it make sense to have List in every beverage subclass ?
let's imagine an extra ingredient is added, so you have to re-run the list of ingredients and this is not maintainable for a long time, so with the decorator pattern the only thing to do is add the new Decorator to the current beverage and the price is calculated based on the original plus the decorator
This is lit. Couldn't find any better analogy and actual code implementation. Thanks a ton . Please share any book/website reference where i can find more such real world implementations.
Clear and concise! Pretty good explanation.
Glad you liked it. Do like the video and subscribe and share with your friends :)
One of the best and easy to understand example
Great Video!
Do like and subscribe and share with others 🙂
Great explanation
Glad it was helpful. Do like and subscribe and share with others 🙂
Need more of this
Subscribe, like and share :) , Spoiler Alert:- next week it will be Adapter pattern based Audio Player design
Subscribed immediately after I saw such a video is uploaded. Thanks a ton. This is so much required. You have no estimate of it. Internet is short of such content
@@ngneerin Really glad that it was helpful to you. Such comments motivates a lot :). Do share with your friends as well!!!
Please explain the example that you said about filereader in the end
In java fileinputstream uses this, where input stream is decorated with bufferedInputStream and objectInputstream etc.
What if added double Cameral to Beverage and then decided to remove one Cameral. I mean like we are able to add something new, how can wr remove something without any changes
Excellent point, bean creation should be done on the fly, based on user input. For now I created a hard-coded main class to execute the example
I think it can also happen that we have to add multiple ingredients in one beverage, in that case does it make sense to have List in every beverage subclass ?
let's imagine an extra ingredient is added, so you have to re-run the list of ingredients and this is not maintainable for a long time, so with the decorator pattern the only thing to do is add the new Decorator to the current beverage and the price is calculated based on the original plus the decorator
oh my god thanks thanks
Glad it was helpful. Do like and subscribe and share with your friends 🙂