Stable Abstraction Principle (SAP)
About this...
The more stable a component is, the more abstract it should be
If a component is really stable, it's likely it's going to be serving more purposes for more groups of people, and for different problems.
In order to prevent a component from becoming too specific or rigid, we should primarily use abstract classes.
Abstract classes work well for defining the high-level policy and leaving room for various implementations of the low-level details.
Reference: https://blog.cleancoder.com/
Enjoying so far? Join 15000+ Software Essentialists getting my posts delivered straight to your inbox each week. I won't spam ya. 🖖

2 Comments
Commenting has been disabled for now. To ask questions and discuss this post, join the community.
Thanks for this Post, I believe this principle is one of the most important but underestimated principle in designing any applications.
I don’t agree here. I think inheritance is a bad practise and should be avoided if possible. Developers should rather prefer compostition when defining various implementation by wrapping a more general component and enhancing it with their specific logic.