It is really hard to engage with your comment in a constructive way, if you start by insulting everthing on the web, that is not a simple document (with comments).
So I get it, you don't like the web as a plattform for apps. And it surely is not perfect. But do you have a better plattform independent alternative to offer?
My main gripe with using the web stack for building apps is that, unlike proper GUI framework, your platform is not made out of the same kind of code that you're writing. For example, there's a number of predefined layout algorithms that you can choose from and then control some of their parameters, but you can't write your own layout algorithm. You can kinda draw your custom controls, but both <canvas> and SVG are not without their own shortcomings compared to real GUI frameworks. A web browser is a glorified scriptable word processor so it's not surprising that it acts like one.
Yes, there are "paint worklets" and "layout worklets" as proposals. That kinda makes it better but still feels like an ugly workaround. The declarativeness of HTML and CSS, extremely awkward for building app-like UIs with, is also never going anywhere.
Of course you can - in javascript. What is stopping you? (except that you don't like it)
You can also ditch the DOM alltogether and only use the canvas/webgl and maybe your language of choice via emscripten and wasm, if you really cannot stand js/ts.
The web as a plattform is very, very powerful. The app you make, you can ship by simply sending a link. And people can just try it out without installing something and all quite save in a sandbox.
So none of your solutions are better suited than the web stack, if you intend to target the maximum audience with the minimum hazzle. You have to beat that, if you want to overcome the web.
Also, can you give me one example of a nice looking app in swing? Websites are optimized for enabling good UI and UX. Because the moment a user is confused - he is gone very quickly. And people can also customize their experience. I use dark reader and ublock.
HTML and everything around it is often a ugly chaotic mess, but a incredibly powerful one.
If you mean by setting `position: absolute` and then using left/top/right/bottom to position your element, that won't work. You can't plug your code into the browser's layout dispatching mechanism to correctly react to size changes, reflows and all that. You can do that in any native UI framework.
> The app you make, you can ship by simply sending a link.
Depends on what it does. If it needs to store data locally and/or work with files for example, doing that on a website that runs in a browser is a pain in the ass both for the developer and the user. Last time I checked, if you want to generate a file for the user to save, you have to encode it into base64 and "open" it as a data: URI. Isn't that utterly bonkers?
> Also, can you give me one example of a nice looking app in swing?
IntelliJ IDEs.
> Websites are optimized for enabling good UI and UX.
Is that the reason there's so much whitespace everywhere these days? Is that also why all controls are so confusing that you sometimes have to try interacting with them to understand what they do?
> Because the moment a user is confused - he is gone very quickly.
Not everyone's goal is to simply have as many users as possible.