4 ms·
Graphically intensive apps do it for performance. But the tradeoff is you lose all the native UI controls that the OS gives you--form fields, text selection, an
by RussianCow 12y ago
Graphically intensive apps do it for performance. But the tradeoff is you lose all the native UI controls that the OS gives you--form fields, text selection, animation, etc. So I don't think replacing the DOM with OpenGL or similar is a good solution for general-purpose apps.
- adamnemecek 12y agoAll of those would be implemented in a framework.
- bzbarsky 12y agoYes, they already are. That framework is called the DOM. People keep complaining about it and trying to come up with replacement frameworks that end up slower and less capable... The DOM definitely has its problems, mind you. Investing some time in designing a proper replacement for it is worth it, as long as people understand going in that the project might well fail.
- adamnemecek 12y agoWhich framework has tried to replace the DOM?
- bzbarsky 12y agoNone have tried to replace all of it that I know of. People have tried to replace things like text editing (with canvas-based editors), CSS layout of the DOM (with various JS solutions involving absolute positioning), native MathML support (MathJax; this one has of necessity done better than most, because of so many browsers not having native MathML support). There are a bunch of things out there that attempt to replace or augment the built-in form controls, with varying degrees of success.
- adamnemecek 12y agoThat's my point. Currently, you cannot really replace the DOM since that's kind of the extent of the exposed APIs. None of the projects that you mention are really relevant to the discussion. I agree that they didn't change shit but it's precisely because they are still built on the DOM and cannot really go below that in the abstraction layer.
- coldtea 12y ago>I agree that they didn't change shit but it's precisely because they are still built on the DOM and cannot really go below that in the abstraction layer. There exist UIs done in Canvas and WebGL that are arguably below the DOM in the "abstraction layer" and don't need to use much more DOM nodes besides opening a canvas/gl panel... (Most full screen 2G/3G web games fall into this, for starters, and those are in the tens of thousands. But there are also lotsa apps).
- xxgreg 12y ago> None have tried to replace all of it that I know of. https://github.com/domokit/mojo/tree/master/sky https://github.com/domokit/mojo/tree/master/sky https://github.com/domokit/mojo/tree/master/sky/specs https://github.com/domokit/mojo/tree/master/sky/specs
- comex 12y agoFlipboard's from the recent story? The resulting site breaks accessibility and the layout obviously has less capability, but it's certainly not slower.
- adamnemecek 12y agoHuh, that's actually seeming not that dissimilar from what I had in mind.
- coldtea 12y ago>Yes, they already are. That framework is called the DOM. People keep complaining about it and trying to come up with replacement frameworks that end up slower and less capable... The ones I've seen are actually faster -- Flipboard for one gets to 60fps scrolling on mobile, IIRC. And of course all WebGL based interfaces on native mobile apps that re-implement parts of Cocoa Touch et al, are not that shabby either. Sure, it doesn't have as much accesibility, but that's something that can be fixed in the future (and of course people needing more accessibility can always use more conservative alternatives).