Basic question: Are there any web topics to be und...
# getting-started
a
Basic question: Are there any web topics to be understood before beginning to learn server-side Kotlin? Also, is Ktor -> Spring Boot a logical learning path, or should I jump straight to Spring Boot? (I'm a Jr. Android developer with almost nil web experience. I would like to be able to possibly transition to a backend role after a couple of years, in case I lose my interest in Android)
k
I'm pretty much in the same situation, I'd like to know if there are any recommended courses with certifications for Kotlin on the server-side. (I'm a Mid Sr. Android developer)
K 1
a
If your only interest in the wonderful Kotlin server tools is to be stepstones to the Spring Framework, then Spring Boot will make it easy enough to get started. Going from ktor to Spring will just make you sad. Although I would highly recommend coming back to ktor/javalin/http4k afterwards to get a taste of what you're missing πŸ˜‰ .
πŸ’‘ 1
k
Is Ktor already replacing Spring Boot?
βž• 1
πŸ‘€ 1
a
Ktor/javalin/http4k can and does replace the Spring Framework, when combined with the improvements Kotlin gives you over Java. But in my experience, and opinion, most companies are too caught up with the sunk-cost fallacy to move away from Spring. This pinned message shows off a good place to get started with Kotlin. https://kotlinlang.slack.com/archives/C0B8MA7FA/p1658844523232719
πŸ™ 1
Basic question: Are there any web topics to be understood before beginning to learn server-side Kotlin?
I don't really have all the hindsight to properly answer that, but I would say the most important thing is to understand the structure of an HTTP request and response. You can think of an HTTP server as a means of transforming a request into a response, or as http4k so eloquently puts it,
typealias HttpHandler = (Request) -> Response
.
βž• 1
πŸ‘Œ 1
s
I wouldn't necessarily call it sunk cost fallacy that keeps us using Spring, but our novelty budget was already spend by switching to Kotlin. Some Java devs are already grumpy that they have to learn a new language, let them keep their knowledge in how to setup authentification for their rest endpoint. One of the plus sides of Kotlin is gradual adoption, sticking with Spring - at least for a while - is part of that.
πŸ’― 3
Learning Kotlin serverside is really just(?πŸ€”) getting familiar with using serverside libs/tools: your web framework, your database connectivity layer (e.g. Hibernate, JPA, JOOQ, ..), Docker, a rough overview over what your build-pipeline looks like, test-frameworks.
πŸ™ 2
a
Thank you @Andrew O'Hara and @Stephan Schroeder for the insights πŸ™Œ πŸ’Ž
Seeing as I don't actually know what I'll be doing in the long run, and the general opinion that Spring Boot is needlessly huge, I'll be going with Ktor as my chosen framework. Hopefully it'll replace Spring in the coming years.
s
Ktor is my web framework for private projects as well! here for example a proof of concept of setting it up with Ktor2 and kotlinx.serialisation (instead of jackson, which is the default in java-land): https://github.com/simon-void/ktor_serialization_demo
πŸ™ 1
βž• 1
m
You should just avoid Spring altogether, that’s the right path πŸ˜‰
🀷 1
πŸ‘ 1
πŸ˜† 1