This is part of why for apple platform dev, several years ago I abandoned XML-based XIB and storyboard UI design for any collaborative project. Writing it all out in code (even with just UIKit, no SwiftUI) is a lot more pain-free.
I’d like to do the same for Android projects, but Google is hellbent on the XML usage if you’re building with Android Framework… Jetpack Compose improves the situation some but I’ve not used it much yet.
That said, folks rarely use the GUI editor for Android XML and managing merges isn't as painful, or really painful at all, when compared to XIBs/storyboards.
Also, as you mentioned, Jetpack Compose obviates that and every new Android view should use it IMO.
> I’d like to do the same for Android projects, but Google is hellbent on the XML usage if you’re building with Android Framework…
For sure the Android API is oriented towards building GUIs in XML, but it's actually quite possible to build your Android GUI in Java code.
When I started developing for Android, I took a look at a few tutorials and said "no way", searched the web for how to build Android GUIs programmatically, and never looked back.
https://gtk-rs.org/gtk4-rs/stable/latest/book/composite_temp...
Speaking from a mobile dev's perspective, the native UI design in 2010s was done by XML based files (storybooks in iOS/macOS, XML layout files in Android) and native code would "connect" with the XML files in various ways. Now the development is moving towards declarative approach using frameworks such as SwiftUI and Compose.
This builder pattern resembles quite a bit of how you would declare UI in SwiftUI and Compose.
It's funny because that's my personal nightmare. I'm a JS to Rust developer so I'm biased but the likes of React and Svelte have spoiled me with the ease with which you can integrate reactive components into a UI in a way that you simply can't when you're using a separate XML file.
I agree that the example given looks old-school but Rust has a wonderful macro system, I can imagine building a really slick compose method with macros that generates this kind of code underneath.
Not sure if you are being sarcastic or not, but nothing is more 90s than XML based layout descriptions. Mozilla XUL (recently retired) comes to mind.
Thankfully the industry has mostly woken up from the collective nightmare that was XML.
But apparently a few poor souls are still painfully asleep.
1. A dedicated tree-based transformation language (XSL); and,
2. Axis-queries (Xpath).
If I could Xpath all-the-things, I'd be a happier human. Although, I also feel like I should be able to SQL all-the-things, too. Maybe I'm just a sucker for structured-data query-languages?