Ins’t Module seems more like an all-in-one place than the dependency classes?

Application level: It’s very clear and easy to understand for every app to have like 10 modules NetworkModule, SharedPrefModule, SchedulerProvider etc.

Fragment/ Activity level: 1 module per each activity/ fragment. The main dependency is just the presenter/ viewmodel. All 10 dependencies that the presenter/ viewmodel requires e.g. Util, Helper, RecyclerViewAdapter is there. It’s super clear and easy to understand without the distraction that is the logics in the presenter/ viewmodel.

With the @Inject + contructor approach, the dependency chain is scatter over 10 classes.

Whats worse is, across your entire app, there are 1000 dependencies and one has no idea which are required on the application level, which are required for an activities.

I don’t even dare to think about custom scopes here :(

Hiring Android engineer Clean coder, walker & biker. Hater of inefficiency

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store