https://kotlinlang.org logo
Title
s

Solace Studios

04/20/2023, 3:08 AM
Hey guys, I have no experience with kotlin or java for web backends and I want to create one for my next KMM project. I’ve heard of “spring” and “apollo” are frameworks that could help and also ktor. But I don’t know what I’m doing and I could use some help getting started. I’ve done a bit with laravel php and node js in the past and that’s it for web backend programming but it’s something I’d really like to learn with kotlin.
k

kubele

04/20/2023, 7:02 AM
c

Cies

04/20/2023, 8:34 AM
If you want to do sever-side programming the Kotlin way, then stay away from Spring (Boot), it's very Java-esque, employs a lot of "magic" often based off annotations. KTor --and Kotlin in general-- is very minimal on annotations, and is for me a lot easier to wrap my head around. Compared to Java, Kotlin adds some flexibilities (that do not sacrifice type-safety) which make it easier to express yourself in code concisely.
m

mbonnin

04/20/2023, 1:12 PM
graphql-kotlin supports Spring Boot and Ktor (in version 7). You can do without most of the annotations using the Spring beans DSL. One example is here
s

sciack

04/21/2023, 6:57 AM
maybe also
HTTP4K
could be a good starting point, at least for the http layer
Will be quite similar on how you define route in node4j
s

Solace Studios

04/23/2023, 1:00 AM
Thanks everyone for the advice, I agree ktor and with graphql-kotlin seem like good routes to go. So how might I go about that exactly 😄