by TuringTest · 2y ago · 0 comments
The web browser gives you a full package with standardized commands to control all those aspects, which is also portable between different implementations.
If your rendering needs are limited to a few buttons and a canvas on a fixed size, sure, go native GUI. But if you need to support multiple devices and resolutions, on-the-fly resizing, and layout of multiple complex screen sections, the browser is an unbeatable platform.
Even Java UIs supported dynamic layouts 20 years ago.
C# had a flex box based layout (called flow layout) since 2006.
At this point in time I'd been writing react for 2 years non stop and I hadn't used winforms for at least 5 years.
I started up visual studio, and used the GUI builder to make a fully featured data bound winforms app connected to my backend in less than a day.
2 months later I had the react version up and running.
Was the react version shinier?
Yes.
But the web development experience is literally orders of magnitude worse.
Svelte ain't perfect and it requires more scaffolding initially but you get: - actually good data bindings and state management (in many places you would need event handlers for winforms) - hot reload (very big win) - the ability to do greater layout changes with a few css lines (in combination with hot reload quite pleasant to style) - mass styling without selecting every component every time you want to change something - native async/await integration in the ui framework
plus the rest of the benefits (not DX oriented) - gpu rendered instead of cpu rendered - runs on any OS (including phones) - advanced responsiveness via CSS
(sorry for the poor text layout, didn't yet find a way to insert line breaks without them being removed)
Native apps have had to deal with dynamic sizes and layouts since the idea of resizing windows to arbitrary sizes became a thing. So, since 1980s?
> on-the-fly resizing
Which web tech famously cannot do with any efficiency
> and layout of multiple complex screen sections
What complex screen sections? This is a complex screen section: https://x.com/dmitriid/status/1424052288205856773
The web does not (and cannot) have "complex screen sections". It doesn't have the capacity for it.