Комментарии:
I'd been lookin for good interface explanation until I found your channel. And you did best of what you could. Explained interfaces and DI at once, on working example. Fantastic job! Great content, great teaching approach, wide perspective filled with necessary details without overhelming the learner and topic. All the best for you and your channel!
ОтветитьYou have the perfect pace for teaching.
ОтветитьGood content!
Ответить2 questions. are you in your bath tub? and does this work the same if I want to use dependency injection in xamarin forms or MAUI?
ОтветитьEric you are an AMAZING teacher!
Sincerely, a former teacher turned programmer :)
Beautiful! Thank you!
Ответить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.
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.
ОтветитьThis video was a great refresher especially after being away from it for so many years! Is there any available code so I can save?
ОтветитьNicely explained
Ответить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!
Ответить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
ОтветитьThis is exactly the approach we took in our project. OOP in C# is not complete if not done with DI. Dependency Injection was intimidating at first but once you fully understood its principles, you'll get addicted to using it in your OOP implementation.
ОтветитьNIce tutorial! Thanks a lot! Promising channel.
ОтветитьWow, really cool. I've been doing it a lot in my code, but didn't have a complete understanding of how powerful it is
ОтветитьNice explanation keep it up❤
ОтветитьAnother great video! Keep it up! 😄👍
Ответить