Curious if anyone has any thoughts about this <htt...
# koin
a
sorry to say that, but here is clearly a complete misused of Koin. You shouldn't be using KoinComponent in your Android devs. Why because you can declare most of your components in modules, just with constructor injection. You just need to inject into your Activities
👍 7
Putting Koin everywhere in your classes with KoinComponent is the right way to shoot yourself in the foot
You could do the same mistake with any DI framework here ... it's overuse of Service locator API in the wrong place
k
Sounds more like their app startup had issues IMHO...based on the examples they described.
h
Interesting article and strange journey, but i have to agree with Arnaud and ken completely. Looks like this scenario is a Mix of Bad application initialization and "i don't know what this Framework does and how it should be used". Like, didn't we learn anything about giving up compilation errors for runtime di mechanisms in the last 15 years of spring? Koin offers a scope api which is not mentioned in the article (is it??) And a way to test modules with a unit test on build for getting close to compile time verification... Those would have Been the mechanisms to tackle the problem, although i think completely ditching di frameworks AND any form of hashmap-service-registry to bypass static validation is the better outcome. Until koin provides a compiler plugin of course O:-)
a
Until koin provides a compiler plugin of course O:-)
soon 😄