How to choose a programming language to create an Android application

Hello, Habr! I present to you the translation of the article “Top Programming Languages ​​for Android App Development” by Mohit Maheshwari.



The rapid development of information technology in recent years has led to the emergence of many new various devices and technologies, including tablets, smartphones, smart watches and other gadgets. They are more and more firmly entering our lives and becoming commonplace. The leading platform among such devices is the Android operating system.



image



Choosing a programming language



Java is currently the most popular programming language for mobile development on Android. Although Google is actively promoting Kotlin as a language that will replace Java. Android applications are also written in other languages.



Studying different types of languages ​​will help you to form a clear idea of ​​which programming language you need to choose to create certain types of applications.



The programming languages ​​that are used to develop Android are briefly described below:



Java is the official language for Android development and is supported by Android Studio.



Kotlin is the official and most recent Android language introduced; It is similar to Java, but in many ways a little easier.

Android Studio also supports C ++ using the Java NDK, which can be convenient for games.



C # is somewhat more convenient for beginners, unlike C or C ++. It is supported by some very convenient tools, such as Unity and Xamarin, which are great for developing games and cross-platform applications.



BASIC is incredibly enjoyable to use and is the perfect start to learn coding.



Corona is another cross-platform tool that uses the Lua language (a scripting programming language, ideologically and ideally closest to JavaScript) to implement application logic, it greatly simplifies the process of building applications and allows you to call your own libraries.



PhoneGap (HTML, CSS, JavaScript) - if you know how to create interactive web pages, you can use this knowledge with PhoneGap to create a simple cross-platform application.



Learn more about tools and languages



Android Studio



The best way to develop an Android app is to go and install Android Studio. Android Studio is an integrated development environment (IDE) for working with the Android platform.



image



Android Studio, powered by JetBrains IntelliJ IDEA software, is the official Android app development tool. On May 17, 2017, at the annual Google I / O conference, Google announced support for the Kotlin language used by Android Studio as the official programming language for the Android platform in addition to Java and C ++.



Android Studio is a piece of software called an IDE, or integrated development environment. It is offered as a package with the Android SDK, which is nothing more than a set of tools used to facilitate the development of Android. Everything that is required to start creating applications for Android is concentrated here. Features such as the visual designer make the process smoother, while advanced, powerful features are added all the time to give developers access to things like cloud storage.



Java



For any developer of mobile applications on Android, Java remains the first and most preferred programming language, as it is supported by Google and most of the applications on Google Play are built on it.



image



Java itself was developed by Sun Microsystems (subsequently acquired by Oracle) back in 1995, and it is still used for a wide range of software applications. Java code is executed by a virtual machine that runs on Android devices and interprets the code.



For beginners, Java may seem a bit complicated. This becomes an obstacle faced by people who plan to get into the development of applications for Android.



But, if you are a beginner, and you want to make a game, or just start learning for the sake of training, it is better to start with something easier, but return to Java as soon as you get a little more experience.



Kotlin



Kotlin has recently emerged as the “other” official language for Android development. Like Java, Kotlin runs on a Java virtual machine. It is fully compatible with Java and does not cause any obstruction or file size increase.



image



The main difference is that Kotlin requires less “boilerplate” code, i.e. easier to read system. It also eliminates errors such as null pointer exceptions, and even frees you from having to end each line with a semicolon. This is a great programming language if you are just learning to develop applications for Android.



Kotlin is an easier starting point for beginners, and the fact that you can use Android Studio is a big plus.



C / c ++



What really should not be chosen for a beginner to develop an application for Android is C / C ++. Android Studio supports C / C ++ using the Android Native Development Kit. This means that the written code will not work on the Java virtual machine, but on the device itself and will give more control over things like memory. For example, for 3D games, this will squeeze out additional performance from the device.



FROM#



C # is a simpler, purely object-oriented version of Microsoft's C and C + development. Microsoft's primary goal was to combine the power of C ++ with the simplicity of Visual Basic. This Android development language is often enjoyed by many developers, especially the combination of C # and Unity.



Unity



Unity is a cross-platform development environment for computer games. Unity allows you to create applications running under more than 20 different operating systems, including personal computers, game consoles, mobile devices, Internet applications and others. Unity was launched in 2005 and has been under constant development since then.



image



The main advantages of Unity are the presence of a visual development environment, cross-platform support and a modular system of components. The disadvantages include the appearance of difficulties when working with multicomponent circuits and difficulties when connecting external libraries.



This is an open source tool that makes it incredibly easy to create your own games. With just a few lines of code, you have a game written in less than an hour.



In addition, development in this way provides a very practical way to learn object-oriented coding, because objects in this case are actually objects most of the time.



C # can also be used with Xamarin through Visual Studio. This is similar to the traditional Android development with the advantage of cross-platform, which has a code base for Android and iOS.



Basic



What we learned about C # was an attempt to combine the power of C with the ease of Visual BASIC. This is because BASIC (Beginners All-Purpose Symbolic Instruction Code) is incredibly enjoyable to use and an absolutely perfect starting point for learning coding.

Unfortunately, it is not officially supported by Android Studio, and it cannot be used in Unity. But there is a lesser-known option for developing Android applications in BASIC called B4A (BASIC 4 Android), which allows you to create Android applications using BASIC.



image



Corona



Corona offers another easy way to develop Android applications. You will code in LUA, which is already much simpler than Java. It supports all of its own libraries, which allows publishing data on multiple platforms.



Corona is suitable for those who want to create something relatively simple and not so concerned about developing their coding skills or becoming a professional. If you want to use features such as in-app purchases, you will need to pay. The same goes for using native Android APIs.



Phonegap



Finally, the last simple option that you can choose for developing Android applications is PhoneGap.



image



PhoneGap runs on Apache Cordova and allows you to create applications that use the code that you usually use to create a website: HTML, CSS and JavaScript.



It's time to make your own choices!



All Articles