![]() Most services need some persistence layer. This makes it a perfect match for our use case. They just recently added support for the Kotlin/Native target (not yet available for Windows). Ktor is developed directly by JetBrains and written 100% in Kotlin. For this, we will implement a web server application that can interact with a PostgreSQL database for persistence to serve a REST API returning JSON.Īs the web framework, we will use Ktor, which is a modular alternative to other common frameworks like Spring Boot or Quarkus. In this article, I want to showcase what is already possible with Kotlin/Native on the server side. But without a JVM, we can also not use any libraries from the Java ecosystem. ![]() It also can call C libraries from within the Kotlin code base. Kotlin/Native enables us to write programs directly targeting different operating systems (Linux, Windows, macOS, iOS, Android) without needing a JVM. This includes Kotlin/JS (JavaScript), Kotlin/Native, and soon-to-be-released Kotlin/Wasm. As more and more people love to write business applications in Kotlin, JetBrains (the company that created Kotlin) started to develop other targets besides Android/JVM. But actually, the ecosystem is much larger than that. When reading Kotlin, you probably think of Android development or an alternative programming language to Java running on the JVM (Java Virtual Machine). Picture showing the Kotlin, PostgreSQL, Ktor, and Java/JVM logos.
0 Comments
Leave a Reply. |