|Android Jetpack Confusion As V1 Approaches|
|Written by Mike James|
|Thursday, 20 May 2021|
Android development seems to be in the hands of a leaderless team - or at least a team that has no idea where it is going. Google I/O is always time to announce new things, but as far as Android programmers are concerned all we get is more, and more and more. With Version 1 of Jetpack scheduled for July, what is the current state?
How do you write an Android program? I have to admit that at the moment I have no idea. The loudest shouting coming from the Android team is selling MAD - Modern Android Development - which seems to mean more or less whatever the team want it to mean, but there is a big reliance on anything in Jetpack. At first Jetpack was a sort of cleaning up of the mess that we already had, but it slowly evolved into a complete takeover attempt. What do you want to do -- there's a Jetpack solution for that...
So at I/O we have the announcement of the new beta of Android Studio which headlines its increased integration with Jetpack Compose. I have spent some time learning Compose and I have to say that I still don't understand what the fuss is about. Compose is about creating a UI - hardly rocket science and yet it seems the Android team can't really figure out what rocket they are trying to build. When Android Studio first appeared we were in the era of XML-style declarative UI. Serious programmers sat down and wrote lines of nested XML and tinkered with it until it was just perfect. Beginners opted to use the drag-and-drop UI editor, which generated the XML for them. It was all very easy and, while some of the widgets and layout components could have been a bit better, it mostly worked.
Then after learning how to get the best out of the layout components we had, the huge and buggy constraint layout manager was introduced and everything else was deprecated. All that work --- deprecated. So we take a deep breath and learn how to work with the glacially slow constraint layout editor. After a round of hardware upgrades it almost ran fast enough to make interactive design possible. So we dig in deep and adopt the constraint layout and hope things will settle down.
But no. Now we have Jetpack Compose - a new declarative approach to UI. Hang on a minute - wasn't the XML declarative enough? OK - perhaps we can do better. Android Studio now supports Compose, not as a drag-and-drop editor but a preview facility. Now designing prototype UI has become harder for no real reason. But the new way might be better, so let's learn Compose and do everything over again, well over over again.
So imagine how wonderful it is to discover that the Constraint layout is now part of Jetpack. Yes, the new way to do the job of UI is the old way -- and the new way --- you pick which you should use. The Google I/O announcement starts:
"Android Jetpack is a suite of libraries, tools, and guidance to help developers follow best practices, reduce boilerplate code, and write code that works consistently across Android versions and devices. Today, 84% of the top 1000 apps on Google Play rely on Jetpack."
If Jetpack includes everything both old and new then presumably we shouldn't be surprised that 84% of the top apps use it. In fact, it raises the question of what the other 16% are doing?
So now I sit down in front of my newly downloaded Android Studio and start a new project. All I want is a few components on a page with a nice background and ... what do I do? XML? Drag-and-drop using Grid and linear layout? Constraint layout? Or do I simply go MAD and use Compose?
I don''t know and I don't think that the Android team has a clue either. It seems to be a loose grouping of competing sub-groups with an attempt by someone to stitch it all back together as a coherent whole. It isn't coherent and it lacks any clear direction.
Android development is a mess and its getting worse, not better.
When you reflect on it could they have invented a better acronym than MAD for the current situation - is there a joker in the (Jet)pack?
Android Jetpack Compose Is Welcome, But What About The Churn?
Android Development - Constant Churn
Android Studio 4.1 - No Relief In Sight
Android Studio 4 - Not One Giant Leap For Android Programming
Android Studio 3.4 - Trying Hard But No Bouquets
Android Studio 3.3 - Trying Harder?
Android Studio 3.2 Released - More Cruft Than Substance
JetPack And Android Studio 3.2 - Not Much New
To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
or email your comment to: firstname.lastname@example.org
|Last Updated ( Thursday, 20 May 2021 )|