What is Dagger for?
I use the Dependency Injection pattern in my projects. And here is why. It enables me to:
- decrease the inter-object dependency
- make the code easier to read
- simplify the procedure of writing tests
The Dagger library partially takes care of this pattern's implementation, and therefore simplifies developer's effort and helps bring down the amount of written code.
Sounds tempting, doesn't it? But nothing is as simple as it seems. Dagger itself is, in fact, not that difficult to use. But there are very few training courses on the topic that are understandable and clearly outlined. That is why I decided to create a training course of my own.
As I was exploring Dagger, I looked through the materials from various sources. And not a single one of them provided complete information. Moreover, I wasted a lot of time to create a test project and experiments, in order to get to the bottom of this topic. And then I realized that I need to develop a training course. I broke down all the information I collected into four lessons. I also supplied real-life examples. You are expected to spend no more than one hour on one lesson. The lessons have been developed in the startandroid.ru style, so everything is easy to understand and broken down into steps.
Available lessons at this moment:
Lesson 1. Introduction
This lesson will provide you with detailed information about Dagger and what it can do. We will discuss the notions of a component and module, connect Dagger to a project and look at a couple of simple examples.
Full course is available after registration and payment. Cost of course is 10$. Register
For any questions, please contact to startofandroid on gmail.com
Lesson 2. Additional features.
The second lesson covers some additional features: Lazy, Provider, Named, Qualifier, IntoSet, ElementsIntoSet, IntoMap, Inject.
Lesson 3. Subcomponent and Scope.
In the third lesson you will find out what a Subcomponent is and how to set the object lifecycle using Scope.
Lesson 4. Produced.
In the fourth lesson we will explore asynchronous Dagger mechanisms: ProductionComponent, ProducerModule, Produces and Producer. We will also look into the process of error processing using Produced.
Присоединяйтесь к нам в Telegram:
- в канале StartAndroid публикуются ссылки на новые статьи с сайта startandroid.ru и интересные материалы с хабра, medium.com и т.п.