Prefer Composition Over Inheritance - A Real-World Example @Matlus
Prefer Composition Over Inheritance - A Real-World Example  @Matlus
Uploaded February 2022 | Updated September 2026, 1 week ago
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:
github.com/matlus/PreferCompositionOverInheritance


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
Prefer Composition Over Inheritance - A Real-World ExampleLets Talk - Always use the as operator - No Thank youSo You Want To Be A Code Reviewer? #5 Part 1 - Method DesignIntroduction To NoSQL DatabasesgRPC - Real-World .NET Core/.NET 5 ApplicationsDebate: Dependency Injection - Love it or Hate itCustom Data Structure: A  One To Many MappingWinJS - PromisesFireside Chat SeriesDelegates and Higher Order FunctionsDatabase Sharding - Scaling Relational DatabasesAbstraction in Software Design
Shiv Kumar |

Prefer Composition Over Inheritance - A Real-World Example

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER