Город МОСКОВСКИЙ
00:14:50

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

Аватар
Программирование Предельное
Просмотры:
23
Дата загрузки:
03.12.2023 16:11
Длительность:
00:14:50
Категория:
Технологии и интернет

Описание

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: https://youtu.be/1juTvQXAjTM

SOURCE CODE: https://github.com/SingletonSean/design-patterns-csharp

OTHER LINKS:
Become a Member: https://www.youtube.com/channel/UC7X9mQ_XtTYWzr9Tf_NYcIg/join
Donations: https://www.paypal.com/biz/fund?id=UBZCZWX2UVWJE

Рекомендуемые видео