Kotlin for the future of Android application development

- Andrés Cruz

En español
Kotlin for the future of Android application development

When we are going to develop applications for Android, the next thing that comes to mind is Java, which is the programming language par excellence until now in the development of Android applications, Java has been around since Google launched its first development environment. software or IDE that was the famous Eclipse with the ADT plugin; said development environment is "deprecated" and the "new" is the already well-known Android Studio that offers a much more pleasant and stable experience than the one offered with Eclipse with the ADT plugin.

One of the common points that these IDEs have is that in both cases they are designed for developing Android applications with Java, at least in the first instance.

However, this is changing little by little and apart from all the problems that Google has had with the issue of licenses when using Java as it is now owned by Oracle, this is an old language, with quite tangled or complex syntax among other considerations or Negative points that in the end hinder the development of Android applications.

As a result of the previous comments added to other considerations, Google has decided to gradually movedo Java por otro lenguaje de programación que al menos intenta esté al mismo nivel que Java como lenguaje de programación por excelencia al desarrollo de aplicaciones en Android con Android Studio.

What is Kotlin? - Kotlin as a possible candidate to replace Java

Kotlin is a programming language that is much simpler, more pragmatic and modern than Java 7 (which is the one used internally by Android), and can be compiled and run on the Java Virtual Machine (JVM) without major problems, allowing it to work with libraries or others. files, classes, among others; which are written in Java without any problem; this makes it a powerful candidate when developing Android applications.

Kotlin is the programming language of the moment, in fashion whose development began in 2010 with the company JetBrains and has gained prominence thanks to Google until it decided to adopt it to develop Android applications using Android Studio.

Android Studio 3.0 and Kotlin: How to use Kotlin with Android Studio?

Primeros pasos con android Studio

Starting with Android Studio 3.0 (remember that Android Studio is the official Software Development Environment for the development of Android applications; you can see the installation steps as well as general information about it at the following link: First steps with Android Studio ) Google has incorporated important changes as you can see in this video:

 

Among several changes, Android Studio's support for Kotlin stands out when creating a new project:

Crear proyecto en android studio con soporte para kotlin

Kotlin's interop with Java to create cross-development

One of the strong points that interested Google in opting for Kotlin as a programming language for Android, and adding support in the star IDE or par excellence for developing Android applications, which is Android Studio, is 100% interoperability with Java; this does not mean limiting the project to code it entirely in Kotlin (which is a completely valid option) but we can also exchange or interoperate the code with Java when we deem it necessary to do so.

With the support added, we can now add whatever classes or files in Kotlin we want:

crear archivo/clase kotlin

Getting started with Kotlin: resources, posts, tutorials, examples...

Currently there is not much material such as tutorials, examples, resources for programming for Android with Kotlin (and less in Spanish) as all this is new; However, there are some applications created entirely with Kotlin, how can you consult the following link:

Examples in Kotlin

And we also have the official documentation: kotlin reference.

In addition to these resources noted above, we are developing several posts that we hope will be of interest to you both geared towards Android with Android Studio as well as more general ones that discuss Kotlin syntax and what it offers us.

These resources are great for getting started or getting started with Kotlin application development.

Andrés Cruz

Desarrollo con Laravel, Django, Flask, CodeIgniter, HTML5, CSS3, MySQL, JavaScript, Vue, Android, iOS, Flutter

Andrés Cruz en Udemy

Acepto recibir anuncios de interes sobre este Blog.