From the course: Android Dependency Injection with Dagger 2 and Kotlin
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
@Components review
From the course: Android Dependency Injection with Dagger 2 and Kotlin
@Components review
- [Instructor] Components, the abstract factories that Dagger implements for us, are an essential part of the Dagger tool box. They were one of the very first things we met when we started using Dagger and we've them in every single video since then. In the next few videos, we're going to look at them in a little bit more detail. Let's start with a quick review. First of all, components are the very heart of Dagger. We create an abstract factory in our code and we leave the implementation to Dagger. As we've seen throughout this series, Dagger's name for its implementation of the abstract factory is simply the name of the abstract factory prefixed with Dagger. We've also seen that all the code that Dagger generates is right in the Project Build folder in the directory Generated, Source, KAPT. So far, we've used the static create method to get Dagger's implementation of the abstract factory. Dagger actually uses the builder pattern to initialize new at sign component instances. Create…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.