Simple Dependency Management in Kotlin
summary
Claim: Kotlin language features alone handle dependency wiring without Dagger or Koin by composing interfaces and encoding type classes. The demo refactors a fetchUser flow into small interface composition pieces, wraps results in a generic Kind/F emulation so network and DB return F<User>, and adds constructors just, raiseError, defer, async to control eagerness and errors. Arrow supplies the runtime type class interfaces and an annotation processor to generate bindings until KEEP‑87 lands. The example app and library code compile and run end to end.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:43Starting the example
- 7:28Refactoring without Arrow
- 11:41Introducing Kind and Applicative
- 20:01Adding Defer and Async
- 27:51Putting it all together
- 30:03Type-based dependency injection
- 42:00Summary and takeaways
- 44:29Q&A
related talks
29mDIY Dependency Injection with Kotlin
35mDIY Dependency Injection with Kotlin
39mInject Basics!
44mFurther with Kotlin!
37mAdvanced multi-platform dependency injection
43mFunctional approach to Android architecture using Kotlin
31mKoin in Action - Dependency Injection for Kotlin
49mDependency injection from zero to hero with Koin
