Dependency Injection from Zero to Hero
summary
Koin is a lightweight runtime DI for Kotlin that uses a tiny DSL to declare singletons and factories and boots with startKoin with modules so Android apps get constructor injection, Activity/Fragment extensions and ViewModel support without no code generation. Version 2.0 rewrites internals to approach Dagger’s startup speed, benchmarks show reflection-based auto-wiring is 4–10× slower than the explicit DSL, runtime module load/unload and checkModules JUnit tests let teams migrate from Dagger incrementally and test the graph.
AI-written summary · about
chapters (13)
- 0:00Introduction and motivation
- 7:30Pure Kotlin dependency example
- 10:39What is Koin and its DSL
- 15:38Koin components and Android context
- 20:10Migrating from Dagger to Koin
- 23:01Android extensions and ViewModel
- 29:03Testing with Koin
- 31:10Koin 2.0 improvements
- 33:17Service locator vs dependency injection
- 35:03Functional dependency injection
- 38:56Dynamic modular architecture
- 41:43Tips and getting started
- 43:05Q&A and conclusion
related talks
36mInvesting in Koin
39mInject Basics!
17mKoin vs Dagger (Service Locator vs D.I.)
47mAndroid Architecture Design with Koin
39mInject your Jetpack Compose Application with Koin
36mGetting big payouts with Koin
41mAndroid, Compose, MP & Server - Inject them all with Coin
28mDependency Injection You Can Start Today
