I started learning Dagger 2 and one thing hit me hard: mechanism of injection. I was using RoboGuice
earlier and my projects look like MVP mechanism
- Views (Activity/Fragment),
- Controllers (all logic),
- and Models (simple objects)
So Controllers are @Singleton
and in every view I always called only @Inject
DedicatedController. It works great.
But in Dagger 2 to achieve the same I need to define every Controller in Modules
(according to patterns probably even in many files), and define in Component
every View which is target to injection.
This is in my opinion horrible and destroying the idea of making coding simpler with Dagger 2. Do you have any solutions on how to simplify this mechanism and to avoid the overhead?