Live data from Hacker News

Rethinking DOM from first principles

acko.net

21–30 of 234 posts

Re: Rethinking DOM from first principles

#21
post #12

Earlier quoted context omitted.

That's because you're looking at it from the perspective of what the developers of those news websites want, rather than what the users of those news websites want. The users want to get a document , not an app. That's what the web was made for, documents.

The users want to read an article, I'm not sure the average user really cares if it's delivered as a document or an app

As a user I want to be able to save the page and read it later.

Admittedly even with .war format and other attempts, this was possible only for a brief time. Now we have a crop of readability converters because even print to pdf is useless most of the time.

Re: Rethinking DOM from first principles

#22

It is clear that we need both apps and documents in web browsers. Yes yes "web", "hateoas" and all that, but it didn't materalise in practice and is therefore irrelevant. So maybe we can have , which lets you use a new set of APIs focussed on applications, but is otherwise in the same "shape". JSX type syntax. This way it's easy for say newspapers to offer both an app format as well as a "lite" document format. Inste…

or maybe just stop trying to force the round peg in a square hole. an application is surely not a document. they open documents. its conceptual, but it would make your life so much easier if you stopped trying to make a fully fledged platform out of what was essentially a rich text document viewer. java has since come along and given you pretty much write once, run anywhere and close to instant deployment with its applets

Re: Rethinking DOM from first principles

#23
post #7

What needs to happen is that HTML needs to go back to being a mark-up language, and the web needs to stop trying to deliver an application-level implementation for every single website. And we need to stop relying on JS so much.

This view is completely backwards and I'm baffled by its popularity. Given that even newspaper websites are now built as applications, we should accept that the web is an application platform (with one of those applications being displaying articles) and rework HTML as an application display language. And we need to start relying on JS more. (Specifically, we should reimplement most traditional HTML elements and CSS…

at that point just learn a programming language man. the inception like dreams within dreams within virtual machines running other virtual machines will never stop because CPU power will always increase

Re: Rethinking DOM from first principles

#24
post #19

Earlier quoted context omitted.

I get this viewpoint from a software architecture level, but that is also effectively the death of the open web. When every website is an opaque app, even often requiring a client-side optimizing compiler that builds an arbitrary binary in order to load (WASM), we can say goodbye to things like search engines and typically also hyperlinks. The rise of social media has already balkanized the web a lot, where almost al…

Search engines already run JavaScript to understand the pages they're indexing. Android apps manage to deep-link into each other effectively despite being applications. Designing tools and standards that work well with what we have is far better than trying to hold back the tide.

hes saying you could freely link and iframe other sites, now you cant. the literal "open" web.

Re: Rethinking DOM from first principles

#26

Good article. It kind of makes me question how long we can go down this path though. Like surely we can't keep adding to css and the dom api's for 20 more years? How much bloat will we accumulate before we start over? I hate to say it, but perhaps the browser needs a completely new standard designed for shipping applications? Something akin to what's discussed in the article - a simple but robust layout system built…

I smell second system syndrome.

Not only that, a new system will get completely coopted by the likes of Google for their own purposes. The result of what is built is in large parts a function of the culture that builds it. And I for one have zero interest in the current tech culture building a DOM 2.

Yes, I am generally weary of rewrites.

Re: Rethinking DOM from first principles

#27

What needs to happen is that HTML needs to go back to being a mark-up language, and the web needs to stop trying to deliver an application-level implementation for every single website. And we need to stop relying on JS so much.

I agree. I remember the older days (2005-8) when we would dump a load of HTML from the server-side and kept javascript (for the most part) managing the layout and, not to mention, coding the painful differences between browsers.. even IE6 to IE7. As Javascript (likely thanks to jQuery for starters) got better with AJAX and supporting different browsers with less code, it seems Javascript transitioned to be a owner of…

> coding the painful differences between browsers.. even IE6 to IE7.

This is what I always bring up to web devs who think theyve captured the "write once, run anywhere" dragon

Re: Rethinking DOM from first principles

#28
I feel there's space for brainstorming and creating new ways of making web apps without having to take a stand against the status quo. It's a fun thought exercise, naming all the things you think are wrong with the web, but I had to scroll real far to see that this is a post about Use.GPU: "Use.GPU is a set of declarative, reactive WebGPU legos. Compose live graphs, layouts, meshes and shaders, on the fly." So felt like a missed opportunity to me to highlight that more instead of going through the list of annoyances.

Re: Rethinking DOM from first principles

#29
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 vision and developers were expected to be committed to conforming to the latest API (think Apple’s iOS runtime or the like), we could maybe expect the and tags, we could demand there to be The One Correct Way of doing anything, that the “fat” is trimmed quickly and features go from deprecated to gone in a year. However, it is a product designed by committee (in fact, by multitudes of various committees) that has largely maintained backwards compatibility for decades, it is a free runtime that grew organically from what was supposed to be a basic hyperlinked document layout engine but now powers fully dynamic applications rivaling their native equivalents yet still has a pretty low barrier to entry for new developers, and as such it’s remarkably robust.

Yes, some applications tend to have a large amount of markup for what seems like simple features (the Slack’s input box example). However, the alternative is that browser vendors bake it all in, and then every app is stuck with the opinionated way they think is right. Perhaps some amount of chaos is healthy.

Re: Rethinking DOM from first principles

#30
post #18
post #12

Earlier quoted context omitted.

The users want to read an article, I'm not sure the average user really cares if it's delivered as a document or an app

Users do want to find the article via a search engine, and the search engine does prefer the article to be a document, rather than an app.

he make a de good point
Post reply on HN