Home | About | Blog | Interesting Reads | Tutorials | Skills | Personal Projects | Books | Fun | Connect with me
Published On: Jul 23 2023
Written By: Krishnan Sethuraman
Category: Programming
This video explains the SOLID principles far better.
S Single responsibility - Classes should have a single responsibility but can perform multiple tasks. For example student enrolment is a resposibility. However this class can perform multiple tasks like save student, edit student etc.
O Open Closed principle - A class is closed for changes but can be extended in various ways. This ensures that we do not introduce new bugs and the test cases we wrote in the past stands valid.
L Liskov Substitution - A child class should do whatever a parent class does. This is not always possible so we need to design the system accordingly.
I Interface Segregation
D Dependency Inversion