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

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

КОМЕНТАРІ • 50

  • @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 6 місяців тому

    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 роки тому +3

    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 👍

  • @charuprabha9696
    @charuprabha9696 2 місяці тому +1

    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?

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

  • @ritikjain24
    @ritikjain24 4 місяці тому +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.

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

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

  • @anuraagkhandagle5130
    @anuraagkhandagle5130 Рік тому +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?

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

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

    Thanks Keerti , A very good video on Builder pattern .

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

    These vids i am ready to pay for !!!

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

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

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

    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.

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

    Thank You Keerti for this video, it is really helpful

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

    Thanks. It was very helpful

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

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

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

    Very good presentation madam thanks

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

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

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

    Nice Explaination🔥🔥

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

    Awesome explanation

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

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

    Hi Keerti , please upload structural and behavioral patterns also

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

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

    Thanks a lot! Please increase video frequency.

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

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

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

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

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

    Your voice is very attractive

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

    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.

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

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

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

  • @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 2 роки тому

    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!

  • @ashutoshkumar4565
    @ashutoshkumar4565 Місяць тому

    I see this as tomato TOMAATO....nothing more than a facade for client...similar things when used in different context have different name...I don't understand why have people made so many "different" DPs

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

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