Ktorfit
Kodein
Ktorfit | Kodein | |
---|---|---|
3 | 3 | |
1,382 | 3,142 | |
- | 0.4% | |
9.0 | 6.0 | |
3 days ago | 6 days ago | |
Kotlin | Kotlin | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Ktorfit
-
Is Kotlin Multiplatform the right answer ?
If you like Retrofit, I'd recommend checking out Ktorfit which is similar for KMP. https://github.com/Foso/Ktorfit
-
Ktor or Retrofit?
I'm going to hit you with a "it depends" though whether to use ktor or retrofit. If there is any part of you that thinks you're going to support multiplatform, then ktor with no discussion. Retrofit has come out and said that's not on their road map. There is another option called ktorfit which from the name you can guess is like retrofit but built on top of ktor to support multiplatform.
- I'm working on a HTTP client similar to Retrofit but for Kotlin Multiplatform
Kodein
-
Kodein VS MocKMP - a user suggested alternative
2 projects | 9 Nov 2022
-
Do we really need to use Dependency Injection Framework?
Now I will finish up saying Hilt is just an opinionated way to dependency injection on Android, but there are simpler frameworks out there such as Koin or Kodein that can help take away a lot of the troubles that can come when you try to make your own framework. Just know that most other frameworks tend to be runtime injection instead of compile time injection like Hilt, which can be helpful to know at compile time if you are missing a dependency in your graph as opposed to runtime when its out in the wild.
-
Yet another DI library, bit this time it's not a service locator
Long answer: My pain mostly comes from using [Kodein](https://github.com/Kodein-Framework/Kodein-DI/) and a custom service locator in an iOS/Swift project. Other than that I have very little experience with DI (e.g. I never used Dagger so far), so my opinion might be a little biased. Also, both of these projects are really large, so, in many cases, a class is declared in one module but used in a completely different module and the DI or service locator is sort of the glue between the modules.
What are some alternatives?
ktor-documentation - Documentation for the Ktor framework.
koin - Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
Retrofit - A type-safe HTTP client for Android and the JVM
kotlin-guice - Guice DSL extensions for Kotlin
moko-widgets - Multiplatform UI DSL with screen management in common code for mobile (android & ios) Kotlin Multiplatform development
injekt
KotlinSample - Template project for building a GTK3 Kotlin/Native app against the elementary Flatpak runtime
kapsule - Minimalist dependency injection library for Kotlin.
MpApt - (Deprecated) :wrench: Kotlin Native/JS/JVM Annotation Processor library for Kotlin compiler plugins
KODI - light-weight KOtlin Dependency Injection (KODI)
PeopleInSpace - Kotlin Multiplatform project with SwiftUI, Jetpack Compose, Compose for Wear, Compose for Desktop, Compose for Web and Kotlin/JS + React clients along with Ktor backend.
kotlin-guiced - Convenience Kotlin API over the Google Guice DI Library