After this lesson you will
- Write a class that receives its dependencies through the constructor and test it with fakes, without Koin
- Explain Inversion of Control: the power to create objects moves to the composition root
- Read startSharedApp and the two composition roots App.onCreate and doInitApp, along with their startup order
Duration25 min
DifficultyIntermediate
DI And Inversion Of Control
Constructor injection, Inversion of Control and the startSharedApp composition root on Android and iOS.
- 01Lesson Goal
- 02Part 1: A Class That Creates Its Own Dependencies
- 03Part 2: Constructor Injection
- 04Part 3: Inversion Of Control
- 05Part 4: Who Builds The Graph In The Repo
- 06Part 5: DI Doesn't Require A Framework
- 07Practice Exercise
- 08Code Reading Path
- 09Signs To Avoid
- 10References
- 11Key Points
Topics: kotlin, 07-dependency-injection
11 sections left in this lessonUnlock all of Mobile Action ProLesson Goal, Part 1: A Class That Creates Its Own Dependencies, … — plus 114 lessons in this course, source code and checklists.
Unlock Mobile Action ProOne-time payment — lifetime access — 7-day money-back. Already purchased? Sign in