Builder Design Pattern explained in Detail with Code, Real Life Examples and Applications!

Поділитися
Вставка
  • Опубліковано 26 вер 2024

КОМЕНТАРІ • 50

  • @KeertiPurswani
    @KeertiPurswani  2 роки тому +2

    Check out 𝐀𝐥𝐦𝐚 𝐁𝐞𝐭𝐭𝐞𝐫’s website to start your Data Science journey today (bit.ly/KEERTI25). Alma Better’s programs are carefully curated to provide the best-in-class experiences for all their students. The learning cost for any student is effectively ZERO. Alma Better also has a community for over 200+ hiring partners and professionals who are Senior Data Scientists, ML, and Engineers from top-notch universities. So tap on the link to check out all their courses and further details here:
    bit.ly/KEERTI25

  • @pearwatch1358
    @pearwatch1358 2 роки тому +32

    you can improve it a bit by returning the instance in each build function. this way it's possible to chain calls: desktopBuilder->buildX->buildY->buildZ->getDesktop()

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

      Actually thats an essential part of builder pattern in functional programming. That way we can create a “chain” for object generation through deserialisation.

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

      I have one question, why do we need builder if we have setters for all attributes in java class?

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

      ​@@anubhavanand2432I suppose without a builder pattern we have to call
      Object.setProperty1()
      Object.setProperty2()
      But with a builder pattern we can do that in chaining, like one after the other.
      I think it's more readable like this, not sure if I'm right though.

  • @suchismitagoswami5609
    @suchismitagoswami5609 4 місяці тому

    Great Video. One improvement we can make here is to encourage immutability by avoiding setters on the actual object. The intent is to allow an object to be modified during its creation phase, but avoid modifying it once created!

  • @KishankumarPatel
    @KishankumarPatel 2 роки тому +2

    Inplace of just directly explain what is builder class u can explain what would be the problem we face if we don't use it. Then it ll give better understanding of it. Over all it is a good video 👍

  • @anuraagkhandagle5130
    @anuraagkhandagle5130 10 місяців тому +1

    Why can we not create 2 derived class directly from desktop (HP and Dell)? That would allow us to customise the building process. What is the rationale behind creating a builder class separately?

  • @ai4407
    @ai4407 Рік тому +3

    Hi, Please expand your series with other design pattern, there is a more than 7 design pattern. It would be grate if you do this for us.

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

    Builder pattern definition:
    Taking a simple task, making it complex, so that you as a developer can become obsolete quickly.

  • @ritikjain24
    @ritikjain24 Місяць тому +1

    Doesn't this pattern solve a similar problem for which we used the factory pattern? For every new type of desktop we have to create new files and separate methods for building components. Do people actually use this? I feel it must be used in combination with the factory design pattern to handle the creation of different parts.

  • @jenishadsouza907
    @jenishadsouza907 2 роки тому +2

    Really helpful, please continue the series!

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

    Really Helpful video, Please keep posting series for patterns.

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

    Great video Please continue the Series.It was very helpful

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

    Thanks Keerti , A very good video on Builder pattern .

  • @charuprabha9696
    @charuprabha9696 4 дні тому

    Hi ,can't we use factory pattern in this? since we need to create two different object i.e dell desktop and hp desktop?
    This is like creating object on the basis of some condition.Means if user passes dell we will create dell desktop ,if he passes hp so create hp desktop?

  • @saoravsaha
    @saoravsaha 2 роки тому +6

    One request, if you can kindly add equivalent code for JAVA too, especially for design pattern videos. It will help a lot. As usual, great video.

  • @pkpanda3047
    @pkpanda3047 Рік тому +1

    Thank you for the videos. Can you please upload your codes in GIT and provide the accesss to play around the code for better understanding.

  • @md.al-amin1650
    @md.al-amin1650 2 роки тому

    Thanks. It was very helpful

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

    Very good presentation madam thanks

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

    Thank You Keerti for this video, it is really helpful

  • @AnuragKumar-cb5lr
    @AnuragKumar-cb5lr 2 роки тому

    Thanks a lot! Please increase video frequency.

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

    These vids i am ready to pay for !!!

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

    Thank You!

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

    can you please share the code path of all of your coding.

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

    Awesome explanation

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

    I've been doing coding for 30 years, and can't understand the use of design patterns. I am lone developer. Only a few times I had to put pen to paper to help visual then code complex ideas, but I mostly start coding after hearing a concept.

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

    Hi Keerti , please upload structural and behavioral patterns also

  • @220596Animesh
    @220596Animesh 3 місяці тому

    Bit coomplicated to understand during 19:10 time frame because of different actors having different data.

  • @niladripaul7032
    @niladripaul7032 10 місяців тому

    Put the code in a repo and please share it as well. Helps. Thanks..

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

    While building the object, can we have the DB calls to save the object parts into multiple tables? Because if we write the DB insertion code in the main code where director gives the final object, we may have to iterate object again

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

    Hi, Thanks for this nice video, May I know, which tool do you use used for video editing, recording or PPT design?

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

    Wondering why we need additional BuildDirector class?We can use only Builder and ConcreteBuilder class right..Because the core interface definition and implementation is present in these 2..

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

    While I understood the design pattern , I am having a bit of hard time in grasping where this should be used , as we could have used multiple constructors , and also even while using this pattern if the individual parts like cpu, monitor etc requires any arguments that anyway we'll need to pass , only thing is that the order of the arguments might not matter.

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

    you forgot to tell about creating singleton object using enum and inner class

  • @ashutoshjadhav
    @ashutoshjadhav 2 роки тому +2

    Thanks for doing this in C++ . I am crawling the internet for LLD course with C++ so that I can prepare for system design round . Do you know any learning path for system design High level ( I have bought grokking the system design interview from educative.io ) and for low level design. Your videos are surely helping a lot 🌼🌱💚

  • @RiyaSingh-nj1fx
    @RiyaSingh-nj1fx 2 роки тому

    Hey why do you left intuit ???

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

      When that happened?

    • @RiyaSingh-nj1fx
      @RiyaSingh-nj1fx 2 роки тому

      @@kx01 check her linkedin

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

    Hey, can you plz make one video on walmart codehers?
    Last year also I had applied but couldn't make it . Need ur proper guidance for this as walmart is my dream company😍
    Plz help me get this job🙏🏻

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

    Ye sab toh College may nhi padate hai , pakka didi ne course se sikha hoga , lekin batayegi nhi konse course se sikha hy , direct padayenge 😕

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

    Please provide 4-5 good resume template for freshers to apply for tech giant's like Microsoft linkedin level companies etc🙏🏻🙏🏻,i requested 2-3times but hasn't been uploaded 😅 just a request keerti 😇

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

      I am sorry for the delay, will do this soon for sure!

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

    The main function should look like this. If you don't want to delete, just create your objects on stack like, LenovoDesktopBuilder objLenovoDesktopBuilder; then call DesktopDirector Director1(&objLenovoDesktopBuilder).
    int main() {
    HpDesktopBuilder* pHpDesktopBuilder = new HpDesktopBuilder;
    DesktopDirector* pDirector1 = new DesktopDirector(pHpDesktopBuilder);
    Desktop* pDesktop1 = pDirector1->BuildDesktop();
    pDesktop1->showSpecs();
    delete pHpDesktopBuilder;
    delete pDirector1;
    DellDesktopBuilder* pDellDesktopBuilder = new DellDesktopBuilder;
    DesktopDirector* pDirector2 = new DesktopDirector(pDellDesktopBuilder);
    Desktop* pDesktop2 = pDirector2->BuildDesktop();
    pDesktop2->showSpecs();
    delete pDellDesktopBuilder;
    delete pDirector2;
    return 0;
    }

  • @THEGAMER-cc2eq
    @THEGAMER-cc2eq 7 місяців тому +1

    Your voice is very attractive

  • @himanshuupreti4728
    @himanshuupreti4728 9 місяців тому

    help me out for this question.
    Assume you are developing an API for a blogging platform using Node.js, Nestjs and GraphQL. The API has features like creating a new blog post, fetching all posts by a user, fetching single post details etc.
    One of the challenging requirements is to implement full text search functionality on blog posts i.e.. users should be able to search for specific keywords in the entire content of all blog posts.
    Given that MongoDB is your primary database, provide a detailed solution on how would you implement this requirement. Your answer should include steps from indexing data in MongoDB for text-based search to querying it using GraphQL.

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

    Nice, Can give an example of a real case scenario at the end.

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

    Nice Explaination🔥🔥