Two incompatible worlds? Not at all, two complementary worlds that, thanks to Kotlin’s multi-platform peculiarities, are co-existing as a practical and winning solution to write both (web-based) front-ends and back-ends using one language.
At Codemotion Milan 2018, Davide Cerbo has introduced the advantages of using Kotlin for the realization of full-stack projects, showing how effective, in particular, is the current Kotlin-React combination.
Kotlin is a modern language for modern multi-platform applications. It is characterised in particular by the concise syntax and to be easily adopted by those who already know Java (it is not by chance that it runs on the JVM), but at the same time to offer some interesting solutions to carry out more solid projects. An example is the distinction between nullable and non-nullable data types and the obligation to use “null-safe” operators for nullable objects.
It is a language particularly suited for server side programming. Due to its JVM-based nature, it allows gradually migrating large codebases from Java to Kotlin, relying on existing frameworks such as Spring or Java EE Http servlets.
For a modern web application you need a modern framework and React is the most obvious choice for the Kotlin world. There are several Kotlin wrappers to common JS and React libraries such as React itself, Mocha and Redux.
The path of Kotlin and React has just begun, but it’s already promising for multi-platform and full-stack development situations.