No one should really be writing UI code by modifying a file by hand because UIs are often complex and deep, so the file structure used to store the UI data doesn't need to be human-readable. This is true for any data - once you hit a moderate level of complexity neither JSON or XML really work - you need to build a tool to manipulate the underlying data rather than changing it directly. If you do that then it doesn't…
so we shouldn't write HTML by hand, but instead use WYSIWYG editors?
When XML Beats JSON: UI Layouts
11–20 of 274 posts
Re: When XML Beats JSON: UI Layouts
#12But the way article is put forward is as if using json we cannot achieve tree structure
Re: When XML Beats JSON: UI Layouts
#13No one should really be writing UI code by modifying a file by hand because UIs are often complex and deep, so the file structure used to store the UI data doesn't need to be human-readable. This is true for any data - once you hit a moderate level of complexity neither JSON or XML really work - you need to build a tool to manipulate the underlying data rather than changing it directly. If you do that then it doesn't…
I strongly disagree. SwiftUI is fucking amazing.
https://developer.apple.com/tutorials/swiftui/
Even with your other comment about "until you hit a moderate level of complexity." People are already creating some complex things with it. In fact, they can be more complex than what you can achieve with traditional frameworks when you consider the time it takes; what takes me a day in UIKit etc. takes me a minute in SwiftUI, so I can quickly move on to the next bit.
With declarative UI code I could literally have a usable app in the same time it takes me to struggle with getting separate visual designers + logic editors to agree over a single moderately complex component.
Though, it is several layers of abstraction over what really happens behind the scenes, so I guess a part of your point stands.
Re: When XML Beats JSON: UI Layouts
#14No one should really be writing UI code by modifying a file by hand because UIs are often complex and deep, so the file structure used to store the UI data doesn't need to be human-readable. This is true for any data - once you hit a moderate level of complexity neither JSON or XML really work - you need to build a tool to manipulate the underlying data rather than changing it directly. If you do that then it doesn't…
Following what you say we should only have binary format. I think you underestimate the convenience of a text format. It does not only provide a simple way to generate it, but also provide a way to modify it by hand .
Re: When XML Beats JSON: UI Layouts
#15No one should really be writing UI code by modifying a file by hand because UIs are often complex and deep, so the file structure used to store the UI data doesn't need to be human-readable. This is true for any data - once you hit a moderate level of complexity neither JSON or XML really work - you need to build a tool to manipulate the underlying data rather than changing it directly. If you do that then it doesn't…
Following what you say we should only have binary format. I think you underestimate the convenience of a text format. It does not only provide a simple way to generate it, but also provide a way to modify it by hand .
Re: When XML Beats JSON: UI Layouts
#16Re: When XML Beats JSON: UI Layouts
#17The main reason that I use XML (occasionally) is because of XML Schema. It's a very precise data description that can be semantically verified. Otherwise, I try to use JSON, where possible, because I am not a masochist.
Re: When XML Beats JSON: UI Layouts
#18The main reason that I use XML (occasionally) is because of XML Schema. It's a very precise data description that can be semantically verified. Otherwise, I try to use JSON, where possible, because I am not a masochist.
Re: When XML Beats JSON: UI Layouts
#19If XML is better at representing trees, and JSON is a tree, does that mean that XML is better at representing JSON than JSON?