|Google Jetpack Compose UI Toolkit Now In Beta|
|Written by Nikos Vaggalis|
|Monday, 01 March 2021|
Google has launched a beta version of Jetpack Compose, a new UI toolkit that is designed to make it faster and easier to build native Android apps. The developers say that Compose offers modern, declarative Kotlin APIs, that can be used to build "beautiful, responsive apps with way less code".
Jetpack Compose was originally deployed as part of Google's Architecture Components, an attempt to clean up and freshen up the ways of developing for Android. Subsequently it has established itself as the new and default way of building GUI apps on the platform.This clean-up attempt didn't come without churn though, as we've described in Android Jetpack Compose Is Welcome, But What About The Churn?
Back in September 2020 I had covered the newly introduced UI toolkit in its Alpha version.It promised a lot.Backward compatibility with the "old" view-based UI code bases,write dramatically less UI code in declarative fashion and make migrating easy.
The Alpha version included:
The now beta, improved on those features but it added new ones as well:
The Beta version is considered so stable that you can write production ready apps with it.Also Google tells that from now on there won't be APIs removals but only adding new ones and improving the existing.In other words this is an open invitation to start developing with the new platform.For that it is also requires the latest Canary release of Android Studio Arctic Fox which includes new project templates to help you get started with Compose.
From the official announcement I take one thing:
Compose takes care of updating your UI when your app state changes, so you don’t have to manipulate your UI into the desired state which can be tedious and error prone.
Pretty important departure from the world of fragments and memory leaks.
Another departure from the past is that Compose is Kotlin-only.This on one hand allows it to use all of Kotlin's state-of-the-art features such as Coroutines. On the other, it means that you have to go Kotlin from now on, Java won't make the cut any longer.
Also last November and December, I checked out the sibling Jetpack Compose Desktop project by Jetbrains, which is based on Google's Compose, aiming to allow extensive UI code sharing between Android and desktop applications - for example large portions of UI code written for Android can be used, say, on Windows, without hassle. This code sharing happens via the Kotlin Multiplatform SDK.
So there's a couple of components at play that combine to make up Google's vision of the future for the Android platform, and beyond. Kotlin the language, Kotlin Multiplatform, Jetpack, Compose and Compose Desktop.
Of course, without strong documentation everything would be futile. Google is aware of this fact, thus together with the official announcement of the beta release it has also revamped all the relevant documentation and learning pathways, with videos, hands-on codelabs and guides.
Pretty exciting.Now let's get on with it!
or email your comment to: firstname.lastname@example.org