https://kotlinlang.org logo
#announcements
Title
# announcements
i

igor.wojda

11/22/2019, 9:47 PM
I am using a lof of Kotlin (for Android apps) and I would like to build some server-side apps. What would be your recommendation for server-side platform/frameworks/tools, ideally Kotlin based or at least tech something that it’s quite to switch from Kotlin (I am total noob here).
m

Marko Mitic

11/22/2019, 9:59 PM
#ktor or #spring
👍 4
j

josephivie

11/22/2019, 10:46 PM
It really depends on what you're looking for in a server framework. If you want something with all the bells and whistles, go with Spring. If you want to do most things yourself want the library to be simple and clean, go with SparkJava. If you want something between that's growing rapidly, go with ktor. I personally went with ktor, mostly because it seems to be the most commonly used set of server stuff with Kotlin at the moment that isn't "the Java Way".
i

igor.wojda

11/22/2019, 11:33 PM
@josephivie great answer, thx. Any opinion on
NodeJS + Kotlin
?
j

josephivie

11/22/2019, 11:37 PM
Haven't tried it, but at first thought, I'd go with something else. You're already programming with Kotlin, and you could have access to the entirety of Maven libraries and more performance by using the JVM. The only reason I could see to use it is if you're familiar with Node already, such that you could develop faster.
i

igor.wojda

11/23/2019, 1:07 AM
Good point. One last thing - frontend (web). Any recommendations here?
n

napperley

11/23/2019, 1:31 AM
Difficult to make recommendations for web front-end technologies since that area is highly volatile. With the frontend it is much easier to stick with the basics (HTML & CSS). Sounds like the op is developing a full stack web app in which case I would recommend using Kotlin JVM (for the backend) and Kotlin JS (for the frontend) that is connected together with Kotlin MPP ( https://kotlinlang.org/docs/reference/multiplatform.html ).
Some recommended Kotlin JS libraries to use are KotlinX HTML ( https://github.com/Kotlin/kotlinx.html ), KotlinX Coroutines ( https://github.com/Kotlin/kotlinx.coroutines ), and Kotlin CSS ( https://github.com/JetBrains/kotlin-wrappers/tree/master/kotlin-css ). Note that all of these libraries also have a Kotlin JVM version, therefore they can be used on the backend.
If the op uses IntelliJ, and intends to use Ktor (as part of a Web stack) then I recommend creating a new JS Client and JVM Server | Gradle project, which can be found in the Kotlin category inside the New Project dialog.
👍 1
j

jimn

11/23/2019, 6:41 AM
> Good point. One last thing - frontend (web). Any recommendations here? this may be an unconventional answer but having a object storage like s3 buckets source draw-thru from a static content tree or templating system (your choice) can really scale up your availability with almost no mental accounting and reduces pressure on running instances
k

kqr

11/29/2019, 1:21 PM
if you are looking for something `nodejs`y then look at #vertx
👍 1