That was the easiest most clear explanation i found so far, thank you so much!
I rarely subscribe after watching just one video, but this one got me instantly! I've seen so many tutorials, but none of them clicked until I found yours. Amazing job—thank you!
If anyone is curious why it's called dependency inversion, it is because instead of the class depending on lower level details (where the choices come from), it now depends on a HIGHER level abstraction (the interface), thus the dependencies were inverted
Thank you, all others just explain what DI is and you explained perfectly how to use it.
Hi! I'm the creator of the kangaru dependency injection library for C++. What I love about that tutorial is that you teach beginners to do it without a framework. A dependency injection library is only there to automate boilerplate that happens in the wiring code, and not essential for dependency injection. Another point (for more advanced programmers) is that technically, dependency injection don't require interfaces to work. union (sum types) or enums can also do the trick when you want your component to let users choose its behaviour, but have a closed set of possible behaviour. This still enable testing without introducing virtual function calls when unneeded. In my case, which might be a C++ only thing, adding virtual functions (any overridable function) strictly only for the purpose of testing is smelly code. I try to keep behaviour choices as closed as possible and thus do my DI with concrete types when possible with the choice of behaviour being values inside those concrete types.
Eric you are an AMAZING teacher! Sincerely, a former teacher turned programmer :)
I am sold when you said "We teach people how to code the right way."
Thanks. You explain DI so clear and simple that even non programmer can understand.
I really loved this explanation. So clear and straightforward!:trophy-yellow-smiling:
As soon as I opened the video and saw your face sir, I felt overwhelmed by a sense of trust. I immediately subscribed.
I have been watching a lot of programming tutorials and this instructor is so very good! Not only the explanation itself, but the cadence is very good.
I will say you are the great master teacher. You have extra ordinary skills and techniques for teaching lots of blessing from all who watched this videos.
What an amazing explanation for a very confusing topic to beginners like myself, you even added the testing example that so many people mention but never show! Great work, will definitely follow your channel for more content.
I’m learning programming as a hobbyist and to make my work life easier. I am at the stage where I have learnt the basic C# syntax and solving individual problems. Now trying to start learning OOP, this is a really helpful approach to start understanding it’s uses!
Really clear and easy to follow explanation. Thanks very much.
Oh wow, this is the best video that explains DI. I've watched a lot of other videos and questioned their lack of explanation or the parts that are missing or don't make sense. I also saw similar thoughts in the comments. But this one, I want to say, is perfect!
Hands down, best explanation ever ! thank you Eric
YOU ARE AWESOME! I was struggling for days trying to understand what is dependency injection, Now I get it!! Thank you with all my heart!
Fantastic explanation and example for DI!! You teach both the concept of DI as well as how it is implemented in c#. Simple and to the point. Great job.
@SkillFoundryIO