Builder Design Pattern Explained (with Code Examples)

preview_player
Показать описание
In today's video I'll be taking you through the Builder Pattern in programming, which is one of the most popular and powerful design patterns out there.

The builder pattern allows you to have a more structured way of building instances of your objects, and has many benefits including:
- immutability
- easy validation of complex business logic
- avoids long and confusing constructor parameter lists

Source code for this video:

For your reference, check this out:

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!

#dcode #programming
Рекомендации по теме
Комментарии
Автор

We need more design pattern videos from such a great channel like you.

白飯魚-kw
Автор

Nice vid! I just started using this one myself!

AtomicEnd
Автор

Underrated channel, looking forward to more of these videos

_vikramhegde_
Автор

Love your videos because they're not typical simple and boring js stuff.

yassinyoussoufali
Автор

from now onwards my project will see a lot of builder patterns. You thoroughly covered every aspect, thanks for making this!

ghosteng
Автор

Great tutorial sir... It made me understand the basic idea of builder pattern so easily :) ... ❤️❤️✌️

parasarora
Автор

that was such a great video i must say!

alesblaze
Автор

You're the best!!! Keep teaching us <3

barcellos-pedro
Автор

Thanks for making this wonderful video. After watching it, I tried to use it in my code. Suppose I have 3 methods and in these 3 methods I am getting details from user about processor, ram, colour so how we have to save this information. Are we creating a builder to store the values or we have to create local variables and after storing values in these variables we need to store into our Builder(In this case only one builder will be created because we are storing values into variables first but in this case we need to create so many variables). In second approach, if we are storing each value in different builder then we need to create multiple builders. So which approach is better as according to you?

manindersingh
Автор

Do you think the Builder Pattern could be an effective way to build different kinds of AiControllers with different behaviours/states and abilities, say for an Orc, Goblin, Troll, etc? Would the architecture flow look like? Thanks

inkofthedragon
Автор

I like this, but I don't understand how we create a car instance in which we set the cylinders or fuel. It seems we are stuck with the default.

vusimdudu
Автор

Hello, friend, I have a question. How can I reuse the Builder code for different classes. Can you make an example?

codigo
Автор

This is amazing ... can we have a video series on design patterns please 😍😍😍

shamaldesilva
Автор

what is the extension you use that imports files automatically?

dgknca
join shbcf.ru