Prefer Composition Over Inheritance - A Real-World Example

preview_player
Показать описание
Prefer Composition Over Inheritance is an important tenet of Object oriented programming, but what's so bad about Inheritance? In this video, we'll explore some of these problem with an example of a real-word scenario and then also look at a solution to the problem using Composition.

Source for the Visual Studio Solution discussed in this video:

Bookmarks
00:00 Intro
00:18 What are we learning Today?
01:15 The Real Issue with Inheritance
02:08 Reasons Not to Use Inheritance
02:58 My Opinion On Inheritance
03:32 The Example Code/Project
03:48 Not A Big Fan of Libraries/Reuse
04:28 The Genesis of this Video
05:06 The Rule Of Thirds
06:46 Problems with Libraries/NuGets
08:53 The Root of the Problem
14:03 What's the Solution?
19:07 The Solution Explained
20:42 Visual Studio Solution Walkthrough
22:41 The Specialized Classes
24:22 The Compositing ConfigurationProvider
24:51 Reuse through Composition
27:38 Composition vs Aggregation
Рекомендации по теме
Комментарии
Автор

What book is the "COF" book that is referred to?

shortcircuitza
Автор

Hi Shiv
There is setting file of vs 2019 on github
Could you share vs 2022 vs setting if possible
Thank you

ademsenel
Автор

Why I can see 360px resolution only. am I missing something? hard to read the code from the blurred fonts

KritulRathod
Автор

thank you it was very informative. your code is always so nice and clean, easy to understand. tip: i assume you have already changed or removed the connection strings to your service bus / message broker, as the shared key was exposed in the video 🙂.

mannetjie
Автор

I think the scenario you took with ConfigurationProviderBase class is not an actual scenario of inheritance

sunilchand.
Автор

I do not want to sound mean at all but you should articulate better. It sounds like you are talking with almost your mouth closed and it's hard to understand you.

ak-otwn
Автор

Change your font and vs theme it's highly irritating 😐

Radhakrishna-pqyj