Conference for mobile developers

Russia, Saint-Petersburg, April 21-22, 2017

Congress Centre PetroCongress, Lodeynopolskaya Str. 5

Toothpick: a fresh approach to Dependency Injection on Android

Day 2 /  / Track 3  /  EN / Введение в технологию /

You find RoboGuice simple but slow? And you think Dagger 1 & 2 are fast but complex and bloated? Toothpick is the best of both worlds!

Toothpick is a scope tree based, runtime but reflection free implementation of JSR 330. It is pure Java, with a special focus on Android.

Toothpick is fast (even faster than Dagger 2 in some cases!) and is simpler to use, with less boilerplate code. Its syntax is very close to Guice. It supports named dependencies, lazy dependencies, providers, and has built-in support for custom scopes. As compared to Dagger 2, Toothpick provides more powerful testing support, allowing you to leverage DI to mock dependencies using either mockito or easymock.

Its explicit scope tree helps developers to build more robust apps. It provides more fine grained control to easily implement complex user flows that span multiple activities or state preservation across configuration changes (e.g. rotations), a common issue when implementing the MVP pattern.

During this talk there will be an introduction of Toothpick, its main features and how it compares to other DI libs. The talk will explain how Toothpick scopes and scope annotations can solve advanced use cases when developing Android apps.

Stephane Nicolas, Groupon

Stephane is a Senior Android Developer at Groupon. As a member of the Groupon Android Core team, he focuses mostly on software design, good practices, quality metrics, testability, dependency injection, optimisations, hard bugs, tooling, build & CI, etc.

He is a Free & Opens Source Software enthusiast and often contributes, modifies, initiates open source projects. All of them available on github:

All talks  


Программа конференции