Photo by [Digital Buggu]( on [Pexels](

Dagger 2: Module Parameters

Last month, I went into detail about how to use the recently released Dagger 2 Android modules, and how you can make your injection code much more concise. Google have gone through a lot of effort to enable developers to use Dagger with very little integration and more importantly on how to use a common injection paradigm without the injection target being concerned with how it is being provided with it’s necessary dependencies....

June 19, 2017 · 3 min · Ash Davies
Photo by [Alog Sharma]( on [Pexels](

Dagger 2: Android Modules

Many of the articles I write tend to involve application structure or architectural design patterns; and one of the most recurring topics I tend to visit is that of dependency injection. Dependency injection is probably one of the most important topics of modern application development, whilst often overlooked as a necessity, it allows us to build highly scalable, powerful applications and platforms. Dependency inversion works seamlessly with many other design principles and in many ways facilitates them, most specifically single responsibility....

May 1, 2017 · 5 min · Ash Davies
Photo by [Daniel Frank]( on [Pexels](

Effective Dependency Injection Scoping

The concept of dependency injection is a relatively simple one, and can usually be adhered to with a small set of rules when writing your code. Specifically, avoid creating new instances of objects within your classes, and opt to have the instance provided through the class constructor. This allows your class to focus on the key operations without having to worry about the state or creation of it’s dependencies. This means that your class will be small, concise, readable, and most importantly, easily maintainable since it only contains the logic required to perform the necessary operation....

April 10, 2017 · 8 min · Ash Davies