SOLID Object-Oriented Design is a set of 5 basic principles for object-oriented programming and design. When used correctly these principles are designed to help create systems that are more maintainable and extensible over time. Below, you will find links to in-depth looks at each principle individually with uses cases to help better understand the principles.
- Single Responsibility Principle (SRP) A class can only have a single responsibility.
- Open/Closed Principle (OCP) A class should be open for extension but closed for modification.
- Liskov Substitution Principle (LSP) Objects should be interchangeable with instances of their subtypes without altering the behavior.
- Interface Segregation Principle (ISP) Interfaces should only include applicable methods.
- Dependency-Inversion Principle (DIP) Dependencies should be based on abstractions and not concretions.