Live data from Hacker News

Rethinking DOM from first principles

acko.net

231–234 of 234 posts

Re: Rethinking DOM from first principles

#231
post #229

Earlier quoted context omitted.

I have experienced numerous conversations about performance with people who invent theories while never actually measuring things. Typically this comes from students. That is not correct in practice. Some operations are primarily CPU bound, some are primarily GPU bound, and some are primarily memory bound. You can absolutely see the difference when benchmarking things on different hardware. It provides real insight i…

Sure, go ahead and show me your "data structure traversal", in Javascript (JIT'd is fine, since clearly non-JIT is just out of the question), that works in 3-5 cycles. The whole topic of this conversation is a measurement in which it was claimed that "a billion DOM operations per second" were being done in 2015. That's a concrete number. Show me the actual DOM operation that can be done a billion times per second, in…

I am not preventing you from measuring things. The burden of proof is equally on everybody concerned with speed.

https://jsbench.github.io/#b39045cacae8d8c4a3ec044e538533dc

I cannot go back in time to 2015 conditions, but you can run the tests yourself and get your own numbers. Try running that in different browser and on different hardware. Another interesting thing is experimenting with is HTTP roundtrip speed and WebSocket send versus receive speed on different hardware.

This is interesting because many assumptions are immediately destroyed once the numbers come in. Many of these operations can execute dramatically faster on hardware with slower CPUs so long as the bus and memory speeds are greater.

What's also interesting is that many developers cannot measure things. It seems as if the very idea of independently measuring things is repulsive. Many developers just expect people to give them numbers of something and then don't know what to do with it, especially if the numbers challenge their assumptions, like cognitive conservatism.

Re: Rethinking DOM from first principles

#232
post #225

Earlier quoted context omitted.

Any examples of what the web does better? I can't think of any, esp with activex controls where you could plug in any third party component.

Text layout and typography (text-wrap: pretty comes to mind), for example. Sure, a lot might be possible if you call out of VB and embed another runtime, but out of the box Web is pretty damn batteries includes relative to VB, I think.

OK fair enough. I meant really functionality of crud apps where there usually isn't a lot of text and if there is vb is good enough. Of course you can always put a browser control in your form for what browsers do best.

Re: Rethinking DOM from first principles

#233

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…

When look and feel of a widget are not controllable by designer, what ends up being is that people by whom it is controllable—who developed the widget, or the end user—become the de-facto designers. This is further complicated by the fact that “look and feel” can hardly be perfectly decoupled from how it works and its semantic content model (which in an ideal world the data to be skinned would be described in).

Though I can see both sides, there is a belief system in which this type of work is best delegated to professionals.

Re: Rethinking DOM from first principles

#234
post #49

Earlier quoted context omitted.

While the web has grown complex in line with increasingly complex applications, the platform is also undeniably bloated, precisely because every new feature (like HTML in Canvas proposal) has to be shoehorned into an already very fragmented puzzle. Backwards compatibility has become an idealistic badge of honor rather than a technical feat. I believe the article does a good job at getting into the technical parts tha…

I wouldn’t say that it’s not bloated or that it does not deserve to shed some legacy functionality, but I’m impressed at how it’s not more bloated and dysfunctional, given circumstances.

Really loved Steve witten's recent broad look at web tech. Covers a ton of ground. Almost all the anti-web "bloat" stuff feels unserious as fuck, just vague general whining without the faintest leadership towards actual meaningful better. It's so unclear to me, there's so little evidence to me the legacy really drags us down. Steve nicely reviews real actual points and topics, has actual concerns to bring up. I'm still wholy unconvinced this online endless whinge-fest has anything serious to say, has even a modicum of a points and there's so little effort to point to or steer to better. But God damn does it feel so good to escape totally fucking useless and at least see some good discussion of inside out vs outside in paint models, that at least has specific concerns about core basics of the rendering paradigm. Acko.net is the greatest. https://acko.net/blog/html-is-dead-long-live-html/

The web platform has just done exceedingly fantastically well with incredibly respectable people working really hard to steer things forwards. Having multiple layers of security and technical architecture groups to review, having other browsers review proposals: it's inconceivable to me to imagine spending 1/20th as much effort building an alternative of any even modest caliber. They sure tried with Dart, Flutter, Fuschia, but it's just not a significant enough lift, it's just another app dev platform, and it's desire for pixel perfect graphics made it absolutely ass and terrible at being a good reactive malleable platform. And it being Flash 2.0 made it vastly inferior to what users got from the web.

The web is big and dense. Even ignoring the sprawling amazing magical web platform and focusing on the robust DOM. And that pisses a lot of people off. There is much clutching for certainty, wanting to be steered. Devs crave having the validation of Modernism, of solutions that when written fit expected shape and parameters. 'Another fine Cathedral!'; you know it when you see it. But the web doesn't give us that certainty at all. There's many ways to get there, there's overlapping options and tools, dozens of paradigms to pick from for how you want to organize your css rules, different layout models to swizzle together. The dirty rough open possibility of the web Bazaar drives people frelling off the wall.

I can't help but see those people clutching for certainty as hopelessly out of touch with the universe, obsessed with a narrow engineering paradigm of control & missing the organic beauty of life the universe & everything. Wittens here at least has some core points (amid lots of buckshot, much that various tensions are unresolved).

It's fantastic that we have so many different ways to do web apps. The basics have proven so malleable, such endless ability to be interpreted and governed into forms of whatever we might imagine. The layout of the DOM has gotten so so much better, had so many wonderful additions and fixed in the past decade. The Web Platform Tests have put to the sword so much uncertainty, become a massive way for the web to remain one thing even across many browsers. New browsers like Ladybird and Servo show promise of new engines, new life. Web Components will or won't they questions dog us us still, we all consult our team leaves to guess their future, but meanwhile a similar structuring of custom comments is endemic to React. Invoker/commands are spreading id-ref dogma, for the page linking to other parts of the page declaratively. It's all incredibly exciting. I'd be very happy to have anything else that shows life, that can compete as an equally radiant open question we can continue to improve. But that's not what the DOM haters are after. And the narrow vision view: I think it bereft & sad, and the lack of material they have to point to to steer us, to offer spiritual council upwards rather than just condemning downwards, throwing faint "bloat" condemnations: it makes me sad we critics so obviously up to no good, who just standby and have such vacuous aspersions to cast, on endless repeat.

Post reply on HN