4 ms·
> The author seems to dismiss declarative UI without explaining why. From my perspective, declarative is the best way to describe UI. …but I mean, that’s an op
by wokwokwok 3y ago
> The author seems to dismiss declarative UI without explaining why. From my perspective, declarative is the best way to describe UI.
…but I mean, that’s an opinion that is not falsifiable.
If the author disagrees, that’s up to them right?
I agree with the author too; after using xaml, my taste for declarative UIs is limited.
Here’s something that is falsifiable: what is possible using declarative UIs is a strict subset of what is possible using imperative code.
If your declarative config is Turing complete, it’s a DSL; ie. a programming language, not declarative and you’re in “not invented here” land.
If not, the possibilities for it are a subset.
That’s provable; so, if you’re worried that your UI is too complex to easily represent with the existing declarative structure, go for code.
What if you need dynamic layouts? What if your layouts are determined at runtime by dynamically loaded plug-ins? What if your layout needs to generated differently based on themes, or screen sizes? Who knows?
It seems entirely reasonable.
The same goes for other declarative solutions and projects. Eg. Terraform.
I mean, the author literally says a) it’s a trade off for velocity, b) they’re more concerned with performance, c) the implementation in slint is not complete and d) they’re considering writing a very very low level UI library to get what they want.
…maybe, they just want different things to what you’re offering?
It doesn’t mean they’re “wrong”.
- rat9988 3y agoI'm not sure where you read "wrong". Did the message get edited?
- TheMaskedCoder 3y agoThose are scare quotes around the word. It's not quoting the parent comment.
- wokwokwok 3y agoNo, sorry if my "'s made it appear I was quoting a literal text. What I mean is: > The author seems to dismiss declarative UI without explaining why. > From my perspective, declarative is the best way to describe UI. I think it's pretty clear that the writer here believes that the OP is wrong about slint and declarative UIs. My point is that OP is not wrong; declarative UI is not the best way of doing UI for all use cases. It is simply one way of doing UI.
- deleted 3y ago[deleted]
- PaulHoule 3y agoI've worked on complex UI's for creatives based on XAML. An application like Photoshop is comprised of relatively simple controls (property sheets, etc.) that are combined in complex ways. (Users can add UI elements such as a color picker, dock them, have them floating in space.) Graphical UI builders are fine for the controls, but there has to be some framework for managing the particular set that is on the screen.