3 ms·
Can’t believe I’m saying this - the UI declarations look so readable in XML. Time for a quick trip down the memory lane. There was a period in 2000’s when XML
by sheepscreek 3y ago
Can’t believe I’m saying this - the UI declarations look so readable in XML. Time for a quick trip down the memory lane.
There was a period in 2000’s when XML use was at its peak. Everything was using XML. APIs were using SOAP transports (this was before REST became the de facto model). I used to loathe its verbosity in simple configuration files and wished for something simpler. Right around then, Douglas Crawford invented JSON - which really took off. The rest as they say, is history.
We forget how well, markup languages like HTML and SVG can describe anything visual. Compared to the alternative (declarative object API, such as DOM or SwiftUI), I will take *ML any day. And given the popularity of React, I guess I am not alone.
- kumarvvr 3y agoI am surprised that XML gets a bad rap for any use, when HTML is just that. IMV, xml is an excellent format for declaring and wiring up user interfaces, much more so than any other technology. I only wish that we can build desktop applications directly with HTML, without any server running in the background.
- hliyan 3y agoI'm starting to notice this too. More readable than JSON in some cases, in fact. I suspect that while JSON is better for hierarchical data, well-designed XML is better for declarative portions of programs (e.g. UIs). This was actually quite comprehensible: <ContentPage.MenuBarItems> <MenuFlyoutItem Text="Cut" Clicked="OnCutMenuFlyoutItemClicked"> <MenuFlyoutItem.KeyboardAccelerators> <KeyboardAccelerator Modifiers="Ctrl" Key="X" /> </MenuFlyoutItem.KeyboardAccelerators> </MenuFlyoutItem> </ContentPage.MenuBarItems>
- sheepscreek 3y agoEdit: There’s a typo - I meant to name “Douglas Crockford”.
- heisgone 3y agoIt works for simple cookies cutters UI. Anything fancy and original, you are on your own, and there is no way around it. The only thing that came close to combine the possibility of being orignal and readability is SVG, but it went nowhere.