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

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ก.ย. 2024

ความคิดเห็น • 49

  • @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 3 หลายเดือนก่อน

    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 👍

  • @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.

  • @jenishadsouza907
    @jenishadsouza907 2 ปีที่แล้ว +2

    Really helpful, please continue the series!

  • @dipakingle6629
    @dipakingle6629 2 ปีที่แล้ว +1

    Really Helpful video, Please keep posting series for patterns.

  • @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.

  • @nareshsattineni3545
    @nareshsattineni3545 2 ปีที่แล้ว

    Great video Please continue the Series.It was very helpful

  • @ritikjain24
    @ritikjain24 28 วันที่ผ่านมา

    Doesn't this pattern have 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.

  • @ngneerin
    @ngneerin 2 ปีที่แล้ว +3

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

  • @THEGAMER-cc2eq
    @THEGAMER-cc2eq 6 หลายเดือนก่อน +1

    Your voice is very attractive

  • @srivastavaprakharsunil9732
    @srivastavaprakharsunil9732 ปีที่แล้ว

    These vids i am ready to pay for !!!

  • @iamnoob7593
    @iamnoob7593 2 ปีที่แล้ว

    Thanks Keerti , A very good video on Builder pattern .

  • @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.

  • @DaniiMouse8
    @DaniiMouse8 ปีที่แล้ว

    Thank You!

  • @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.

  • @md.al-amin1650
    @md.al-amin1650 2 ปีที่แล้ว

    Thanks. It was very helpful

  • @santhoshreddy1284
    @santhoshreddy1284 2 ปีที่แล้ว +1

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

  • @umeshsurve8747
    @umeshsurve8747 11 หลายเดือนก่อน

    Very good presentation madam thanks

  • @souvikmukherjee2404
    @souvikmukherjee2404 2 ปีที่แล้ว

    Thank You Keerti for this video, it is really helpful

  • @anuraagkhandagle5130
    @anuraagkhandagle5130 9 หลายเดือนก่อน

    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?

  • @AnuragKumar-cb5lr
    @AnuragKumar-cb5lr 2 ปีที่แล้ว

    Thanks a lot! Please increase video frequency.

  • @chaitanya5885
    @chaitanya5885 2 ปีที่แล้ว

    Hi Keerti , please upload structural and behavioral patterns also

  • @learntocode8012
    @learntocode8012 2 ปีที่แล้ว

    Awesome explanation

  • @hitengarg3167
    @hitengarg3167 2 ปีที่แล้ว

    Nice Explaination🔥🔥

  • @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

  • @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.

  • @joed8805
    @joed8805 2 ปีที่แล้ว

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

  • @220596Animesh
    @220596Animesh 2 หลายเดือนก่อน

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

  • @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..

  • @niladripaul7032
    @niladripaul7032 9 หลายเดือนก่อน

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

  • @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

  • @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!

  • @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 🌼🌱💚

  • @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;
    }