Dagger 2 on Android: The Simple Way

Dagger 2 on Android: The Simple Way

7 years ago
Anonymous $L9wC17otzH

https://proandroiddev.com/dagger-2-on-android-the-simple-way-f706a2c597e9

Dagger is a contradictory topic in the Android community. I’ve read and heard countless discussions around it, and I’ve changed my mind about it several times. Most of us come from a background where dependency injection is extremely simple, and we seem to take some time to accept Dagger’s complexity — an overrated and necessary evil most of the time.

Today we have interesting alternatives written in Kotlin (like Koin or Kodein), and some people are moving in that direction. However, it might not be wise to call them alternatives, since their differences make them more a service locator than an actual dependency injector, some would say.