
Spring Tutorial - 2 - Dependency Injection & Inversion of Control without Spring
In this episode of the Spring series, I explain to you the concept of Dependency Injection and Inversion of Control and then show you how to do it in a Java Project. #SpringFramework #SpringTutorial #Java
Code: https://gitlab.com/kody-simpson/spring-framework/dependency-injection-and-inversion-of-control-without-spring
Resources:
- https://www.manning.com/books/dependency-injection?query=dependen
- https://www.javacodegeeks.com/2010/12/dependency-injection-manual-way.html#:~:text=%20Dependency%20Injection%20is%20a%20concept%20first%20and,Java%20application%2C%20we%20repeatedly%20encounter%20with%20two%20events%3A
- https://martinfowler.com/articles/injection.html
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've tried it and it's awesome! https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=kodysimpson&utm_content=description-only
Discord: https://rebrand.ly/discordlink
Become a Member: https://www.youtube.com/channel/UC_LtbK9pzAEI-4yVprLOcyA/join
Instagram: https://www.instagram.com/kody_a_simpson/
Twitter: https://twitter.com/kodysimp
0:00:00 - Intro
0:00:47 - What is a dependency?
0:02:45 - What is Dependency Injection?
0:05:16 - What is Inversion of Control?
0:06:45 - Manual Dependency Injection (without Spring framework)
0:09:51 - Tight coupling
0:11:18 - Loose coupling
0:14:21 - Example 1 (Constructor Injection)
0:17:38 - Example 2 (Using interface to support "swappability")
0:23:48 - Outro
More Videos coming soon.
Leave a comment for any future video suggestions.