4 ms·
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
by kitsunesoba 4y ago
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.
- myko 4y ago> 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.
- occoder 4y agoAbsolutely. 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.