3 ms·
It's one thing to draw some widgets. That's the "easy" problem (to borrow some AI jargon). It's totally another thing to specify how these widgets read and wri
by Hemospectrum 8y ago
It's one thing to draw some widgets. That's the "easy" problem (to borrow some AI jargon).
It's totally another thing to specify how these widgets read and write the model in which the business logic is encoded. If you want to animate transitions between valid model states, it all gets ten times as complicated. And then when you try to make it performant by eliminating redundant redraws, it becomes an even bigger mess.
There is no simple and obvious solution that tackles all of the above. The reactive UI model (not just Flutter, but all React-like frameworks) is an ongoing attempt to do a better job of all of it, with varying success. Existing UI toolkits, before the introduction of this model, were not designed for it. They were built on the assumption that the future would be a giant object graph caught in a tangle of callback methods. If you want to make a reactive UI populated by native widget objects, you have to figure out how to plumb all their mutable state back into the reactive model. That's an enormous investment of labor. Writing a new toolkit from the ground up is a huge amount of work in absolute terms, but in relative terms it's the easy way out.
- guix992 8y agoThanks for your reply - it was a pretty insightful rebuttal. Do you think in the future it might be possible for say Flutter to: 1. Refactor flutter into a layout engine and gui widgets 2. Provide the layout engine as an interface on all desktop OSes. Something like a standardized syscall like interface. 3. Anyone can implement a new GUI toolkit to this layout engine interface. 4. For desktop OSes, the number of styling options is less than full blown CSS capabilities(in HTML dom) and these options get compiled out, making execution of native apps GUI slightly faster than DOM apps. Basically, desktop GUI styling is a subset of DOM CSS styling. 5. We use a JSX like templating language to specify UI that either gets compiled to HTML or generates native GUI widgets. Not sure all of my thoughts are 100% fleshed out but does this sound feasible in future?
- projektfu 8y agoI like the sound of orthogonal components.