Dependency Injection in a Nutshell

Sdílet
Vložit
  • čas přidán 31. 05. 2024
  • What actually is dependency injection? After this short video you will know.
    ⭐ Get certificates for your future job
    ⭐ Save countless hours of time
    ⭐ 100% money back guarantee for 30 days
    ⭐ Become a professional Android developer now:
    pl-coding.com/premium-courses/
    💻 Let me personally review your code and provide individual feedback, so it won't backfire and cost you a fortune in future:
    elopage.com/s/philipplackner/...
    Regular Android tutorials on my Instagram: / _philipplackner_
    Checkout my GitHub: github.com/philipplackner

Komentáře • 97

  • @sbrugby1
    @sbrugby1 Před 2 lety +70

    So anytime I've made a class with a constructor that takes arguments I've just done dependency injection? That's essentially what I got from this.

  • @alroygama6166
    @alroygama6166 Před 3 lety +96

    People make playlists with 20+ vids and still can't explain why we use it in the 1st place. And you explained it so precisely in just 2 min. Fuckin legend.

  • @codinginflow
    @codinginflow Před 3 lety +78

    Thank you sir finally I can understand the dependency injection

  • @VincentNeemie
    @VincentNeemie Před 4 měsíci +3

    Those videos are so good, people underappreciate how good for problem solving a solution is when hard problems get a simple high level insight, especially if you also give them illustrations. Well done!

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

    This boy has the gift of explaining, I had already understood what dependency injection is, but with just 2 minutes, everyone can understand this concept. THANKS👍

  • @overtured
    @overtured Před 6 měsíci

    That's a such a good video to start understanding the concept. Congrats!

  • @evil_onyxx_jr.
    @evil_onyxx_jr. Před 3 lety +2

    Hi Phillip. Thanks alot for this short and very explanatory video. I found dependency injection quite confusing but after watching this I have a good idea what it means and why it is useful. Thanks again Sensei 😊

  • @koutheirelbehi4384
    @koutheirelbehi4384 Před 3 lety

    Philipp I have been following on Instagram and I must say I admire the fact that you keep the android community updated! I would love to see you present a sample project containing the latest architecture of android in 2021

    • @PhilippLackner
      @PhilippLackner  Před 3 lety

      Thanks! The latest architecture is still MVVM and I have a lot about that :D

  • @AmeenAltajer
    @AmeenAltajer Před měsícem +1

    You're awesome man, great content!

  • @MrVelyx
    @MrVelyx Před 2 měsíci

    Just the reminder i needed. Thank you

  • @sebastiansopala6295
    @sebastiansopala6295 Před 2 lety

    Hi Phillip, I'm becoming your fan - love the way u explain things. Thanks!!

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

    Wow. This is a great video with the simplest explanation. Thank you so much for this.

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

    Dear lord! Just perfect work with this video!

  • @HaoWang-zp4vt
    @HaoWang-zp4vt Před 3 měsíci

    "Giving an object its instance variables", I wish I had seen this nice and simple explanation earlier, before I had to go through all the overworded definitions online that confused the sh*t out of me

  • @NithinMWarrier
    @NithinMWarrier Před 3 lety

    Very neatly explained, Thanks Philip

  • @BikersHub299
    @BikersHub299 Před rokem

    Thank You ! You just earned a new subscriber 😇

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

    Please make tutorial for hit multiple api with different model using retrofit and coroutine 🙏🏻

  • @alexeymurnikov1413
    @alexeymurnikov1413 Před 3 lety

    The Best! As usual!

  • @h.r.60
    @h.r.60 Před 3 lety

    Simply the best. Keep up the great tutorials 👍

  • @AtriTripathi
    @AtriTripathi Před 3 lety

    Philipp, where can I get the outro music that you used in this video?
    It is so good!

  • @Sc2MooDy
    @Sc2MooDy Před 3 lety

    very good quality, thanks!

  • @prateekmishra6245
    @prateekmishra6245 Před 6 měsíci

    This was easy peasy here. Thanks

  • @spidey5324
    @spidey5324 Před 2 lety

    Thanks! I finally understand what is dependency injection!

  • @Kunal-jp8tn
    @Kunal-jp8tn Před 2 lety

    Thank you sir finally I can understand the dependency injection.

  • @notfoundbrain7020
    @notfoundbrain7020 Před 3 lety

    You really help beginners like me♥️

  • @BrunoGomes-su1bk
    @BrunoGomes-su1bk Před rokem

    thaaankkss man, what a great explanation

  • @m.irtizakhursheed3040
    @m.irtizakhursheed3040 Před 3 lety

    Awsome explanation

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

    Thank you sir...Today after 1.5 years in Android I was able to understand dependency injection. I feared from this word.

  • @Aicchio
    @Aicchio Před 2 měsíci

    So is it similar to using an abstract class?

  • @mageshmani9176
    @mageshmani9176 Před 3 lety

    nice explained!

  • @mattgraves3709
    @mattgraves3709 Před rokem

    Yes well 2 minutes explaining what it is, and a couple 30 min videos describing a couple of premade solutions but what about a full course on it?
    Dependency management is one of the most difficult aspects of large scale enterprise level application development and doing DI correctly is far from easy...the concept of how is simple at the core but understanding when and what, then keeping it manageable and teatable across dozens of modules can be a huge undertaking.
    I would love to see a video about dependency injection the conceptual and theoretical rather than a specific tool

  • @Mohit-il9gx
    @Mohit-il9gx Před 3 lety

    Can you tell how to reset android stuido basic but i cant a good video on youtube

  • @Maya-xe6xp
    @Maya-xe6xp Před měsícem

    Brilliant

  • @khlorghaal
    @khlorghaal Před 2 lety

    i recommend applying this to one of your projects, to witness the hellscape you've become immersed in

  • @hunnyt-tech2978
    @hunnyt-tech2978 Před 3 lety +1

    Always Super😀

  • @mahdiporkar236
    @mahdiporkar236 Před rokem

    nailed it.

  • @iJuce
    @iJuce Před 3 lety +3

    Hey man can you make a video on how to properly read the android documentation? There are very few videos on youtube and how to do so and most of the aren't really helpful at all! Here is an idea: Just show how YOU read the documentation and what you do if you dont understand any topics.

  • @imnithish
    @imnithish Před 3 lety

    great bruh

  • @marcinbiaecki9731
    @marcinbiaecki9731 Před 3 lety

    Thanks! :)

  • @beerensaft413
    @beerensaft413 Před 7 měsíci +1

    dont understand who will do that @0:58 ?

  • @tradingwithazoak
    @tradingwithazoak Před 6 měsíci

    I have watched alot of videos, definitely longer than this, but I failed to get them, until I came here

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

    background music is a bit loud

  • @trocchiettoski
    @trocchiettoski Před 3 lety

    Fantastic video, Pity this video was not around in 2014 when dagger thing came out

  • @frederikbrecht30
    @frederikbrecht30 Před 3 lety

    Great video! Simple and easy to understand. I have a video suggestion: Could you show us how to prepopulate a room database with the .createFromAsset or .createFromFile methods? It would be greatly appreciated! Grüße aus Deutschland!

  • @Aditprayogo18
    @Aditprayogo18 Před 3 lety

    song name ??

  • @subhashpatil3504
    @subhashpatil3504 Před 3 lety

    Please make tutorial on jetpack compose

  • @GenjaOrigins
    @GenjaOrigins Před rokem

    very nice

  • @shreyashchoudhary7413
    @shreyashchoudhary7413 Před 3 lety

    Epic!

  • @Chintanparmar
    @Chintanparmar Před 3 lety

    Mission Passed
    Respect++

  • @MrDoge-yp8us
    @MrDoge-yp8us Před 3 lety +1

    For the next video please put a lofi song on the background :)

  • @kishorramani007
    @kishorramani007 Před 3 lety

    Hi Phillip, from where you are learning this topics in details?

  • @baur22
    @baur22 Před 3 lety

    Super
    why don't you use dagger 2

  • @orangasli2943
    @orangasli2943 Před rokem +1

    Bro you talk about
    Managing memory in Dependency Injection..
    Do we need to manage the memory (lifetime of that dependency objects we are using)?
    Because if we use java or kotlin do we need to still explicitly deallocate memory for unused object?
    if so how can we do that?

    • @z13579bugi
      @z13579bugi Před 11 měsíci

      Java has a garbage collector so it is not needed

  • @orangasli2943
    @orangasli2943 Před rokem

    This is like having a pointer to another class..
    in the Computer class..
    first we initialize the pointer with null values in the private field section
    And then in our public constructor we assign what ever value for that object the computer gets from outside computer class

  • @gregoryfenn1462
    @gregoryfenn1462 Před 2 lety +2

    Honestly I’m more confused now, how is providing arguments to a class constructor function all there is to DI? If it’s as simple as function parameters, why on Earth is DI even needed as a concept, when it’s so basic to programming? By that definition, a function f(x) has DI when you provide x, since you can think of f as a class with one method and one class property

    • @PhilippLackner
      @PhilippLackner  Před 2 lety

      Yep it's all about managing your dependencies and not initializing them all over the place

  • @vivekshah1172
    @vivekshah1172 Před 2 lety

    best example I ever see

  • @rohitjakhar6672
    @rohitjakhar6672 Před 3 lety +9

    you'r going to change the boring teaching method into fully dopamine release content like watching a movie

  • @tahirdevlog2047
    @tahirdevlog2047 Před 2 lety

    that's gold

  • @satyamurtidoddini8304
    @satyamurtidoddini8304 Před 3 lety

    Awesome

  • @nomanzafarzafar7912
    @nomanzafarzafar7912 Před 3 lety

    Please create an android app using dagger.

  • @colin398
    @colin398 Před 10 měsíci +1

    Java programmers discover function arguments

  • @WilliamGao-nz8rr
    @WilliamGao-nz8rr Před 2 měsíci

    music is too loud

  • @agungprakasa7214
    @agungprakasa7214 Před 3 lety

    request tutorial content provider sir. Thanks you

  • @pms_code
    @pms_code Před 2 lety

    500th Like ❤️👋🏼

  • @gajendrapandeya5081
    @gajendrapandeya5081 Před 3 lety

    Never seen beautiful explanation like this
    You are truly awesome tutor

  • @ohmegatech666
    @ohmegatech666 Před rokem

    So "constructor injection" is just using a constructor... the way you normally do?

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

    Bro this was the best explanation ever. How in the world did you think of this example?!

  • @cagrylmaz9051
    @cagrylmaz9051 Před rokem

    ❤❤

  • @gappergob6169
    @gappergob6169 Před 3 lety

    Nice! Could you make video about custom view and compound view. There's not much video about that on youtube. Thanks 😊

    • @PhilippLackner
      @PhilippLackner  Před 3 lety

      not yet. I plan on doing that when jetpack compose is out

  • @bugra1994
    @bugra1994 Před 3 lety

    what a weird choice of music :)

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

    This is a perfect explanation of a complex subject that *SOME FAMOUS* engineers seem to relish in overcomplicating.... *cough*thermosiphon*cough*

  • @sumitsuryawanshi9060
    @sumitsuryawanshi9060 Před 2 lety

    while(true) { println("You're my hero") }

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

    This video made it worse for me, your definition is like "if you need something to be specific for each object that consumes it, then go ahead and make instance for each object".
    Which is the equivalent of "if you feel hungry, then go eat", or "just don't be stupid".
    The fact that this....."Strategy" even has a name, is very confusing to me.