LINE Engineering

Total 1 Tagged in ’#Programming language’
  • Why we use Kotlin in LINE Creators Studio
    Freddie Wang 2017.07.20

    Currently working on Android development in LINE Fukuoka. I'm a zealous user of Kotlin.

    Before we begin

    Hi everyone, I am Freddie Wang from LINE Fukuoka's development team. I'm currently in charge of developing a new Android app called LINE Creators Studio. LINE Creators Studio is a sticker creation tool that lets anyone create his or her own stickers and sell them on LINE Store.

    In this blog, I'd like to talk about Kotlin, the programming language which the LINE Creators Studio app is built on. I will explain why we chose Kotlin as our main language and introduce some of the Kotlin features we are using.

    Note: LINE Creators Studio is currently available in Japan only. It will be released to other regions soon.

    Advantages and key features of Kotlin

    Why Kotlin?

    At Google I/O 2017, Google announced that Kotlin is now officially supported in Android Studio 3.0. When we kicked off the development project for LINE Creators Studio at the end of 2016, we were tasked with the challenge of growing it into an MVP (Minimum Viable Product) project in a very short time. Although Kotlin 1.0 had been released quite some time ago, no one in our team had the experience of using Kotlin. We spent some time to conduct a survey on Kotlin before starting the development and eventually decided to use Kotlin because of the benefits it provides as described below.

    100% interoperable with Java

    The most appealing aspect of Kotlin is that you can mix Kotlin code and Java code in the same project and continue to use all existing Java libraries. Although we don’t have any legacy Java code in our project, we wanted to use some awesome libraries such as Dagger 2, Retrofit, and RxJava.

    Concise syntax

    Kotlin is designed for solving problems. One of its main goals is to write clean code more easily than Java. This is the first and foremost essential factor for us when developing Android applications.

    Reduced dependencies

    Kotlin has a compact runtime library which can replace some large Java libraries such as Guava. Using large libraries may not be a problem in server or desktop environments but it can be problematic in Android. Because the Android environment puts 65K methods limit on Android apps, we should avoid using large Java libraries. Kotlin's stdlib library (version 1.1.3-2) has only 6306 methods, which means it has less impact than the Guava libraries in terms of the number of methods.

    Compatible with old Android devices

    Kotlin 1.0 is based on Java 6, which means it can support Android devices whose version is 2.3 or higher. This is another very important factor for Android developers.

    Kotlin Android Programming language

    Read More