Live data from Hacker News

Rethinking DOM from first principles

acko.net

81–90 of 234 posts

Re: Rethinking DOM from first principles

#81

Earlier quoted context omitted.

Web as a deployment platform has too many advantages for it to be ignored for distributing _anything_. We don't have to force a round peg into the square hole . Let's make a new round hole but keep using the amazing deployment platform.

itds be easier to just make an amazing deployment platform and code native, than the inverse. edit: if you can program

If it was, it would reflect in reality. But the web wins the "where shall we deploy this" fight every single time. For good reason. You mentioned java, People preferred literally electron over java.

Re: Rethinking DOM from first principles

#82
post #75
post #59

Earlier quoted context omitted.

As for the vertical centering, trying this 20 years ago, it was a pain in the ass. These and layouting in general got massively simplified in the past 20 years. Remember that back then, everything was cramped into tables? I do. So if someone tells me, "DOM, HTML and CSS is becoming more and more difficult" just tells me to ignore their amateurish and unfounded opinion... Hah!

20 years ago it was much easier, you could ethically use tables for layouts which semantically did not make much sense, but in terms of code structure it was very simple: this table is the full size of the page, this cell is the header with this height, this cell is the sidebar with this width, this cell occupies the rest of the space with content positioned in the middle, all expressible without any styling at all.

You can still do this if you want, table element still exists and works the same way.

Re: Rethinking DOM from first principles

#83
post #75

Earlier quoted context omitted.

20 years ago it was much easier, you could ethically use tables for layouts which semantically did not make much sense, but in terms of code structure it was very simple: this table is the full size of the page, this cell is the header with this height, this cell is the sidebar with this width, this cell occupies the rest of the space with content positioned in the middle, all expressible without any styling at all.

This sounds crazy to me, the flex system is exactly this but also semantically correct. You can’t possibly be telling me that table hacks of yore are easier than this, a clearly designed system for the actual problem you want to solve https://css-tricks.com/wp-content/uploads/2022/02/css-flexbo... I’m not at all a frontend person, I just think flex is one of the best systems I have ever used. It usually gets the job…

Flex is great but tables are also a natural solution for anything grid-based, which of course layouts almost always are. The whole internet used to do stuff like this before the structural flow of content became important:

    
      
          header  
      
      
          sidebar  
          content  
      
    

Re: Rethinking DOM from first principles

#84
post #82
post #75

Earlier quoted context omitted.

20 years ago it was much easier, you could ethically use tables for layouts which semantically did not make much sense, but in terms of code structure it was very simple: this table is the full size of the page, this cell is the header with this height, this cell is the sidebar with this width, this cell occupies the rest of the space with content positioned in the middle, all expressible without any styling at all.

You can still do this if you want, table element still exists and works the same way.

Well yeah but no self-respecting developer has done this for 15 - 20 years... it's kind of a red flag these days!

Re: Rethinking DOM from first principles

#85
All those words, and yet not once did he even mention the entire reason everything is the way it is: to preserve backwards compatibility.

It's like writing an entire diatribe about how it sucks that people can insult you online, and how that should change ... and not even mentioning the benefits of freedom of speech.

Re: Rethinking DOM from first principles

#86
post #83

Earlier quoted context omitted.

This sounds crazy to me, the flex system is exactly this but also semantically correct. You can’t possibly be telling me that table hacks of yore are easier than this, a clearly designed system for the actual problem you want to solve https://css-tricks.com/wp-content/uploads/2022/02/css-flexbo... I’m not at all a frontend person, I just think flex is one of the best systems I have ever used. It usually gets the job…

Flex is great but tables are also a natural solution for anything grid-based, which of course layouts almost always are. The whole internet used to do stuff like this before the structural flow of content became important: header sidebar content

[deleted]

Re: Rethinking DOM from first principles

#87
post #45
post #42

Earlier quoted context omitted.

> I struggle to imagine how it could realistically be not complex. Pretty easy, we should have had 2 standards, one being "Web for applications", built on a VM, stdlib, bytecode, RPC, UI framework and standard library of controls, ... And "Web for web pages" which was a solved problem pre-HTML5 days. Java and Flash (although very problematic from a security point of view) were probably better bases on which to build…

Nobody would be using webpages version and everybody would be using app version.

I would love to use the web pages version, both as a user and on websites.

Re: Rethinking DOM from first principles

#88

All those words, and yet not once did he even mention the entire reason everything is the way it is: to preserve backwards compatibility. It's like writing an entire diatribe about how it sucks that people can insult you online, and how that should change ... and not even mentioning the benefits of freedom of speech.

[reads the HTML Standard] this is hate speech, essentially

Re: Rethinking DOM from first principles

#89

All those words, and yet not once did he even mention the entire reason everything is the way it is: to preserve backwards compatibility. It's like writing an entire diatribe about how it sucks that people can insult you online, and how that should change ... and not even mentioning the benefits of freedom of speech.

> It's like writing an entire diatribe about how it sucks that people can insult you online, and how that should change ... and not even mentioning the benefits of freedom of speech.

They'll make you a minister in the UK for that.

Re: Rethinking DOM from first principles

#90
post #42

People 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…

> I struggle to imagine how it could realistically be not complex. Pretty easy, we should have had 2 standards, one being "Web for applications", built on a VM, stdlib, bytecode, RPC, UI framework and standard library of controls, ... And "Web for web pages" which was a solved problem pre-HTML5 days. Java and Flash (although very problematic from a security point of view) were probably better bases on which to build…

We had multiple implementations of Java, but if still failed for that reason. Even if the concerns had been completely addressed MS did not only want to stop Oracle taking control, it wanted to establish control itself.

Was Java any worse from a security point of view than what we have now?

Post reply on HN