Koin vs Kodein - Dependency Injection what you prefer? Kotlin

SergioCT picture SergioCT · Jul 13, 2018 · Viewed 7.7k times · Source

What dependency injection for Android with Kotlin do you prefer? I have started using Kodein but i don't want to lose my time if Koin it's better.

I have read this presentation https://www.kotlindevelopment.com/koin-vs-kodein/ by Makery Kotlin Development it's really nice.

From that presentation these are the differences:

Kodein

  • Robust
  • Tons of feature
  • Great documentation
  • More complicated API

Koin

  • Smaller
  • Less feature
  • Natural API

Github stars Kodein 1164 vs 1350 Koin


Thanks !!

Answer

Aleksandr Melnikov picture Aleksandr Melnikov · Jul 13, 2018

As my project is small I prefer Koin, because is lightweight library. It has a good API for scopes and wrapper for VM from Android Architecture Components. But you should know that Koin looks like Service Locator.