Decorator Design Pattern | Starbucks | Coffee House System Design

Поділитися
Вставка
  • Опубліковано 12 січ 2025

КОМЕНТАРІ • 20

  • @AjayGupta-ys9hk
    @AjayGupta-ys9hk 2 роки тому +1

    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.

  • @nyny5819
    @nyny5819 3 роки тому +2

    Clear and concise! Pretty good explanation.

    • @TheTechGranth
      @TheTechGranth  3 роки тому

      Glad you liked it. Do like the video and subscribe and share with your friends :)

  • @artilamba1
    @artilamba1 Рік тому

    One of the best and easy to understand example

  • @pritybhudolia1012
    @pritybhudolia1012 2 роки тому +1

    Great Video!

    • @TheTechGranth
      @TheTechGranth  2 роки тому

      Do like and subscribe and share with others 🙂

  • @sanmule1905
    @sanmule1905 2 роки тому +1

    Great explanation

    • @TheTechGranth
      @TheTechGranth  2 роки тому

      Glad it was helpful. Do like and subscribe and share with others 🙂

  • @ngneerin
    @ngneerin 3 роки тому +2

    Need more of this

    • @TheTechGranth
      @TheTechGranth  3 роки тому

      Subscribe, like and share :) , Spoiler Alert:- next week it will be Adapter pattern based Audio Player design

    • @ngneerin
      @ngneerin 3 роки тому +1

      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

    • @TheTechGranth
      @TheTechGranth  3 роки тому

      @@ngneerin Really glad that it was helpful to you. Such comments motivates a lot :). Do share with your friends as well!!!

  • @aakash1763
    @aakash1763 3 роки тому +1

    Please explain the example that you said about filereader in the end

    • @TheTechGranth
      @TheTechGranth  3 роки тому

      In java fileinputstream uses this, where input stream is decorated with bufferedInputStream and objectInputstream etc.

  • @subhrajyotiparida854
    @subhrajyotiparida854 3 роки тому +1

    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

    • @TheTechGranth
      @TheTechGranth  3 роки тому

      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

  • @namansingla2009
    @namansingla2009 2 роки тому

    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 ?

    • @DjangoMx
      @DjangoMx Рік тому

      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

  • @aakash1763
    @aakash1763 3 роки тому +1

    oh my god thanks thanks

    • @TheTechGranth
      @TheTechGranth  3 роки тому

      Glad it was helpful. Do like and subscribe and share with your friends 🙂