SOLID is an acronym for a set of important design principles that, if followed, can avoid code smells and improve the code quality, both structurally and functionally.
Code smells can be prevented or refactored into clean code if your software architecture meets the SOLID design principle compliance. The following principles are collectively called SOLID design principles:
- Single responsibility principle
- Open closed principle
- Liskov substitution principle
- Interface segregation
- Dependency inversion
The best part is that most design patterns also follow and are compliant with SOLID design principles.
Let's go through each of the preceding design principles one by one in the following sections.