3 ms·
It depends on your needs I guess. Not all API can be handled by just a few classes. If your plan is to maake a microservice that expose a single value, yes spri
by ta988 6y ago
It depends on your needs I guess. Not all API can be handled by just a few classes. If your plan is to maake a microservice that expose a single value, yes spring boot is likely overkill. But when you have complex models with runtime configuration and profiles and so on... Maybe we need to specify what we are really talking about when we say API. For some it just means a partial implementation of REST.
- BoorishBears 6y agoWho said anything about a few classes? How does using Ktor preclude one from using anything you just described? Lol just using Koin alone would bring every thing you just described, with the added benefit of not delving into XML files. Really some people are just married to the mentality of "If it's not on the feature list, I guess you can't do it". I believe in using focused tools that excel at specific things. Ktor lets you do that.
- shock-value 6y agoSpring (and particularly Spring Boot) requires no XML for configuration — everything can be done with annotations and plain Java (or Kotlin).
- BoorishBears 6y agoThe canonical way to use Profiles, even with Kotlin is with your Maven XML or a web.xml You can set them up other ways, but it just ends up making a lot of sense to define them there. To be fair, Ktor is pretty similar with the "application.conf" if you use the built-in Profiles equivalent: https://ktor.io/docs/configurations.html#hocon-overview https://ktor.io/docs/configurations.html#hocon-overview I just prefer that if I'm using DI, the concept of environments be handled by DI. Scoping is what DI does best after all...