What is SOLID Principles?
SOLID is an acronym for five principles of object-oriented programming and design. The SOLID principles are:
Single Responsibility Principle (SRP) - a class should have only one reason to change
Open-Closed Principle (OCP) - a class should be open for extension but closed for modification
Liskov Substitution Principle (LSP) - objects of a superclass should be able to be replaced with objects of a subclass without affecting the correctness of the program
Interface Segregation Principle (ISP) - a class should not be forced to implement interfaces it does not use.
Dependency Inversion Principle (DIP) - high-level modules should not depend on low-level modules, but both should depend on abstractions.
These principles were identified by Robert C. Martin in the early 2000s and are considered to be best practices for designing maintainable and extensible software systems.
Comments
Post a Comment