As for Koin integration I've pushed new sample app...
# kvision
r
As for Koin integration I've pushed new sample apps to the examples repository. I've experimented with a few different ways to integrate and have chosen the one working best with new constructor DSL from Koin 3.2. I'll update the guide soon, but for now here are some rules: • you need to create a definition for every service class in one or more modules, and pass the modules to
kvisionInit()
function (Koin doesn't have any implicit or just-in-time bindings) • if your service class needs access to the Ktor's
ApplicationCall
(e.g. for authentication) you have to add the call as constructor parameter of the service and use constructor DSL with
factoryOf(::ClassName)
function • the same applies to components with ApplicationCall injected into other components - eager or constructor injection is required • you can use lazy evaluated injection or other scopes (e.g. single) for services that do not need to work with "ApplicationCall` All these rules are implemented in the https://github.com/rjaros/kvision-examples/tree/master/addressbook-fullstack-ktor-koin example