When you start a new API project, one of the first questions to answer is what programming language to use. Picking the right one can make all the difference. Some languages help solve certain problems while others inhibit solutions. Even after a language is chosen and tens-of-thousands of lines of code have been written, there is the possibility of reducing complexity by using new languages on the sameruntime.
In this two-part blog series, we’ll explain why the JVM provides a strong basis on which to run your APIs, and how to simplify their construction using a framework called Spark and a new programming language called Kotlin. In this first part, we will introduce you to the JVM and how it can execute code written in many programming languages, including Kotlin. We’ll discuss a number of Kotlin’s features and show them in the context of APIs.
In the next post, we’ll explore the Spark framework in detail, and how to complement this toolkit with additional components like Inversion of Control (IoC). During the series, we’ll develop a boilerplate that you can use to create robust APIs with Kotlin and Spark. The code can be found on Github, so refer to it there as you read through the snippets below.