Tap to unmute

Java Builder Pattern Explained in 3 Minutes

  Рет қаралды 16,859

Jack Hodkinson

Jack Hodkinson

Күн бұрын

Пікірлер: 44
@jack.hodkinson
@jack.hodkinson 9 ай бұрын
What topic would you be interested in learning about next?
@PilarczykM
@PilarczykM 8 ай бұрын
Any design pattern will be valuable 🤗
@Play_Streams
@Play_Streams 9 ай бұрын
I love this no-fluff approach. Simple and straight to the point. Sub +1
@jack.hodkinson
@jack.hodkinson 9 ай бұрын
Thank you!
@jamessinnott8798
@jamessinnott8798 5 ай бұрын
Thanks for the video. Explained very well compared to some of the other tutorials I've seen online.
@DamLee88
@DamLee88 9 ай бұрын
also lombok @Builder makes the job easier, thanks good video
@DominikusHerzberg
@DominikusHerzberg 10 ай бұрын
Wow, very impressive explanation and coding style. The channel I was looking for but didn't know existed. Thank you very much!
@IvanToshkov
@IvanToshkov 10 ай бұрын
Nice. I normally prefer to use runtime checks and exceptions, but for more complex objects the multiple interfaces may pay up? Here's an idea for a followup video: You have three classes: an abstract Base class and classes A and B which extend it. Create builders for them without code duplication.
@returncode0000
@returncode0000 11 ай бұрын
I like your explanations so much! Always on point and really helpful, great job 👍
@jack.hodkinson
@jack.hodkinson 11 ай бұрын
Thank you :)
@mrindian7422
@mrindian7422 11 ай бұрын
Love the way you think ❤
@vendettavera4641
@vendettavera4641 8 ай бұрын
Nice explanation, can't wait for more
@prodevops6271
@prodevops6271 10 ай бұрын
Love it and subscribed after watching fist 15 seconds of this video.❤
@PilarczykM
@PilarczykM 8 ай бұрын
Very good explanation 🎉
@vib7777
@vib7777 6 ай бұрын
Awesome!! Subscribed
@vladtudorache2483
@vladtudorache2483 5 ай бұрын
Your best video.
@burningfire2k
@burningfire2k 10 ай бұрын
That was a fast explanation 👏
@SeamanGR
@SeamanGR 9 ай бұрын
You can use also a Record class, the fields in a record class are immutable as well.
@bcampera
@bcampera 7 ай бұрын
Thanks for the explanation. I feel like this is only needed because of modern features that other languages have and Java doesn't. I had some experience with Dart and I loved its named constructors and named mandatory and optional parameters. I will never understand why this doesn't get added to Java
@maximschott1300
@maximschott1300 4 ай бұрын
Thanks a lot for this video! +1 sub, so don't stop recording the interesting videos :)
@mrindian7422
@mrindian7422 11 ай бұрын
Can you pls create complete playlist for along with real time project in Java 8 for collage student
@jack.hodkinson
@jack.hodkinson 11 ай бұрын
Working on it! I have a live coding project here, where I implement an ArrayList in real time kzbin.info/www/bejne/hmOzXo2Lq66mkK8
@mrindian7422
@mrindian7422 11 ай бұрын
@@jack.hodkinson Thank you very much
@PrasantaBarada-t7s
@PrasantaBarada-t7s 10 ай бұрын
I am your 1000th number Subscriber
@jack.hodkinson
@jack.hodkinson 10 ай бұрын
Thank you! Welcome
@tylerbakeman
@tylerbakeman 10 ай бұрын
Coding setters as chain-able methods is always satisfying: instead of- void setX () { … } using- ClassName setX() { … return this; } so you can theoretically: object.setX( v1 ).setY( v2 )… The only issue is if the setter’s aren’t final (returning a value other than this)- setters should probably be final anyhow (unless you have some sort of EventDispatch system).
@ИвелинъСтояновъ
@ИвелинъСтояновъ 9 ай бұрын
Could you share the editor theme from the examples?
@jack.hodkinson
@jack.hodkinson 9 ай бұрын
Hi, the examples are all written in markdown using Marp (marp.app/). I use the Visual Studio Code extension.
@noelgomile3675
@noelgomile3675 9 ай бұрын
Would this be needed if Java had named parameters?
@jack.hodkinson
@jack.hodkinson 9 ай бұрын
Good question. Not really!
@dentjoener
@dentjoener 9 ай бұрын
I always tell people that builders are just shitty excuses for named parameters. I tend to shy away from them because I hate them with a passion. Use smaller objects that can be composed into larger objects, link this with some domain driven design (a name might be a string, but an Email sure as hell shouldn't be), and there's way less issues. Also static factory methods >>> constructors.
@ShubhamKumar-vh7ti
@ShubhamKumar-vh7ti 10 ай бұрын
Subscribed
@jack.hodkinson
@jack.hodkinson 10 ай бұрын
Thank you!
@sobeck6900
@sobeck6900 9 ай бұрын
WOW, explained more in 3 min than some books...
@loyyeeko1231
@loyyeeko1231 10 ай бұрын
wonderful
@Ewig_Luftenglanz
@Ewig_Luftenglanz 9 ай бұрын
Java seriously needs to consider adding support for named parameters. There is just too much one needs to to in order to have the same functionality as python, dart and kotlin named parameters (it would also help a lot with deconstruction patterns, which they are trying to get good using the new proposed "with" keyword
@softwaretactics1536
@softwaretactics1536 9 ай бұрын
It is so mind boggling that you have imbibed so much into a 3 minute video!
@farshidnaqizadeh159
@farshidnaqizadeh159 10 ай бұрын
why just return class object in setter? so alots of codes are removed and result is the same.
@desoroxxx
@desoroxxx 10 ай бұрын
No, otherwise you wouldn't be able to chain them
@scarletdice
@scarletdice 9 ай бұрын
then you have a class that is mutable. might not what you want when immutability is intended.
@poloolo69
@poloolo69 10 ай бұрын
real
@terrytorres5026
@terrytorres5026 9 ай бұрын
Wholy crap,then we wonder why coding is overcomplicated and breaks when new releases of Java come out.
@josepescina4360
@josepescina4360 9 ай бұрын
too much work
Java Equals is Bonkers
4:02
Jack Hodkinson
Рет қаралды 1,1 М.
Java Generics Explained
13:45
Jack Hodkinson
Рет қаралды 47 М.
УНО Реверс в Амонг Ас : игра на выбывание
0:19
Фани Хани
Рет қаралды 1,3 МЛН
Their Boat Engine Fell Off
0:13
Newsflare
Рет қаралды 15 МЛН
Master the Fluent Builder Design Pattern in C#
15:05
Milan Jovanović
Рет қаралды 30 М.
Why I’m Switching To Go in 2024
8:10
Awesome
Рет қаралды 100 М.
How Senior Programmers ACTUALLY Write Code
13:37
Thriving Technologist
Рет қаралды 1,6 МЛН
ПАТТЕРН BUILDER (СТРОИТЕЛЬ) JAVA LOMBOK
13:37
Джавист
Рет қаралды 8 М.
Golang: The Last Interface Explanation You'll Ever Need
17:58
Flo Woelki
Рет қаралды 27 М.
Builder Design Pattern Explained in 10 Minutes
10:45
Kantan Coding
Рет қаралды 35 М.
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 906 М.
Java паттерны проектирования 3: Builder
6:54
Уроки Java
Рет қаралды 15 М.
The State Design Pattern in Python Explained
19:14
ArjanCodes
Рет қаралды 79 М.