Earlier quoted context omitted.
Much of this complexity comes down to primitives being too primitive for the use case of web apps. They’re fine for documents, but for web apps it’s like trying to build a building from grains of sand instead of concrete blocks. Rube Goldberg machines are unavoidable when you’re doing that. The browser should be doing most of the heavy lifting by providing a full suite of minimally themed but capable widgets that req…
> The browser should be doing most of the heavy lifting by providing a full suite of minimally themed but capable widgets that require little to no JavaScript and can be skinned entirely with CSS. Well, I'd prefer if it provided widgets that can't be skinned. :-) The theming should be the user's choice, not the app designer's. > That alone would wipe out an incredible amount of complexity and if done right would make…
Rethinking DOM from first principles
201–210 of 234 posts
Re: Rethinking DOM from first principles
#202Earlier quoted context omitted.
"Web apps" should have been standard desktop apps with a network connection. You don't need a browser to use network protocols (and protocols died when HTTP stopped sending hypertext and started to send JSONs) or call APIs. Your OS manages the network stack. We can complain how much we want, but the stream of shit, web-shit included, cannot be stopped or reversed. Brace yourself for more.
Desktop apps run the risk of installing malware.
Re: Rethinking DOM from first principles
#203People often lament how DOM, HTML and CSS are becoming more and more complicated: the difficulty with simple and/or common tasks like vertical centering or virtualization, 600+ CSS properties, so many JavaScript methods, leaky abstractions, { contain: size }. I agree on many issues, but equally I struggle to imagine how it could realistically be not complex. If it was a result of a single very well thought through vi…
Not really. The Web is owned and operated by Google. They can literally do whatever the fuck they want with it. (Any "standardization" process is less then a formality at this point.)
Re: Rethinking DOM from first principles
#204People often lament how DOM, HTML and CSS are becoming more and more complicated: the difficulty with simple and/or common tasks like vertical centering or virtualization, 600+ CSS properties, so many JavaScript methods, leaky abstractions, { contain: size }. I agree on many issues, but equally I struggle to imagine how it could realistically be not complex. If it was a result of a single very well thought through vi…
Visual Basic was a much simpler dev environment 30 years ago already. I was hoping with WASM we'd get something similar, but I'm still waiting.
Re: Rethinking DOM from first principles
#205Earlier quoted context omitted.
The UX is nowhere near close to native apps, particularly on platforms that take UX seriously like macOS, iOS or Gnome.
Can you give some examples, please? I can't think of a single thing that cannot be overcome by good design.
Some widget will be rendered wrong, they'll use the wrong font (or even hinting!), right click may not work as expected, they won't use multiple windows correctly, etc.
Even React Native gets some of this wrong, although few use that on desktop.
If you're a user that appreciates consistency on your OS, all of this will stick out and annoy you. And you'll end up using Apple's Mail.app over GMail's UI.
Re: Rethinking DOM from first principles
#206Re: Rethinking DOM from first principles
#207People often lament how DOM, HTML and CSS are becoming more and more complicated: the difficulty with simple and/or common tasks like vertical centering or virtualization, 600+ CSS properties, so many JavaScript methods, leaky abstractions, { contain: size }. I agree on many issues, but equally I struggle to imagine how it could realistically be not complex. If it was a result of a single very well thought through vi…
Visual Basic was a much simpler dev environment 30 years ago already. I was hoping with WASM we'd get something similar, but I'm still waiting.
Re: Rethinking DOM from first principles
#208Earlier quoted context omitted.
This is exactly what I am talking about. All these excuses, especially about vanity, are masking behaviors. DOM access is not quite as fast now as it was 10 years ago. In Firefox I was getting just under a billion operations per second when perf testing on hardware with slow DDR3 memory. People with more modern hardware were getting closer to 5 billion ops/second. That isn’t slow. Chrome has always been much slower.…
"In Firefox I was getting just under a billion operations per second when perf testing on hardware with slow DDR3 memory." When you profile something and you get "a billion per second" what you've got there is a loop where the body has been entirely optimized away. Presumably the JIT noticed you were doing nothing and making no changes and optimized it away. I don't think there's a single real DOM operation you can d…
Re: Rethinking DOM from first principles
#209Earlier quoted context omitted.
> when you so much as change an element border (which may trigger a full re-layout of the entire page) This is easily avoided: use 'outline' instead of 'border', or just keep the border width fixed and change the border color to/from transparent.
> This is easily avoided: use 'outline' instead of 'border' Yup. And DOM is full of footguns like this. "Oh, you can't do this primitive thing no UI kit has a problem with, you have to use this workaround".
Secondly, there are two kinds of visual operations that can occur from a DOM change: a screen repaint or a local change. A repaint occurs because the configuration of an element is modified relative to its dimensions, which includes: size, shape, or location. Everything else is really just a color change and is very fast regardless of the DOM size.
Even still modern visual rendering is pretty fast. I have a personal project that is an OS GUI, including file system display, written in TypeScript that displays in a browser. It took close to 10000 DOM visual on the page at one for drag and drop to become slower and laggy. I wouldn’t build a AAA 3D game engine in that, but it’s also not the intended use case.
Re: Rethinking DOM from first principles
#210Earlier quoted context omitted.
> There should be a singlular framework for creating desktop apps. Why?
Well why have two completely different ecosystems for the wbe and desktop/mobile applications, especially in terms of UI? Both can network
We have seen all these framework claimed to be cross platforms and none of them are not able to make it to the top framework being used.
Web is the only "platforms" with some kind of success by abstract everything away so most of the browser display roughly the same things to all users on all OS.