Laws of Software Engineering · Principle
Principle
SOLID
Five rules for designing object-oriented code: each class does one thing, code should be open to extension but closed to modification, subclasses should be substitutable, interfaces should be small, and code should depend on abstractions rather than specifics.
How to use it. The first and last rules carry most of the weight. Apply them at the boundaries between modules. There is no need to apply them inside every class.
How it gets misused. Treated as the only valid way to design code. SOLID is one approach. Functional and data-oriented designs reach the same goals by different routes.
Related
-
Principle Beck's Four Rules of Simple Design A simple design passes its tests, makes intent clear, has no duplicated knowledge, and uses the fewest elements possible. The rules apply in that order.
- Principle Conceptual Integrity A system designed by one mind, or by a few minds in close agreement, will be easier to use and understand than one designed by committee.
Clusters
- The Code Design cluster - How to write code that survives change.