Dagger 2 Tutorial Part 1 – WHAT IS DEPENDENCY INJECTION – Android Studio Tutorial

35
1



Dagger 2 is a dependency injection framework for Android and Java that is developed by Google. In this tutorial, we will step by step learn how to use Dagger 2 and why we need it.

In part 1, we will learn what a dependency is, what injection means, and what benefits dependency injection provides in terms of code coupling, testability and single responsibility principle. We will also learn what new problems dependency injection brings up and how Dagger 2 can help us get rid of them while still reaping the benefits of dependency injection.

Watch the whole playlist:

____________________
❗ Subscribe to the channel:

⏯ Watch more tutorials:

⭐ Become a channel member for exclusive tutorials and other perks:

㊙ Help translating the videos:

💚 Support the content:

💬 Join the Discord chat:

🎧 Audiobooks and podcasts for programmers:

👶 How to get started with Android development:

📣 Follow Coding in Flow on social media:

Facebook:

Instagram:

Twitter:

Blog:

Nguồn:https://wijstaanvooronzegrondrechten.org/

35 COMMENTS

  1. (Comming back after graduation from this series ^_<)
    For those of you who doubt that this series would be just another boring series, you've seen so far on the Internet, I can guarantee you that this man will clear your doubts completely.

    Thank you for guiding us along in this journey. I will never forget your style of teaching!

    From MVVM to Dagger, you gave me an "Ah-Ha" moment one after another. Deeply appreciate your works!

    For those of you who follow along in Kotlin:
    https://github.com/tpham210/DaggerEffort

    If you clone my repo, to see the result as seen in this series: you can filter like so in Logcat:
    "Car|Remote|Tires|PetrolEngine|DieselEngine"

    With all due respect,
    -T.

  2. Your Dagger series is really great, looking forward to more videos. Also, not that I don't want this series to be free or anything, but have you considered putting some of your content on udemy or skillshare? You have better stuff here for topics like this then those sites offer and I'm guessing you could really benefit from it.

  3. Thanks for your videos, really helpful for me! I´m learning about the Dependency Injection and Dependency Inversion principles right now.
    I just wanted to ask (just to clarify) a conceptual question. I guess Dagger2 helps you maintain a cleaner code and less boilerplate when you implement Dependency Injection and Inversion. But the tool itself doesn´t do it for you… coding with those principles in mind is responsibility of the programmer and could be achieved without Dagger2. Am i wrong?
    Then Dagger2 just helps you in having more readable code.

  4. Really an excellent introduction to dependency injection and its benefits for testing, team work… ! Nice audio, concrete examples… Kudos.

  5. Thank God !! Someone give me this video link and Finally I got to know What Dagger really is. Thanks to the creator of this Video. May you live long.

  6. Find me a better explanation of dependency injection. I will wait for you. Simply the best explanation available on internet.

  7. I think it's funny how many concepts we as engineers may do as the most logical solution(to us) and find later it has a name and entire frameworks built to utilize those concepts…Of course then I will see other concepts that peers think are easy and make my 'mind-brain' hurt:)

    Thanks again for the great videos, I love it when I have a question, want to find the answer and see Coding in Flow videos on the topic!

  8. I love the way how you explain things , I'm an intermediate level english speaker and even me can understand your explanation , Greetings from Venezuela.

  9. Wow I didn't notice you have a dagger 2 playlist haha nice! I'm starting up on trying to adopt clean architecture but DI is giving me a headache so far. Nice to see you have this haha will go through them!

LEAVE A REPLY

Please enter your comment!
Please enter your name here