jetc.dev Newsletter Issue #21
It’s another quiet week in the world of Compose. But, this week, we take a look
ConstraintLayout, and dates/times. Plus, I advise developers to
“take a cold shower” and not get too excited too quickly when it comes to Compose.
One Off the Stack, One Off the Slack
You’ve got questions. That’s understandable!
As a demonstration of how the world of Compose changes, this question from November 2019
asked how to create a text field with a hint. It attracted four answers, three showing
creating one manually, and more recently Gabriele Mariotti pointing out that this
is now built in via
The names we use for programming concepts get handed down from past generations, and those names have baggage that make it difficult to work with new concepts. In this week’s highlighted Slack thread, we examine padding, margins, spacing, and how Compose handles these concepts.
Posts, videos, and other new information related to Jetpack Compose!
Siva Ganesh Kantamani is back, this time with an overview of using
the Compose implementation of
ConstraintLayout and how its DSL compares
to how we would create
ConstraintLayout in traditional layout XML.
100% pure code!
…And One More Thing
Jetpack Compose is going to be awesome!
But, let’s not go crazy, either.
Can you ship a production app using the Compose developer preview? Yes.
Is that a good idea? Right now, probably not, unless being “first to market” with something
specifically implemented in Compose is important. Bear in mind that the user
will be oblivious to your choice of UI toolkit, on the whole. Ideally, users will
not care whether you use Compose or the classic
View system. And, in the short
term, the likely reason that they will care is if they run into a Compose bug.
Developer previews are meant for experiments, not for production. So, while
nothing stops you from shipping an app with Compose, that may not be in your
best interests, until Compose becomes far closer to being stable.
Could somebody new to Android learn Compose and skip things like fragments and
View system? Theoretically, yes.
Is that a good idea? Right now, probably not. The amount of stuff written about Compose is very limited compared to the decade-plus of knowledge out there about views. Using Compose is a bit challenging for experienced developers. I cannot recommend newcomers to Android start with it today. In a couple of years, I expect that to change.
I get the enthusiasm over Compose. But at the same time, do not let the “sex appeal” of Compose blind you to the risks and costs of using such a new technology right this moment, for cases where Compose is not necessary.
If you encounter problems in subscribing, let us know!
- 2021-02-16: alpha12 and the upgrade process! Colors and typography! Action bars! Scaffolds! Image loading! Worries about the beta! And... McDonald's?
- 2021-02-09: Scaling and zooming images! Navigation, for Android and the desktop! Containers! GitHub projects! And... tell me what you think of this newsletter!
- 2021-02-02: alpha11! @iateyourmic on View interoperability and testing! Modifiers! ActivityResult! And... piano chords?!?