Replace your Dagger with a Kotlin DSL - "Better de...
# feed
a
Replace your Dagger with a Kotlin DSL - "Better dependency injection for Android" https://medium.com/@giuliani.arnaud/better-dependency-injection-for-android-567b93353ad
j
arnaud.giuliani: this is pretty cool !
a
thanks 🙂 don't hesitate to give your feedback
a
@arnaud.giuliani how does koin compare to Kodein?
a
Koin is less verbose with its main DSL
"provide { yourComponent }" in your module and that's it
Smooth integration with Android to retrieve your context anywhere and easily inject
@Andreas Sinz give it a try 😉
j
this is the non-android one: https://github.com/Ekito/koin when using @Inject, how is annotation scanning done?
a
@janvladimirmostert @Inject is done by scanning for tagged properties (using introspection)
that's a way of injecting things. @Inject is for people assuming a certain facility of use, and then the use of introspection
j
So basically getting a list of classes, then via reflection checking for @Inject annotations and then injecting the instances where necessary or can this injection still be done lazily?
a
yes all is done lazily because we use bean definition via functions that are evaluated just in time