Photo by [Digital Buggu](https://www.pexels.com/@digitalbuggu) on [Pexels](https://www.pexels.com/photo/colorful-toothed-wheels-171198/)

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. ...

<span title='2017-06-19 00:00:00 +0000 UTC'>June 19, 2017</span>&nbsp;·&nbsp;3 min&nbsp;·&nbsp;Ash Davies
Photo by [Alog Sharma](https://www.pexels.com/@aloksharma/) on [Pexels](https://www.pexels.com/photo/black-android-smartphone-177707/)

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. Effective dependency injection is achieved by providing dependencies through the constructor, usually as interface types, thereby allowing the class in focus to not worry about the instantiation of these types. I’ve gone into further detail about this in my previous article Effective Dependency Injection. ...

<span title='2017-05-01 00:00:00 +0000 UTC'>May 1, 2017</span>&nbsp;·&nbsp;5 min&nbsp;·&nbsp;Ash Davies
Photo by [Daniel Frank](https://www.pexels.com/@fr3nks/) on [Pexels](https://www.pexels.com/photo/empty-cave-287229/)

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. ...

<span title='2017-04-10 00:00:00 +0000 UTC'>April 10, 2017</span>&nbsp;·&nbsp;8 min&nbsp;·&nbsp;Ash Davies