Tag: Dependency Injection

White vector drawing on a green chalkboard of a smart phone being injected with a syringe

How to Make Dependency Injection with Dagger 2 Easier Using Model View Presenter Pattern

Dependency injection is a design principle that follows the inversion of control concept. A class should not instantiate it’s own dependencies, but rather have them configured from outside. Dependency injection wires objects in a flexible way, we can change the wiring without changing the code, and replaces the factory objects in a framework. As inversion of control is the concept behind it, dependency injection is preferred in frameworks.

READ MORE >