Understanding Dependency Injection and using Dagger 2
Dagger 2 is a dependency injection framework by google. I would like to demonstrate how it can be helpful when used in Android applications.
What is Dependency Injection.
Dagger
Dagger 1.x
Pros
Problems.
Dagger 2
- Improvements
Using Dagger 2
Ingredients
Injects
Modules
Provides
Components
Example of using Dagger 2 in Android
Gaurav Vashisth develops android applications at Fueled. Besides java he likes to tinker with Kotlin. He has worked on applications such as Afterlight and QuizUp. He is on twitter at @vashisthg.
{{ gettext('Login to leave a comment') }}
{{ gettext('Post a comment…') }}{{ errorMsg }}
{{ gettext('No comments posted yet') }}