Twitter commits to Jetpack Compose

0

If you are an Android developer, Jetpack Compose is probably something that worries you. Unless, of course, you have the freedom to simply adopt the latest exciting technology — and it seems Twitter has done just that.


The problem with evaluating Jetpack Compose as a new and maybe better way to build an Android UI is that people compare it to XML. Over many years I have found that many professionals create XML by hand from the beginning to create exactly the UI they need. I use the drag and drop editor and then adjust the XML as needed.

Why the difference?

I’ve never been 100% sure, but I’m sure you’ve already shut down as an XML author after deciding I’m not serious about UIs. Maybe I’m not, but I can create an MVP (minimal viable product, not most valued pro) on the fly with a drag-and-drop UI editor, not so much with hand-written XML. I also make mistakes easily when editing XML and these mistakes are often difficult to fix.

You can also show a customer a mockup of the user interface and show them how to adjust the position and size of things with very little training. The big promise of one of the first declarative UI design languages, XAML, was that you could share UI design among non-programmers using an interactive design program – it was truly a breakthrough and a separation of concerns that paid off.

I also teach Android programming, and for that, just getting started with a drag-and-drop editor is worth a lot. You can also use the tangible objects, e.g. B. buttons, to explain many of the ideas of object-oriented programming, and it makes events a less theoretical concept. Still, drag-and-drop UI editors are generally despised by those in the know.

jetpack icon

I’ve long suspected that disliking drag-and-drop editors was the UI equivalent of the more general “IDEs are for script kiddies, and real programmers use Emacs“. And, yes, I’m an IDE fan too. Why a programmer chooses to ignore tools that make the hardest work easier has always baffled me, and so it is with easy ways to create a user interface .

So you’ll find many zealots comparing Jetpack Compose to XML – not so many comparing it to the simpler and more sophisticated approach that uses a drag-and-drop editor and the constraint layout grid. It also begs the question of why the Android team invested so much time in the editor and the new amazingly ingenious layout grid, only to discard them in favor of something touted as “better”.

Now we have news that the Twitter development team has taken the bait and is reimplementing its user interface using the new technology. Here is a video to explain:

Yes, the video is mostly empty claims that things are better when you compose, but those last few words say a lot – I would never have to touch XML again…. Do you understand what I mean.

The idea that Compose is declarative and therefore something new and amazing is crazy too. Compose is non-declarative – XML ​​is declarative, as is XAML and the like. Compose encodes the UI, so it’s as old as it gets.

My best guess is that we’re fashion’s victims once again, and Twitter really should know better.

composetwiticon

More information

Twitter relies on Jetpack Compose for feature development: higher productivity, fewer errors

On the subject of matching items

Jetpack Compose is 1.0 and ready to use

Android jetpack confusion as V1 approaches

Android Jetpack Compose is welcome, but what about churn?

Android development – constant churn

JetPack and Android Studio 3.2 – Not much new

To be notified of new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us Twitter, Facebook or linkedin.

banner


square



Remarks

or email your comment to: [email protected]

Share.

About Author

Comments are closed.