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
This 6 year old tutorials is even helpful now for my brush up for interviews...!! One of the Best, I found in youtube...
Thanks for your review, will keep adding educational content
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.
excellent, to understand properly I seen lots of videos but after your video now I m crystal clear. Thank you so much.
i like your quick and fast explanation .You talk to the point
Thank you.. your videos are almost like a lifeline.
amazing explanation. Greetings from Morocco
This is best way of teaching design patterns.
The example with coca cola bottle made the concept very clear. Such real life examples makes the concepts unforgettable. Thank you Navin.
Great Video Navin... Thank you... please upload more videos...
Thankyou so much naveen for such videos, got 100% hike after watching your videos.
Sir plz complete all the series as soon as possible we need your video plz sir continue....🙏🙏🙏
As always..superb!
Thank you. You are amazing. I wish you could upload more videos regarding design patterns
omg u make me understand this in 5 minutes great mann
Excellent! Thank you
It would be great if you could restart this series and upload the remaining design patterns as well. Your videos provide clear cut explanations
Thanks a lot
Good one thanks
Life saving video
name is really good!! telusuko :)
Muchas gracias!
is it same like using non param constructor and then just use some set methods?
sir,please help me, how to sort an array such that 3 digit number sorted first remaining last.
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
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.
Plz upload video on abstract factory design pattern
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!!
Do you have more videos with design patterns???
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 .
@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?
Sir can you please explain why we are overriding toString() in the POJO class?? Thanks in advance
If the method is not overridden you will get the memory location of your object instead of the individual values of fields
How is it different from bean class??
please make a video on observer pattern
Hi what do you do
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?
Immutable class will not be having setter, than we have to go for Builder design pattern.
Why are you making Phone immutable then?:) If phone is not immutable then again this pattern seems illogical?
pls upload remaining design patterns
I am finding bit difficulty in understanding builder pattern. One explained in gof book different from what is explained in internet
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.
Risteard O'B I agree.
welcome aliens? I don't want to be an alien
you are
bhai.. which label did you attach to the glass Coco-Cola bottle !!!
How is the board so tilted. It's almost cute:))
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
Idi kuda telsukunna sir
and also %5 first remaining last
Please upload design patterns in Python
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.
Our teacher took 2 hrs of lecture just to explain this same 4:54 minutes video. He had copied this same code.
What Is Your Teacher Name ?? 😂
@@harshitrathi3077 His name is also 1 hr long. 😀
So who's from Telusko's Android Tutorial!!
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.
Terrible video. No Director And Client Doing All The Work.
As I know Director is optional in Builder DP.