One such set of principles is SOLID (first introduced by Robert C. Martin).
S | SRP | Single Responsibility Principle | A class should have only one reason to change. |
---|---|---|---|
O | OCP | Open Close Principle | Software entities should be open for extension but closed for modification. |
L | LSP | Liskov Substitution Principle | Subtypes must be substitutable for their base types without affecting the correctness of the program. |
I | ISP | Interface Segregation Principle | Clients should not be forced to depend on interfaces they do not use. |
D | DIP | Dependency Inversion Principle | High-level modules should not depend on low-level modules; both should depend on abstractions. |
Each principle plays a vital role in fostering maintainability, scalability, and testability in your programs.
Further reading
- SOLID in frontend - https://dev.to/vyan/mastering-solid-principles-in-react-elevating-your-code-quality-2c6h
- SOLID in backend - https://packagemain.tech/p/mastering-solid-principles-with-go