Dagger A fast dependency injector for Android and Java

Since I started developing in Java and then move to Android I have found really 4 design patterns/practices usefull:

  • Singleton
  • Facade
  • Factory
  • Dependency Injection

Recently I have been introduced to dragger which includes singleton, DI by default.

#Dragger

Dagger is a fully static, compile-time dependency injection framework for both Java and Android. It is an adaptation of an earlier version created by Square and now maintained by Google. Dagger aims to address many of the development and performance issues that have plagued reflection-based solutions. More details can be found in this talk(slides) by +Gregory Kick.

Examples: