Builder Design Pattern in Java Theory

Поділитися
Вставка
  • Опубліковано 19 бер 2016
  • Recommended Book :
    Head First Design Pattern : amzn.to/2pY5xbR
    Builder Design Pattern in Java Theory
    This video contains theory session of Builder Design Pattern.
    Builder design pattern belongs to Creational design pattern which is a type of Design Patterns in java.
    Builder design pattern is a creational design pattern like Factory Pattern and Abstract Factory Pattern.
    Builder pattern builds a complex object using simple objects and uses step by step approach.
    A Builder class builds the final object step by step. This builder is independent of other objects.
    Trainer: Navin Reddy
    Check out our website: www.telusko.com
    Follow Telusko on Twitter: / navinreddy20
    Follow on Facebook:
    Telusko : / teluskolearnings
    Navin Reddy : / navintelusko
    Follow Navin Reddy on Instagram: / navinreddy20
    Subscribe to our other channel:
    Navin Reddy : / @navinreddy
    Telusko Hindi :
    / @teluskohindi
    Subscribe to the channel and learn Programming in easy way.
    Java Tutorial for Beginners : goo.gl/p10QfB
    Scala Tutorials for Java Developers : goo.gl/8H1aE5
    C Tutorial Playlist : goo.gl/8v92pu
    Android Tutorial for Beginners Playlist : goo.gl/MzlIUJ
    XML Tutorial : goo.gl/Eo79do
    Design Patterns in Java : goo.gl/Kd2MWE
    Java Servlet : goo.gl/R5nHp8
    Hibernate Tutorial :goo.gl/N5ONYg
    Spring MVC Tutorial : goo.gl/9ubbG2
    OpenShift Tutorial for Beginners : goo.gl/s58BQH
    Spring Framework with Maven : goo.gl/MaEluO
    Sql Tutorial for Beginners : goo.gl/x3PrTg
    String Handling in Java : goo.gl/zUdPwa
    Array in Java : goo.gl/uXTaUy
    Socket Programming in Java : goo.gl/jlMEbg
    Exception Handling in Java : goo.gl/N4NbAW
    Regards,
    Navin Reddy

