Learn how to use Dagger, the dependency injection framework, and Kotlin, the Android-specific programming language, to create cleaner code that requires less debugging.
- [Instructor] Dagger is a very popular tool in the Android community. It's a framework for dependency injection. Used carefully, Dagger actually can make code clearer, easier to understand, and easier to test. Unfortunately Dagger doesn't have the best documentation. Not only that but much of the discussion of Dagger in blogs or on stack overflow describes using it to solve one particular problem or another. When someone else's code doesn't work in your application and the error messages are in code you didn't even write it can be incredibly frustrating.
Hi, I'm Blake Meike, I've been working with Android for along time, I've seen a lot of Dagger code. Some of it good, some of it not so good. I'd like your Dagger code to be great because I might have to read it someday. In this course I try to give insight not just into what Dagger is doing but also how it does it. I'll discuss basic Dagger and explain why you might want it in your application. I'll build from there to the more mysterious parts of Dagger, subcomponents scoping.
So let's take a stab at learning Dagger.
- Dagger basics
- Method and field injection
- Lazy and provider injection
- Dagger annotations: @Module, @Binds, @Provides, and @Named
- Components and subcomponents
- Singletons and custom scope