Тёмный

Abstract Factory Class Design Pattern | C# 

Code Radiance
Подписаться 14 тыс.
Просмотров 16 тыс.
50% 1

Abstract factory can be used when we need to have common functionality for two or more concrete factory classes. Watch this video and learn how to create and use them.
Factory Class Design Pattern: • C# | Factory Design Pa...
►►►SUBSCRIBE for more: ru-vid.com?s...
----------My Social Links:
🔴 My Channel: / codefirst
🔴 View Playlists: / codefirst
🔴 My Github: github.com/Nitij

Наука

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

 

21 июл 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 17   
@deependrajoshi199
@deependrajoshi199 Год назад
Nice explanation but in a very complicated manner.
@pranayaraga
@pranayaraga 3 года назад
You have nicely explained how to implement Abstract factory pattern. But, it would have been great if you had explained the problem that this pattern solves. Anyways, good effort. thanks.
@apurvsingh1985
@apurvsingh1985 2 года назад
Explained so well thanks!
@AjaySingh-fq4fz
@AjaySingh-fq4fz 4 года назад
Wow that's so nicely Explain
@gurudevsinghdhirte
@gurudevsinghdhirte 4 года назад
Nice explanation. Please add more videos of other commonly used design patterns with simple examples.
@CodeRadiance
@CodeRadiance 4 года назад
Sure.
@usmankhokhar4569
@usmankhokhar4569 4 года назад
Great Explanation loved the way you delivered. But I just need to understand one thing what was the advantage to create the interface?
@CodeRadiance
@CodeRadiance 4 года назад
Having an interface allows us to inject different implementations.
@ramakrishnamalla3607
@ramakrishnamalla3607 3 года назад
Nice explanation...
@ThinkTank007
@ThinkTank007 Год назад
facing null reference ,could you provide the code pl
@keshavprasad355
@keshavprasad355 4 года назад
Can you provide the this code?
@absh9691
@absh9691 4 года назад
First, return type of abstract factory should be interface. second, abstract factory name doesn't imply that we need to create abstract class, interface will do the work. Plz go through Java JPA api documentation, you will find good example of abstract factory.
@CodeRadiance
@CodeRadiance 4 года назад
Hey, thanks for taking your time to comment. I don't claim to be an expert but here is what I think: 1) The idea is to disconnect client from the concrete factory implementation. At some point the abstract factory will have to give enough information about which concrete implementation to use; or better just return the implementation. 2) Code will have to figure out which concrete factory to use. Abstract factory or its childrens can encapsulate that code thus organizing everything nicely. sure you can use an interface thats your choice. I would suggest to understand the need of a design pattern and the problem itself rather than focusing too much on any specific type of pattern code implementation. The implementation can vary from project to project; it is the academics that make the mistake of believing a solution is final. Professionals know that only that solution is final which works and satisfies the project and client needs.
@moe45673
@moe45673 4 года назад
​@@CodeRadiance I agree with Ab Sh. Your abstract factory should be designed to create families of objects that go together, not to create one object of varying types. The reason for doing this would be the cases where certain derivations need to compose specific objects, but how these derivations behave depends on some larger overarching setting that it sits within. In other words, Abstract Factory can be described (in most cases) as a Factory that is composed of one or more factory methods, each of which return an abstract object. So a PersonFactory would have CreateArm(), CreateLeg(), etc. The type of person would specify the type arm/leg, etc. So you could have AthleticMan, AthleticWoman, SedentaryMan, SedentaryWoman. Both men would share similarities (example CreateBeard() ) which neither woman would implement. However, both Athletic instances would share stuff that the Sedentary subtypes wouldn't as well.
@CodeRadiance
@CodeRadiance 4 года назад
@@moe45673 Hey thanks for your response. So I get what you are saying. But at the same time a factory can have many different kinds of implementations as long as we are sticking to its core principles. Who is to say that I cannot have an abstract factory which will will act as a base for any existing/newly created factory in the project? No one can claim to be an expert on this broad topic; I am certainly not. If you just want to have a factory contract then use an interface. If you want to have some additional behavior attached then create an abstract factory; its simple as that. You want to construct and return a family of objects from the factory? Sure if that suits your needs then do that. I think that the sole purpose of an abstract factory should be to act as an abstract layer for any factory class so that when devs will construct new factory classes they will do so by remaining within the project framework's boundaries. This in turn makes sure that the system will not require much testing for these changes.
@brianlaudrupchannel
@brianlaudrupchannel 4 года назад
This is not abstract factory pattern
@GKRamazingvideos
@GKRamazingvideos 3 года назад
abe itna compelx q bna diya simple method lekr bta sakte the
Далее
Adapter Design Pattern in C# with Code Example
12:03
Просмотров 11 тыс.
Amazing weight loss transformation !! 😱😱
00:24
Beautiful gymnastics 😍☺️
00:15
Просмотров 11 млн
C# Observer Pattern Example
14:10
Просмотров 31 тыс.
Abstract Factory Pattern - Design Patterns (ep 5)
25:54
Factory Pattern in C#: Creating Objects with Ease
12:54
C# | Factory Design Pattern Implementation
24:34
Просмотров 12 тыс.
Abstract Factory Design Pattern
27:50
Просмотров 135 тыс.
Simplest Strategy Design Pattern in C#
13:00
Просмотров 10 тыс.
Factory Method Pattern - Design Patterns (ep 4)
27:21
Просмотров 539 тыс.
System Design Interview - Distributed Cache
34:34
Просмотров 352 тыс.
Здесь упор в процессор
18:02
Просмотров 373 тыс.
iPhone socket cleaning #Fixit
0:30
Просмотров 14 млн