Тёмный

Decorator Pattern - DESIGN PATTERNS (C#/.NET) 

SingletonSean
Подписаться 22 тыс.
Просмотров 6 тыс.
50% 1

Learn about the decorator pattern, which is a structural design pattern that allows us to wrap an object for additional functionality. This pattern stresses taking a composition approach to extending applications, rather than an inheritance approach. Composition increases flexibility and prevents class explosions, as I demonstrate.
As a bonus, I implementing the Builder pattern with our Decorators to show how well the Builder and Decorator patterns play together.
Design patterns are important for implementing object-oriented designs and adhering to SOLID principles. Understanding these fundamental patterns helps software developers build clean and maintainable applications.
TIMESTAMPS:
0:00 - Pattern Introduction
0:59 - Demo Introduction
2:00 - Non-Decorator Approach (Inheritance Class Explosion)
7:14 - Implementing Decorators (Goodbye Inheritance)
9:05 - Using Decorators
10:20 - Adding a Builder (BONUS)
14:15 - Conclusion
BUILDER PATTERN: • Builder Pattern - DESI...
SOURCE CODE: github.com/SingletonSean/desi...
OTHER LINKS:
Become a Member: / @singletonsean
Donations: www.paypal.com/biz/fund?id=UB...

Наука

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

 

8 июл 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 21   
@yigitgnc
@yigitgnc Год назад
Man, I just randomly found this video to demonstrate decorator pattern to a junior collogue. then now I forgot what the decorator pattern is Thanks!
@SingletonSean
@SingletonSean Год назад
Awesome, glad this was helpful Yiğit!
@robertastutlys8641
@robertastutlys8641 Год назад
A huge thanks again for sharing your knowledge in such a lucid way
@alexeylobankov
@alexeylobankov 2 года назад
Very clean. Thanks!
@mrsajjad30
@mrsajjad30 2 года назад
Today's special item was Decorator with Builder pattern topping on it. Thank you so much for explaining the concept with such a beautiful example.
@SingletonSean
@SingletonSean 2 года назад
Glad you enjoyed it S Afzal, more on the way!
@foxred2380
@foxred2380 2 года назад
Thank you for video Sean, waiting for more patterns
@SingletonSean
@SingletonSean 2 года назад
Awesome Fox Red, more on the way!
@pleasecheckmyid
@pleasecheckmyid 3 года назад
This is excellent; thanks as always.
@SingletonSean
@SingletonSean 3 года назад
Thanks for the continuous support and feedback, pleasecheckmyid!
@dasfahrer8187
@dasfahrer8187 2 года назад
You and Chris Fix sound so much alike it's hilarious sometimes listening to your videos. Keep 'em coming. Great stuff!
@SingletonSean
@SingletonSean 2 года назад
Hahah that's so weird, I was just watching one of his videos the other day for something I was working on. Anyways, more vids on the way!
@williamliu8985
@williamliu8985 2 года назад
Beautiful! Learn two patterns in less than 15 mins.
@SingletonSean
@SingletonSean 2 года назад
Awesome William, the more learning the better!
@meilleur102
@meilleur102 2 года назад
Hi! really love your video. Question for you. Why you use a interface for the menu and not a regular model?
@mariozerrini1408
@mariozerrini1408 Год назад
how can i add the memento pattern to this particular code please
@YSoreil
@YSoreil 2 года назад
Part of the issue in the example here is not having multiple inheritance in C#. Not putting a judgement on the value of it but it's at least partially a language issue.
@SingletonSean
@SingletonSean 2 года назад
True! Even if multiple inheritance was in C#, I'd still prefer using composition patterns like this. I think multiple inheritance can create more complexity and can be a bit more difficult for other developers understand. On the other hand, I shouldn't impose my opinion since most languages I work with don't support multiple inheritance hahah
@iancarr3923
@iancarr3923 2 года назад
Hi Sean. .Net Maui and .Net Maui Blazor are Q1/Q2. Do you plan videos please? Particularly interested in Wpf with .Net Maui Blazor. Thanks
@SingletonSean
@SingletonSean 2 года назад
I do have plans to get into this, Ian! I'm pretty excited for Maui and had tried out the preview releases too. Hopefully it really is ready in Q1/Q2.
@iancarr3923
@iancarr3923 2 года назад
@@SingletonSean Thanks Sean.
Далее
Bridge Pattern - DESIGN PATTERNS (C#/.NET)
11:01
Просмотров 4,9 тыс.
Command Pattern - DESIGN PATTERNS (C#/.NET)
18:11
Просмотров 4,2 тыс.
Редакция. News: 124-я неделя
52:01
Просмотров 1,9 млн
What turned out better to repeat? #tiktok
00:16
Просмотров 2,7 млн
Abstract Factory Pattern - DESIGN PATTERNS (C#/.NET)
11:19
Facade Pattern - DESIGN PATTERNS (C#/.NET)
8:33
Просмотров 4,3 тыс.
Design Patterns: Decorator
17:21
Просмотров 25 тыс.
Factory Pattern - DESIGN PATTERNS (C#/.NET)
9:46
Просмотров 15 тыс.
The Power Of Golang's Decorator Pattern
14:09
Просмотров 43 тыс.
Simplest Decorator Design Pattern in C#
10:55
Просмотров 25 тыс.
ИГРОВОВЫЙ НОУТ ASUS ЗА 57 тысяч
25:33