Newsletter Issue #20

Published: 2020-06-30

dev14 was released, with a ton of changes on the Compose UI side. Beyond that, we look at server-driven UI, Figma, and function lengths.

One Off the Stack, One Off the Slack

You’ve got questions. That’s understandable!

Once again, there were few good questions in Stack Overflow in the android-jetpack-compose tag.

How Long Is Too Long?

A long-standing rule in object-oriented programming is: keep your functions short. In this week’s highlighted Slack thread, that is not necessarily the rule in the world of Compose.

Composable Commentary

Posts, videos, and other new information related to Jetpack Compose!

Compose dev14 Release Notes

They deprecated Recompose and Observe functions. They also now require an initial value for Flow<T>.collectAsState() (or recommend using StateFlow and MutableStateFlow instead).

Compose UI dev14 Release Notes

They got rid of the Px type and types that depended upon it. Either use Dp or use plain Int values to represent pixels. AdapterList is now renamed to LazyColumnItems, and we have a new LazyRowItems counterpart for a horizontally-scrolling roster of items. ConstraintLayout has a new DSL. Modifier.ripple() is now deprecated. And there are many more changes! Note that the next Compose release will not be until July 22nd.

Building an Inbox with Jetpack Compose

Helder Pinhal wrote about porting a SwiftUI implementation of a messaging app inbox UI to Compose, as part of a demo of how to use the Notificare SDK.

Android Dev Perú: Getting Started with Jetpack Compose

For those of you fluent in Spanish, Kevin Gomez presented at an Android Dev Perú Meetup on Compose, and that presentation is available on YouTube.

JetPack Compose with Server Driven UI

Siva Ganesh Kantamani writes about implementing server-driven UI in Compose. “Server-driven UI” means that the server provides UI instructions, not just model data that client-side code has to render.

What To Expect When You’re Expecting… Jetpack Compose

I delivered a light presentation to a couple of Meetup groups on how to plan ahead for when Jetpack Compose eats the Android world, a couple of years from now. Plus, you get to see what my office looks like.

Resource Roundup

100% pure code!

GitHub: CaelumF / FigmaToCompose

This implements a Figma plugin that attempts to export a design as working Compose code.

GitHub: anacoimbrag / contacts-android

Ana Coimbra demonstrates a contacts UI implemented in Compose, from contacts obtained from the Web.

GitHub: indritbashkimi / TelegramExample

Indrit Bashkimi is working on a sample Compose-based Telegram client, using Telegram’s SDK.

…And One More Thing

I have not played with CaelumF’s Figma-to-Compose converter, mostly due to my limited Figma skills.

However, these sorts of tools will be good additions to the Compose ecosystem. A lot of attention will be paid to helping app developers migrate from classic views to Compose, and that certainly is important. But, in the long term, we are going to be doing more “greenfield” Compose development, where projects start with Compose. Yet, it may take some time for firms like Figma to offer Compose options directly in their own products.

Partly, our own tools can help speed up those new Compose projects. Perhaps more importantly, though, our own tools can be used to help show Figma what sorts of data should get collected in Figma itself, to help us more faithfully represent those designs in Compose code. And, of course, Figma is not the only player in this space, so similar tools for Sketch, Zeplin, etc. may also prove to be rather useful.