The main idea of the open/closed principle is that every class/function/module/section of your code should be open for extension and closed for modification. This means that a class/function/module should be able to be extended in functionality without having to go into the class and change it. Essentially you shouldn't need to change existing code to add new functionality and instead should only have to add new code.
Most likely you have written tons of code in violation of this principle, I know I have, but hopefully this video will help introduce you to why this principle is so good at making your code clean and maintainable.
🧠Concepts Covered:
- What the open/closed principle is
- Why the open/closed principle is important
- How to use the open/closed principle
- How to spot violations of the open/closed principle
🌎 Find Me Here:
My Blog:
My Courses:
Patreon:
Twitter:
Discord:
GitHub:
CodePen:
#SOLID #WDS #OpenClosedPriniciple
0 Comments