Dependency Inversion Principle Explained - SOLID Design Principles

Web Dev Simplified β€’ January 28, 2020
Video Thumbnail
Web Dev Simplified Logo

Web Dev Simplified

View Channel

About

Web Dev Simplified is all about teaching web development skills and techniques in an efficient and practical manner. If you are just getting started in web development Web Dev Simplified has all the tools you need to learn the newest and most popular technologies to convert you from a no stack to full stack developer. Web Dev Simplified also deep dives into advanced topics using the latest best practices for you seasoned web developers. I started Web Dev Simplified in order to share my passion for web development, and do what I truly love. Teach and inspire new web developers. I have been in love with full stack web development since 2015 when I did my first internship as a web developer. Ever since then I have pursued my passion, learning everything there is to know about web development. Over the years I have taught many colleagues and friends the joys of web development, and cannot wait to teach you. Thank you for watching!

Video Description

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 dependency inversion principle. This principle is part of the SOLID design principles. The main idea of the dependency inversion principle is that any class that uses a dependency should only ever use the dependency through a predefined interface/wrapper. This makes it so that your code will never directly depend on a low level API for its operations. The reason this is so important is because if you ever need to change or remove that dependency it becomes really difficult when it is used all over your code. By wrapping this dependency in an interface you can depend on the interface you created which will make changing out the dependency painless. 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. πŸ“š Materials/References: Facade Pattern Video: https://youtu.be/fHPa5xzbpaA 🧠 Concepts Covered: - What the dependency inversion principle is - Why the dependency inversion principle is important - How to use the dependency inversion principle - How to spot violations of the dependency inversion principle 🌎 Find Me Here: My Blog: https://blog.webdevsimplified.com My Courses: https://courses.webdevsimplified.com Patreon: https://www.patreon.com/WebDevSimplified Twitter: https://twitter.com/DevSimplified Discord: https://discord.gg/7StTjnR GitHub: https://github.com/WebDevSimplified CodePen: https://codepen.io/WebDevSimplified #SOLID #WDS #DependencyInveresionPrinciple

You May Also Like