News for hackers. Stuff that matters.
Re:GUI development with Rust and GTK 4 by kitsunesoba on Tuesday April 25, 2023 @10:08AM (#35700713)
Machine generated XML doesn’t play nice with version control for views that are even moderately complex. Merge conflicts become more of a nightmare to untangle as your app matures, plus it can make pull requests unintelligible.

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.

Re:GUI development with Rust and GTK 4 by myko on Tuesday April 25, 2023 @10:48AM (#35701239)
> but Google is hellbent on the XML usage if you’re building with Android Framework

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.

Re:GUI development with Rust and GTK 4 by occoder on Thursday April 27, 2023 @04:17AM (#35724837)
Absolutely. XML is rarely a good solution for any problem, and usually the worst.

> 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.