КОМЕНТАРІ • 59

  • @HarishShankar1995
    @HarishShankar1995 3 роки тому +49

    This 6 year old tutorials is even helpful now for my brush up for interviews...!! One of the Best, I found in youtube...

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

      Thanks for your review, will keep adding educational content

  • @tarunseetha
    @tarunseetha 4 роки тому +8

    Thanks a lot for sharing this video. I am simply fan of you and your way of teaching. You always choose best and easy examples to set the concept in any layman's mind.

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

    excellent, to understand properly I seen lots of videos but after your video now I m crystal clear. Thank you so much.

  • @AdityaRajVerma
    @AdityaRajVerma 4 роки тому +1

    i like your quick and fast explanation .You talk to the point

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

    Thank you.. your videos are almost like a lifeline.

  • @khalidben9940
    @khalidben9940 7 років тому +4

    amazing explanation. Greetings from Morocco

  • @adityakumar-kj3ch
    @adityakumar-kj3ch 2 роки тому

    This is best way of teaching design patterns.

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

    The example with coca cola bottle made the concept very clear. Such real life examples makes the concepts unforgettable. Thank you Navin.

  • @bkpatel81
    @bkpatel81 8 років тому

    Great Video Navin... Thank you... please upload more videos...

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

    Thankyou so much naveen for such videos, got 100% hike after watching your videos.

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

    Sir plz complete all the series as soon as possible we need your video plz sir continue....🙏🙏🙏

  • @TheFlyguy31
    @TheFlyguy31 7 років тому

    As always..superb!

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

    Thank you. You are amazing. I wish you could upload more videos regarding design patterns

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

    omg u make me understand this in 5 minutes great mann

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

    Excellent! Thank you

  • @sravan8643
    @sravan8643 2 роки тому +4

    It would be great if you could restart this series and upload the remaining design patterns as well. Your videos provide clear cut explanations

  • @mohammedviso2269
    @mohammedviso2269 7 років тому

    Thanks a lot

  • @NafisMd
    @NafisMd 8 років тому

    Good one thanks

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

    Life saving video

  • @gopikomanduri8658
    @gopikomanduri8658 7 років тому +2

    name is really good!! telusuko :)

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

    Muchas gracias!

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

    is it same like using non param constructor and then just use some set methods?

  • @harishreddy2130
    @harishreddy2130 8 років тому

    sir,please help me, how to sort an array such that 3 digit number sorted first remaining last.

  • @sreenivasvp3340
    @sreenivasvp3340 7 років тому +3

    Just a small comment : For a phone that does not have camera : It prints null on printing the object. NPE, if you try to access the camera.
    Yes the intent of pattern is explained! When we have N parameters to be passed to the constructor that's code smell and candidate for Builder

    • @atamishali
      @atamishali 8 місяців тому

      For that we can have default values. Say default battery is 5000 mah and default camera is 24MP camera. When a value is not passed while using builder, default value can be used.

  • @shaziyasultana4373
    @shaziyasultana4373 4 роки тому

    Plz upload video on abstract factory design pattern

  • @akashdubey.consultant
    @akashdubey.consultant 6 років тому +1

    this tutorial is good, However the video quality is very choppy and audio break frequently, this looks like a great content loosing battle to a bad editing ( audio and video) please fix it, i love the stuff you make!!

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

    Do you have more videos with design patterns???

  • @nidhisinghal4109
    @nidhisinghal4109 6 років тому +1

    Hi Tutorial is quit Good---But Incomplete . As per my Knowledge about DP i.e Builder DP your builder Class must follow inner class concept .

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

    @ajay_kumar7
    0 seconds ago
    I didnt get the correct use of builder design patter by adding additional class PhoneBuilder we can also use getter and setter i Phone class itself and use any setter method whichever value its present it will set?
    Please help to resolve this issue?

  • @SUMANRANI-hf7xy
    @SUMANRANI-hf7xy 3 роки тому

    Sir can you please explain why we are overriding toString() in the POJO class?? Thanks in advance

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

      If the method is not overridden you will get the memory location of your object instead of the individual values of fields

  • @vijaypm5853
    @vijaypm5853 5 років тому

    How is it different from bean class??

  • @shipra578
    @shipra578 6 років тому +1

    please make a video on observer pattern

  • @nincako
    @nincako 7 років тому +3

    I have one question. That pattern gives opportunity to us not to remember the order of parameters. Instead why we don't create a Phone with default parameters (no arguement constructor) and then set/change the parameters as we like by setter methods? why we need a separate class for this?

    • @nirbhaygupta8397
      @nirbhaygupta8397 7 років тому +3

      Immutable class will not be having setter, than we have to go for Builder design pattern.

    • @nincako
      @nincako 7 років тому

      Why are you making Phone immutable then?:) If phone is not immutable then again this pattern seems illogical?

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

    pls upload remaining design patterns

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

    I am finding bit difficulty in understanding builder pattern. One explained in gof book different from what is explained in internet

  • @risteardob2095
    @risteardob2095 6 років тому +10

    What you have explained is not the Builder design pattern. There is no Director in your explanation. Also with your solution it looks like the client will still have to call a bunch of setters, that should not need to happen.

    • @kkthatik
      @kkthatik 4 роки тому

      Risteard O'B I agree.

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

    welcome aliens? I don't want to be an alien

  • @yoapps137
    @yoapps137 5 років тому

    bhai.. which label did you attach to the glass Coco-Cola bottle !!!

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

    How is the board so tilted. It's almost cute:))

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

    but dont u think drawback of this is we are hard coding .... if we want to used this then we need to which method to set and get

  • @brotherandsister9203
    @brotherandsister9203 11 місяців тому

    Idi kuda telsukunna sir

  • @harishreddy2130
    @harishreddy2130 8 років тому

    and also %5 first remaining last

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

    Please upload design patterns in Python

  • @tamannapant2810
    @tamannapant2810 5 років тому +2

    When I saw your video first could not understand what you are talking about.You mentioned that you have a practical created , I watched that and then came back here and could relate to what you are saying. The coke-a-Cola example, What are you talking about how does that relate to this ? That is not a correct example you have provided. It really confuses.

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

    Our teacher took 2 hrs of lecture just to explain this same 4:54 minutes video. He had copied this same code.

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

      What Is Your Teacher Name ?? 😂

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

      @@harshitrathi3077 His name is also 1 hr long. 😀

  • @vikasingle3972
    @vikasingle3972 5 років тому +6

    So who's from Telusko's Android Tutorial!!

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

    THIS IS NOT A BUILDER PATTERN.
    Real Characteristics of Builder Pattern are below :
    1. First of all you need to create a static nested class and then copy all the arguments from the outer class to the Builder class. We should follow the naming convention and if the class name is Computer then builder class should be named as ComputerBuilder.
    2. Java Builder class should have a public constructor with all the required attributes as parameters.
    3. Java Builder class should have methods to set the optional parameters and it should return the same Builder object after setting the optional attribute.
    4. The final step is to provide a build() method in the builder class that will return the Object needed by client program. For this we need to have a private constructor in the Class with Builder class as argument.

  • @hennaartistica3268
    @hennaartistica3268 5 років тому

    Terrible video. No Director And Client Doing All The Work.

    • @johnnguyen1655
      @johnnguyen1655 4 роки тому

      As I know Director is optional in Builder DP.