Clean Code Principles: SOLID Explained
Write code that humans can understand. The 5 principles of Object-Oriented Design.
1 Loading...
Clean Code Principles: SOLID Explained
“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” - Martin Fowler
SOLID
- S - Single Responsibility Principle: A class should have one, and only one, reason to change.
- O - Open/Closed Principle: Open for extension, but closed for modification.
- L - Liskov Substitution Principle: Objects of a superclass shall be replaceable with objects of its subclasses.
- I - Interface Segregation Principle: Many client-specific interfaces are better than one general-purpose interface.
- D - Dependency Inversion Principle: Depend upon abstractions, not concretions.
Master these, and your code will survive the test of time.