Writing clean code is tough, and is one of the largest differences between junior and senior developers. One way that you can quickly improve your code and start writing well designed code now is to implement the open/closed principle. This principle is part of the SOLID design principles and is, in my opinion, the most complex rule of SOLID. This is because the definition is difficult to understand, but once you wrap your head around the idea it is very easy to implement.
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: https://blog.webdevsimplified.com
My Courses: https://courses.webdevsimplified.com
Patreon: / webdevsimplified
Twitter: / devsimplified
Discord: / discord
GitHub: https://github.com/WebDevSimplified
CodePen: https://codepen.io/WebDevSimplified
#SOLID #WDS #OpenClosedPriniciple
En esta página del sitio puede ver el video en línea Open/Closed Principle Explained - SOLID Design Principles de Duración hora minuto segunda en buena calidad , que subió el usuario Web Dev Simplified 17 diciembre 2019, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 156,069 veces y le gustó 7.9 mil a los espectadores. Disfruta viendo!