Hey guys, I have no experience with kotlin or java...
# server
s
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
c
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.
👍 4
m
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
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
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 😄