HACKER Q&A
📣 tabtab

Why has a GUI markup standard never taken off?


Why is there no established GUI markup standard? If we had a standard "GUI browser", we could get desktop-like apps without having to bleep around with inconsistent JavaScript/CSS/DOM, etc., and without local installs. For "productivity" apps, users prefer GUI's, not web interfaces. You can fit more and do more on fewer screens.

The web/mobile focus distracted everyone, and the result is that the industry is missing a key standard. Amazon, IBM, Google, etc. could take away Microsoft's desktop advantage if they nurtured such. MS controls a big pie; come take some.


  👤 h2odragon Accepted Answer ✓
Because its a broad enough space, on the programmer and user sides, that there's not going to be One True Standard that works well enough for everybody.

Not everyone thinks the same way, and UI is close enough to "how the user thinks" that you've got to cater to the differences. Some people and situations need UI concepts that don't belong in the toolkit (dump ram to framebuffer for debugging by color); other users should have controls that have minimal effects and those controls wrapped in foam so they don't hurt themselves any more than necessary.

That breadth of "UI" is barely covered by the boiling chaos of interface ideas we're still watching evolve.


👤 PaulHoule
If you look at HTML 5, CSS, et al. and it is definitely becoming a GUI markup standard. That is, flexbox and grid layouts, progress bars, etc.

Note that people write advanced "Productivity" apps with web tech, such as Visual Studio Code. You can make web apps that look entirely like GUI apps.

Any other standard for GUIs would encounter the same problems. For instance it's clear that the font metrics are all messed up when you look at a plain install of a typical Linux distro. That means no way you can count on making an app where the text doesn't blow out of the bounds of where you're trying to fit it.


👤 maxharris
I'm working on a project to provide exactly this! It's a layout engine that takes a tree of components, emits boxes. Currently it's written in JavaScript and renders to canvas, but it also runs on node + node canvas, so you can do things like generating PDFs and other images server-side.

https://github.com/maxharris9/layout/tree/master/test/compon... https://github.com/maxharris9/jsx-layout

My friend is working on a native client that will run programs written for layout without a browser.

If you're interested in this, I'm open to DMs on twitter (@maxharris9)


👤 photawe
Probably because there's no commercial interest in such a thing. Now, when you say "MS controls a big pie", I can tell you there are a lot of people really not satisfied with how MS handles things (myself included).

Hopefully, they (MS) will manage to keep their WinUI promise, and make it quite easy to develop (Windows) desktop apps.

As for platform-independence, there are a few attempts, but with just (a few) volunteers, it's hard to tackle such an insanely complicated issue.


👤 unlinked_dll
I just think markup is a bad way to write UIs, or anything but documents imo/e. For anything above a toy you'll need to generate markup programatically, and congrats, you've invented the web browser.