Dagger2 all in one place – Very simple easy steps to understand the basics of dagger2. Please see the details on - http://dinkarcse.blogspot.in/2018/01/android-dagger2-dependency-injection.html
This post covers the basics of dagger2 a depedency injection for android framework, making coding simple and easy.
· Dagger 2 is a compile-time evolution approach to dependency injection. · Dagger is currently in active development, primarily internally at Google, with regular pushes to the open-source community · It is dependency injection framework. · How to handled dependency injection? · It uses DI using annotation. · Dagger2 is based on javax.inject annotations standard. Eg. Internal API classes like
Dependency injection – https://en.wikipedia.org/wiki/Dependency_injection
· Is is restrictly generated implementation (no reflection) ie. Dagger2 is based on code generation not on Reflection. · Reduces the code coupling – makes code loosely coupled · User needs to use the object without any headache how to create the object of components. · # copied from developer’s android - o Dagger's static, compile-time implementation means that it can be used in Android apps without needless runtime cost or memory usage.
This application contains three modules
- app - basic setup of dagger2
- dagger2Netmodule - shows how to setup basic network request API
- Dagger2 Android MVP -