Тёмный

Builder Design Pattern (An Introduction for .NET Developers [.NET 5 and C#]) 

DotNet Core Central
Подписаться 27 тыс.
Просмотров 11 тыс.
50% 1

In this video, I am going to walk through the Builder Design Pattern. It is an Introduction video for .NET Developers [.NET 5 and C#].
The Builder design pattern is one of the creational design patterns. This pattern is not very common but very used in scenarios where the creation of an object can become complex.
The previous two videos in this Design Pattern series are:
1. Factory method design pattern: • Factory Method Design ...
2. Abstract factory design pattern: • Abstract Factory Desig...
00:06 - Explaining what is Builder pattern
00:45 - Traditional way for an object creating using a constructor
01:55 - Introduction of the builder class
02:35 - Defining an interface
04:08 - Implementation of the builder class
07:12 - Using builder pattern to register the object in dependency injection container
08:40 - A daily used example of the builder pattern
My blog URL: dotnetcorecentral.com/
My RU-vid channel URL: / dotnetcorecentral
My GitHub repo URL: github.com/choudhurynirjhar

Наука

Опубликовано:

 

30 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 22   
@rajneesh19852
@rajneesh19852 4 месяца назад
It's a layman explanation. Thanks for sharing
@seyhmusozbek
@seyhmusozbek Год назад
that was the simplest and clearest explanation of the pattern. good job.
@DotNetCoreCentral
@DotNetCoreCentral Год назад
Thanks
@shivaganga9148
@shivaganga9148 4 месяца назад
Simple explanation thanks
@DotNetCoreCentral
@DotNetCoreCentral 4 месяца назад
You are welcome
@MrChuyelChief
@MrChuyelChief Год назад
All clear, thanks so much for you excellent explain
@DotNetCoreCentral
@DotNetCoreCentral Год назад
Thanks
@williamliu8985
@williamliu8985 2 года назад
Thanks! That`s simple and easy to understand! One more question, can I use the "init accessor" from C#9 instead if I want the immutable properties?
@DotNetCoreCentral
@DotNetCoreCentral 2 года назад
@William Liu, I guess you can use init for creating an immutable property. I am not 100% sure how it will work in this scenario, I will have to try it out and see.
@paulofernandoee
@paulofernandoee 2 года назад
Nice vídeo!
@DotNetCoreCentral
@DotNetCoreCentral 2 года назад
Thanks!
@mahendranchinnaiah7593
@mahendranchinnaiah7593 2 года назад
Thanks much. It would be helpful If you starts the session for Azure or CI/CD pipeline integration...
@DotNetCoreCentral
@DotNetCoreCentral 2 года назад
@Mahendran Chinnaiah, thanks for watching! I will definitely start on Azure in the coming week.
@pawansarwal9507
@pawansarwal9507 9 месяцев назад
How to set address if in case Address is a separate class means address field of User is of type Address. Address class may have fields like StreetNumber, Street, City etc.
@zxph
@zxph 9 месяцев назад
This was a good intro, but I believe creating the user object in the builder constructor was a mistake. Better to create the user object in the build function, that way you don't have to list all the user properties twice in the builder, and you can keep private setters in the user class itself.
@twitchdude55
@twitchdude55 Год назад
just create a interface for the builder and use register it in the ICO not the class itself, so you can use the class in the client or in the api to get the values or assign them in the api not in the registration
@xxXAsuraXxx
@xxXAsuraXxx Год назад
Nice one, can you show how to do async builder with Task?
@DotNetCoreCentral
@DotNetCoreCentral Год назад
Thanks for watching! Sure I will do that.
@AliRaza-zy1zk
@AliRaza-zy1zk 6 месяцев назад
Sometimes it look some patterns are over complex with no reason to use
@kacperk648
@kacperk648 2 года назад
"services.AddSingleton" what it is?
@DotNetCoreCentral
@DotNetCoreCentral 2 года назад
This is for adding service into dependency injection container
@user-ge2vc3rl1n
@user-ge2vc3rl1n Год назад
I think this is part of the dotnet web api start up project. Checkout dotnet web apis and checkout singleton pattern.
Далее
When You Get Ran Over By A Car...
00:15
Просмотров 3,4 млн
BABYMONSTER - ‘FOREVER’ M/V
03:54
Просмотров 10 млн
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
The Smart Way of Using the Decorator Pattern in C#
12:37
Builder Pattern Example in C#
11:28
Просмотров 17 тыс.
Abstract Factory Pattern Made Simple in C#
25:04
Просмотров 2,2 тыс.
Factory Design Pattern Introduction
22:43
Просмотров 274 тыс.
Builder Design Pattern (C#)
12:05
Просмотров 36 тыс.
Singleton Design Pattern in C# - Do it THAT way
13:15
Lid hologram 3d
0:32
Просмотров 10 млн