Google simplifies the coding of Android apps with Jetpack Compose

Get a free Techzine subscription!

Google has released an alpha version of its Jetpack Compose tool. The tool allows developers to speed up the encoding process of the user interface of Android apps.

The tool Jetpack Compose of the tech giant made its debut last October as a preview but is now available as an alpha version. The tool helps developers of Android applications to better streamline the development process of the user interface.

This allows them to save time in the development process, as the development of the user interface (UI) often requires a lot of custom code. Especially because the various UI elements had to be written with XML. This often makes the development of Android applications complex because the basic properties of this type of application were often written in other code languages. To overcome this complexity, a lot of so-called ‘boilerplate’ code (repetitive code) was needed.

Jetpack Compose limits the amount of boilerplate code needed. The tool makes the use of XML redundant because the UI and the basic functionality are written in one code language. For this common code language, Google has selected Android Kotlin.

Less code for changes

Because of the Jetpack Compose tool, less code is needed to handle changes to the interface when developing the UI. For example, when a customer removes an item from the shopping cart. When this occurs, the interface has to refresh to show that change.

By using Jetpack Compose in the building process of the application, this is no longer the case. Interface elements written with this tool can apply these updates much faster than XML-based elements.

Updates of Jetpack Compose

Jetpack Compose also received several improvements in the alpha-release. For example, it is now possible to build interface elements created with the tool into an existing Android application based on XML. This makes it possible for Google to adapt most of the applications present in the Play Store more efficiently, and these applications will also use Jetpack Compose in the near future.

Additionally, the tool is now more deeply integrated into the desktop toolkit Android Studio for building Android applications. Programmers can now write the code for an interface element in the Android Studio editor and immediately view an interactive preview of the element in another tab. This preview automatically refreshes when the underlying code changes.

Faster to the market

With the alpha-release of Jetpack Composer, Google wants to make it easier to modify existing Android applications. The easier and faster developers can build and modify applications, the faster they will be released to the market.