3 ms·
SOLID is about how your codebase and compiled libraries change in response to changing requirements. Open/closed says that if your code is well architected, the
by feoren 7y ago
SOLID is about how your codebase and compiled libraries change in response to changing requirements. Open/closed says that if your code is well architected, then you should be able to handle changes by using existing modules (e.g. classes or functions) in new ways (extension) instead of cracking open the source code and modifying it. If you see that one particular file is being changed in commit after commit, it is a prime candidate for refactoring to better follow the OCP.