Dependency Injection & Inversion of Control

Sdílet
Vložit
  • čas přidán 7. 02. 2019
  • Please support me on Patreon: / thesimpleengineer
    / thesimpengineer / schachte
    ryan-schachte.com
    Don't forget to subscribe! ➨ Website -
    ➨ New Video! - • Docker Client, Images ...
    ➨ / the-simple-engineer-80...
    ➨ Github - github.com/schachte
    ---------------------------------------------------------------
    This week, we're going to talk about the topic of Dependency Injection in Object oriented code. We will implement a solution in Java. You don't need a fancy container to do it, it's actually quite simple to do manually! We will look at how frameworks like Spring use these principles in their dependency injection container.
  • Jak na to + styl

Komentáře • 332

  • @TheSimpleEngineer
    @TheSimpleEngineer  Před 5 lety +36

    What do you guys want to learn next?

    • @stephane3115
      @stephane3115 Před 5 lety +26

      everything that is not language specific (Design patterns, SOLID, etc..)

    • @TheSimpleEngineer
      @TheSimpleEngineer  Před 5 lety +20

      @@stephane3115 Cool. I'll probably do a SOLID overview video and then separate deep dives like this one in a mini series! Thanks!

    • @stephane3115
      @stephane3115 Před 5 lety +3

      @@TheSimpleEngineer Sounds awesome! Looking forward to it!

    • @ilyasselamrani5674
      @ilyasselamrani5674 Před 5 lety +8

      Dude, I just wanted to let you know that your explanation is so FREAKING awesome, I dont why you have such few views, just keep up the good work, you gonna make it.
      Hard luck
      P.S.: I would love to see some generic videos about concepts that every software engineer should know

    • @ishandulet4289
      @ishandulet4289 Před 4 lety

      too fast, 40% not clear

  • @amanbhatia7442
    @amanbhatia7442 Před 5 lety +89

    Fantastic explanation! So many DI and IOC explanations, but none of them seemed to convince my logic. Your video made the concept so easy to understand. Thanks

  • @Ajekiy
    @Ajekiy Před 5 lety +36

    After a few hours of watching videos and reading articles, this has finally made the bulb of my brain turn on and understand exactly what IOC and DI are. The fact that you uploaded this a little more than a month before I needed it makes it even more amazing to me. Thanks a lot, buddy!

  • @ajay1124
    @ajay1124 Před 4 lety +15

    Easily the best explanation I have seen, simple, succint and thorough - well done

  • @cannonkalra7133
    @cannonkalra7133 Před 4 lety +10

    This was amazing. It just explained everything I had my doubts about.

  • @yoshihitotuba
    @yoshihitotuba Před 4 lety +48

    It was extremely easy to understand. It's an excellent lecture!
    Thank you!!

  • @pablogarin
    @pablogarin Před 3 lety +7

    Dude, congrats... I've watched about 10 IoC or dependency injection videos, and this is the most comprehensive one yet... Cheers!

  • @xIncrement
    @xIncrement Před 3 lety

    Very nice! Keeping it simple.
    I've watched multiple videos on the subject, but your explanation condensed the answer to "why", which helped me a lot to start using the principle in practice, so thanks a ton!

  • @kenmtb
    @kenmtb Před 2 lety +1

    This is gold. Thank you for showing your teaching skills and makings a concise no nonsense video. This is the way to learn a concept.

  • @ceki9900
    @ceki9900 Před 2 lety +4

    I watched tutorials, read books, followed documentation, but this fit me so well. Thank you very much! People could learn a lot from you in one day a lot.

  • @ashanlingam312
    @ashanlingam312 Před 3 lety +1

    you are an amazing teacher with great pace and tone of voice and you really know how to communicate important information in a simple easy to understand way. thank you!

  • @babnishvyas6317
    @babnishvyas6317 Před 3 lety

    Wow what a wrap-up! Explaining beautifully from the beginning and connecting it to Spring seamlessly! Amazing Stuff:D

  • @irfaanjamarussadiq5500

    This really is the best explanation of DI and IOC I have seen yet! Your explanation was very easy to understand!

  • @slobodanbulatovic5300
    @slobodanbulatovic5300 Před 3 lety

    By far the best use of code to explain this concept! Thank you !

  • @rajatverma1688
    @rajatverma1688 Před 3 lety

    Lucky to find this video, whenever I need to revise DI, IoC I prefer this one, it's simple, crisp, and clear. Thanks a lot :)

  • @Bristerireland
    @Bristerireland Před 4 lety +1

    Awesome, thanks! Something went click, finally!!! Been struggling to understand dependency injection and IoC up until now

  • @koushikrakib7605
    @koushikrakib7605 Před 3 lety +5

    Oh man, I watched my instructor's video 3 times, didn't get the concept. But you made me understand everything within 8 minutes. I think the way you code and shows example is really helpful. Hats off!

  • @appyolala
    @appyolala Před rokem

    I've been searching & watching videos about DI. This is the best so far!!!? You've got a gift of teaching!!! Thank you very much!!!

  • @sk8leesk8
    @sk8leesk8 Před 3 lety

    I've listened to other people explaining this topic. You've had the best, easiest to listen to explanation. Thanks

  • @dibyanshumishra3536
    @dibyanshumishra3536 Před 4 lety +3

    The best tutorial on Dependency injection yet! Seems to tackle every "why" regarding the topic. A suggestion: You could have had a class that creates the object(initializes database) and return the object before going into the framework section. The most perfect explanation on the internet.

  • @stefanoctaviansterea1266

    I can't believe I watched a lot of videos about DI and IoC in Laravel and still couldn't understand the concept and now I find your video about the same concepts in Java and it's all crystal clear out of a sudden. Your explanations were so good. Thanks a thon!

  • @moisescruz4499
    @moisescruz4499 Před 2 lety

    The best explanation of these two very important concepts. Thank you Ryan

  • @jetgens
    @jetgens Před 4 lety

    Dude. You blew my mind with how simple you made this.

  • @steambassador
    @steambassador Před 4 lety +1

    Finally, today i have understood IoC explicitly!!! yes you are a gooood lecturer!

  • @malvaloca
    @malvaloca Před 4 měsíci

    What an amazing and clarifying explanation. Thanks you all so much!

  • @thegt
    @thegt Před 3 lety

    Beautiful explanation and comfortable demonstration! Thanks!

  • @lee38xzy
    @lee38xzy Před 3 lety

    Awesome! Great explanation in a super short video !!

  • @laurentiuanghel1562
    @laurentiuanghel1562 Před rokem

    Finally a dude that explains the basic concepts and then actually shows the practical use.. congrats my dude.

  • @FritsvanDoorn
    @FritsvanDoorn Před 3 lety

    Thank you for this explanation. I did not understand this concept until you talked about the usage of unit testing and then the quarter fell. Thank you.

  • @widget_wizard
    @widget_wizard Před 5 lety +2

    Thank you for this explanation. Subscribed, I hope you've got time to keep software design principal videos coming. Really good stuff.

  • @justincheong6159
    @justincheong6159 Před 5 lety

    Fantastic! Now I really got a clear picture of why this principal/design is needed!

  • @user-hq2yx6vv2y
    @user-hq2yx6vv2y Před 4 lety

    Really good explanation! Base on the problems that we met in actually programming, and then show how IoC solve these problems. Very easy to understand ioc from your tutorial

  • @GammaSouljah
    @GammaSouljah Před 3 lety

    Im learning C# and Dependency Injection but was confused by some of the video on youtube specifically targeting c#. I stumbled on to your video and you made the concept so Clear! Thank you!

  • @chrisolivier6415
    @chrisolivier6415 Před 4 lety +1

    I have to agree with most up top, really well explained, thanks and well done!

  • @calvinsaxon5822
    @calvinsaxon5822 Před rokem

    Thanks for not spending 45 minutes on an introduction at the preschool level to what the concept of "depending" means in life in general. Much appreciated. You got right into the meat while still going at a level a beginner could understand. Much appreciated.

  • @adeyemiblessing
    @adeyemiblessing Před 2 lety

    Been watching videos about dependency injection for the last few days and I never quite understood it like you just explained. I'm really glad CZcams algorithm listens to my wants. You just earned a sub

  • @riyanshbiswas
    @riyanshbiswas Před 2 lety

    By far the best explanation for IOC and Dependency Injection. All other channels complicate that stuff. Much appreciated. Subbed your channel as well.

  • @recepcakir4866
    @recepcakir4866 Před 3 lety

    This is the best and greatest explanation on all over the internet!! After spending hours trying to learn this s*it I've finally found you. Thanks a lot!!

  • @vincez691
    @vincez691 Před 3 lety

    I have spent literally years trying to find a decent video or article to understand DI. This is it right here, the explanation just makes sense

  • @danmaia575
    @danmaia575 Před 4 lety

    Awesome video, very well explained. Its always been tricky to understand it but now I do. Thank you!

  • @crazyco95
    @crazyco95 Před 3 lety +1

    This was really well done and helpful. Thank you.

  • @MinhalNadeem
    @MinhalNadeem Před rokem

    Finally someone explained DI in a very practical and simple way. Thankss!

  • @alexdomenici8503
    @alexdomenici8503 Před 4 lety +1

    Straight to the point and very well done. You could also post the first 7 minutes (7:05) as a separate video and that will make an excellent introduction to the concepts of IoC and dependency injection, regardless of one's technology of choice. I'm definitely subscribing :)

  • @Rochal147
    @Rochal147 Před 2 lety

    Thanks to you and your simplest examples to understand this concept.

  • @BabaDee08
    @BabaDee08 Před 2 lety

    This is the best video explanation for IoC, dependency Inversion principle and dependency injection. 👏👏👏✌️

  • @gasparottogui
    @gasparottogui Před 3 lety

    Great video man! These are confusing concepts, which you were able to put in a simple way! Thanks for sharing!

  • @aposotlossourgakis8618
    @aposotlossourgakis8618 Před 2 lety +1

    Perfect explanation! Thank you very much for this!

  • @abdulkhader567
    @abdulkhader567 Před 3 lety

    i have been looking for a content like this for long time, a finally found here... concepts explained very much simple. thanks a lot.

  • @harshadmanglani1309
    @harshadmanglani1309 Před 3 lety

    This was fantastic, the easiest explanation for DI ever!

  • @mattgraves3709
    @mattgraves3709 Před 3 lety

    Excellent information!
    Thank you so much!

  • @soumenr2168
    @soumenr2168 Před rokem

    This is a great DI explanation with Realtime example !
    Thanks Ryan for sharing a great content.
    🤟❤
    Automatic dependency part is really helpful since it reduces manual dependency injection

  • @prabhatracherla3098
    @prabhatracherla3098 Před 3 lety

    I don't know Java much, I just wanted to understand the principles of DI. And you nailed it. Crisp, fast, to the point. Kudos

  • @RankMotion
    @RankMotion Před 5 lety +1

    Excellent explanation! Thank you!

  • @mitchross2852
    @mitchross2852 Před 2 lety

    Great content. Definitely subscribing. As a experienced dev I just need a quick example to follow to get the idea. A lot easier than trying to read the docs and get the point.

  • @timpatterson4188
    @timpatterson4188 Před 4 lety +1

    This is an outstanding explanation, thank you.

  • @thedeveloper643
    @thedeveloper643 Před 2 lety

    Perfect explanation for DI!
    Love from South Korea

  • @shakik19
    @shakik19 Před 9 měsíci

    I was very confused with this IoC concept and watched many videos on CZcams and nobody explained it better than you.
    I wish I could give thousands of likes to this video.

  • @j.q.6208
    @j.q.6208 Před 3 lety

    Awesomely Explained, Thank you!

  • @chaluri
    @chaluri Před 3 lety

    Best lecture I seen about this topic.

  • @ayoubdkhissi
    @ayoubdkhissi Před rokem

    this explanation couldn't be better!! thank you

  • @kinowesunga563
    @kinowesunga563 Před 2 lety

    Thank you so much for this wonderful lecture!!!

  • @sristijaiswal1013
    @sristijaiswal1013 Před 3 lety

    After hours of wasting my time on different articles and videos, I finally understood from this video. Thanks a lot.

  • @nat6106
    @nat6106 Před 4 lety

    Top quality explanation, very clear! Thanks

  • @MohiuddinEbnaKawsar
    @MohiuddinEbnaKawsar Před 8 měsíci

    very nice clean and simple. good job

  • @saurabh5392
    @saurabh5392 Před 3 lety

    Thank you very much! you made it extremely easy to understand.

  • @apekshask3918
    @apekshask3918 Před 3 lety

    Great video!!! Answered so many questions

  • @procrastinator24
    @procrastinator24 Před rokem

    nice and clean explanation! Thank you so much!

  • @aditiaggarwal5493
    @aditiaggarwal5493 Před 3 lety +2

    After spending 1.5 hours on the web, this is by far the most useful explanation of DI and IOC. Thanks a lot! Can you also cover the Java EE vs Spring vs Springboot?

  • @ivandrofly
    @ivandrofly Před 4 lety +2

    Great explanation! Thank you

  • @aliraza9511
    @aliraza9511 Před 2 lety

    Men your voice is very clear, to be honest everything was just clear! very good understanding

  • @technovativehub8367
    @technovativehub8367 Před 3 lety

    Very well explained. Thank you.

  • @talesrodriguesjardim5088

    AMAZING! You just turn my brain to another level. Thanks! and keep doing your videos

  • @TheFunStartHere
    @TheFunStartHere Před 5 lety +1

    Such a good explanation ! Keep going !

  • @juanbarman
    @juanbarman Před 3 lety

    thanks so much mate !!! this tutorial was sooo great !!

  • @eToxSuuri
    @eToxSuuri Před 4 lety +3

    This is gold! Thanks for the effort :)

  • @adeizayusuf
    @adeizayusuf Před 3 lety

    This is the best video on IOC I've seen on CZcams.

  • @user-vd6tu7wf8z
    @user-vd6tu7wf8z Před 4 měsíci

    Fantastic video, very well done

  • @janezperme9770
    @janezperme9770 Před 5 měsíci

    Short and to the point. 😎 Thanks !

  • @nerminsehic4542
    @nerminsehic4542 Před 2 lety

    Mind blowing explanation! Thank you so much :)

  • @alfredrb5067
    @alfredrb5067 Před 5 lety +1

    Fantastic explanation, thank youuuu!!!

  • @ayoubelhioui2205
    @ayoubelhioui2205 Před 9 měsíci

    Fantastic explanation, thank you so much.

  • @marksimpson4310
    @marksimpson4310 Před 3 lety

    I watched quite a few videos before I found this gem. Thanks for keeping it simple

  • @jongxina3595
    @jongxina3595 Před 2 lety

    Awesome. Finally a tutorial that makes sense. Thank you!

  • @rajibsarker3729
    @rajibsarker3729 Před 3 lety +1

    thanks for showing the problem with constructor injection. 😊

  • @srch100
    @srch100 Před 4 lety

    Second time I search for something that leads me to this Channel. Subscribed

  • @alessandroporfirio1910

    Thank you for the video. Very helpful!

  • @sudhanshushakya4579
    @sudhanshushakya4579 Před 2 lety

    Great explanation! 🤩 Thanks!

  • @theUSpopulation
    @theUSpopulation Před 2 lety

    Thank you for this! I had to look into these for a job interview and this video is way more comprehensible than my college notes! haha

  • @thyagtubes
    @thyagtubes Před 3 lety

    Outstanding explanation!

  • @stasantokhi6469
    @stasantokhi6469 Před 5 lety +1

    Amazing stuff, loved it.

  • @rajnishtiwari1227
    @rajnishtiwari1227 Před rokem

    Still after 3 years its most relevant video on this topic. Kudos from India.

  • @randomite
    @randomite Před 3 lety

    Good illustration. I liked how the debases are initialized in some global space outside the hand coded application.

  • @Nata_web
    @Nata_web Před rokem

    Thanks.Very clear explanations👍

  • @tzuyulk
    @tzuyulk Před 3 lety

    Thank you! I’m a complete beginner and I was having really hard time understanding what ioc is about. Your explained it so clearly.

    • @kamikaze9785
      @kamikaze9785 Před 3 lety

      I still don't understand i think i am dumb

  • @denislutov6216
    @denislutov6216 Před 3 lety

    Awesome explanation! thanks

  • @r_affas
    @r_affas Před 3 lety

    Great video. Thanks for the effort.

  • @harsh2209
    @harsh2209 Před 3 lety

    Excellent explanation!!

  • @okeuwechue9238
    @okeuwechue9238 Před rokem

    Very helpful vid. Thnx.
    @8:50, the issue you introduced - of having 2 databases - can easily be resolved by employing a façade instead of DI.

  • @jiezou7297
    @jiezou7297 Před 4 lety

    Very good and clear explanation!

  • @azmirfakkri3745
    @azmirfakkri3745 Před 3 lety

    This explanation is amazing!