Our great sponsors
- Appwrite - The open-source backend cloud platform
- Onboard AI - Learn any GitHub repo in 59 seconds
- InfluxDB - Collect and Analyze Billions of Data Points in Real Time
-
I'm currently using Dagger and Anvil for my DI needs. It's been working really well, especially around what Anvil permits in terms of multibindings defined on the type declaration rather than in a module. For example:
-
I'm currently using Dagger and Anvil for my DI needs. It's been working really well, especially around what Anvil permits in terms of multibindings defined on the type declaration rather than in a module. For example:
-
Appwrite
Appwrite - The open-source backend cloud platform. Add Auth, Databases, Functions, and Storage to your product and build any application at any scale while using your preferred coding languages and tools.
-
koin
Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
I started looking into using Kotlin/JS, and hopefully reusing a bit of code that I have, which is using Dagger and Anvil - which of course are JVM only. So I've been looking for other solutions, namely Koin and Kodein. Koin's multibinding support is... not really amazing (e.g. here, and while Kodein does support multibinding, it doesn't seem to support things like that at the declaration site - everything needs to be specified in a "DI container" (module).
-
You might want to check this out https://github.com/sergeshustoff/dikt. The repo also lists other alternatives that you can look into.
-
I would suggest looking at Kotlin-Inject, it's a compile-time DI like Dagger and it's really pleasant to use.
-
Onboard AI
Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.
Related posts
- Refactoring our Dependency Injection using Anvil
- Kotlin Multiplatform and Swift - Overcoming Interoperability Challenges for Multiplatform Development
- [Typescript] Quelqu'un peut-il suggérer une bibliothèque d'injection de dépendance simple pour TypeScript / JavaScript?
- Best Practices When Splitting Compose Functions Into Separate Files
- KVision 6.0.0 is released