Hello folks… I'm giving a try to Ktor again and on...
# ktor
l
Hello folks… I'm giving a try to Ktor again and one aspect that still making me wonder, is related a how "properly" design an application without relying in DI. In Quarkus/Spring, you inject component classes in other components (classes) and don't think much about it, it "just works". What might be a good design approach to use in a Ktor application? Thinking that you might have a couple of "components" that might be used for other components and of course you don't want to have multiple instances spread around. I've been trying to use mostly independent functions, but not sure how "scalable" is this in a big application. Cheers 👋
f
You can check out Koin, although manual DI is also scalable
p
Koin is a lightweight solution, not bringing too much overhead
l
But what's the "Ktor away"? I know Koin but was trying to see how could people use Ktor without bringing external DI libraries.
f
Extension functions and context receivers combined
l
@FunkyMuse any sample on GitHub to have a look?
f
@Luiz Aguiar i was working on something but kinda abandoned it because didn't have time to finish it due to life reasons Other than that I have no idea