Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The point is that you didn't need DOM. You had a canvas to draw things on and to handle clicks in. Now you need the DOM either way and it's cumbersome. It feels like trying to build a UI in a word processor. Text nodes are such a terrible idea...


Having a hypermedia standard is universes more interesting & powerful & enriching than what boils dowm to a way to generate gifs. Computers have dozens of ways to throw pixels at peoplecs faces and none of them are remarkable or particularly noteable.

Having a DOM, having structure, having a hypermedium is a source of immense potential & power. For both developer, but also, capitally & uniquely, for users too.

This longer top-commemt talks some to why documents, why hypermedia is enriching: https://news.ycombinator.com/item?id=31373988


>Having a DOM, having structure, having a hypermedium is a source of immense potential & power.

For documents, yes. For apps those are obstacles. Apps just need something to draw on.


Your statement doesnt resemble any gui toolkits Im familiar with. Not Flutter, not Swift, not Gnome, nothing. The DOM closely resembles other ui construction systems & has similar ideas lile event handling.

And then the pretense that developers are the only thing that matter. The web is vastly better than apps because of the dom, because our systems are in a malleable hypermedia that ysers can modify eith userscripts, userstyles, extensions, eith whatever manner of accessible browser/user agent they please.

It's such sad thing to hear people advocating so strongly for the winnowing od possibility. Leaving all responsibility & all power with the app developer sounds perverse to me, sick, unworthy of being called a part of the internet. Not only does "just need something to draw on" not reflect the needs of developers, it represents an mortal threat to user agency.


The very big difference between the web and a proper GUI toolkit is that in GUI toolkits, inline elements aren't a thing, period. Text nodes also aren't a thing and don't mess up your layout when you least expect it (argh). You need to explicitly create a "text view" or label of some sort to display text. GUI toolkits also usually offer layout algorithms that make sense for GUIs. Oh and did I mention that they have sane defaults like not insisting on using the intrinsic sizes of things unless you explicitly tell them to?

Another property GUI toolkits have that the web lacks is that the GUI toolkit is usually made of the exact same kind of code you're writing your app in. There's a much tighter integration between the app and the toolkit. The app can extend it much more sensibly by, for example, implementing custom layout algorithms. With the web, there's this issue of the browser implementing all the layout and drawing and doing all the work and you can only provide input parameters to these hard-wired algorithms — you can't build your own.

Yes, I'm aware of those layout and paint worklets being worked on. Yes, they solve some of these problems and thankfully move the web platform closer to feature-completeness. It's still a mess though.


There's a lot here I think doesnt have much merit i fact, is bias & predisposition, a false belief that only simpler/dumber/less is permissable. I disagree & see no basis in fact, no evidence for any of these claims to importance & difference, but I also think nearly no one can claim authority, has any real idea. I dont believe this expansive platform is to the detriment, but Im also capable of allowing for differing views, wrong though I think they be. Neither side has much to say for itself. The first claim being that inline rendering capabilities are actively harmful, that the web's capability is a point for the opposing side starts me off with extreme doubt, but in spite of my extreme doubt it's in an unresolved state. We need more & wider possobilities to assess; I dont see that recognition that we need to know more to decide in the web-detractors allowed-fors.

Where I really want to pull the emergency break & call for reassesment is when I hear promotion of turning usercs experineces into mere pixel pushing videos. I still cant begin to express enough what a colossal & masive civilizational downgrade it would be to reduce the web to moving pcitures, animated pixels, which again seems like ongoing chorus of this post. Layout can preserve textual information, but the idea that we just need to let devs paint whatever and fuck hypermedia, fuck structured information, fuck text: it's ballistic out of this world demonic. Truly fallen a proposition. There's so many people eho recognize for example Flutter & it's infernal CanvasKit as the enemy, as a thing no one else can read or understand but which the app can unmediatedly foist upon us. Instead of a shared medium where both sides have respect & powers, there's this ongoing deeply authoriarian undercurrent ehich has infected the world, thay says only the app's concermd matter. That hypermediums are irrelevant- 0% of importance is information & shared mediums, 100% of importance is the top down imposed experience. Users get no say, browsers get no say. To me, to many, this is as dark & bleak & sad a world as could be imagined, forsaking every gain & advance at interconnecting the world for a ludicrously totalitarian view of what software is for.


You still have the canvas, and it's perfectly easy to draw on that and handle events in JavaScript. There are a number of applications that work that way.

That said I disagree with the idea that using the DOM is bad - I suspect it's cumbersome to you mainly because you're not used to it. The number one benefit of the DOM is that user-facing controls are largely consistent. If I want the user to type text into a text box, I can just use a browser-defined element, and the user will be able to interact with that exactly as they expect. I don't need to reimplement the whole text input and display process, because it already exists in the platform. The same goes for all sorts of controls and interactions, from zooming to select boxes.

Moreover, assuming this DOM is built up in a way where the semantics are embedded in the elements themselves, then it can also be used in different ways. One user might use their browser to render the DOM into something that can see on their screen, while another might use their browser to read the element contents aloud. One person might use their mouse to interact with the system while another might use their keyboard. Accessibility is built into every application built using the DOM - it may not be ideally presented in some situations, and it's still possible to get things wrong, but by default a blind user will at least have a chance of using the system. In contrast, a canvas-based application will need to reimplement accessibility from the ground up (usually in the form of a secondary hidden DOM tree).


Exactly. When I first did a web front end it felt exactly like customising MS Word with VBA. No matter what you put on top of it the roots poke their heads through and it feels like a mess.


Yes, yes. Flash (with AS3) was a first-class web application platform. There were buttons and views and "movie clips" and other stuff for you to place on a blank canvas, all very customizable. Then there was Flex, a full-fledged yet relatively lightweight application framework built on that foundation. You created your layouts with XML, with live preview. There were Android-like layout containers (emulating Android's LinearLayout with HTML+CSS is still not quite trivial in 2022 — the defaults on flexbox are bonkers) and there were ListView/(UI|NS)CollectionView-style lists with reusable cells, among other things. This was 15 years ago! I can't even begin to imagine how many workarounds one would need to implement a list with reusable cells with HTML+JS even if targeting only the latest Chrome and Firefox.

HTML is a document format at its heart and there's no getting around that, but <object> is/was a nice escape hatch.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: