Hacker News new | ask | show | jobs
by cm2187 3041 days ago
There is something to be said about html being too basic for developping apps efficiently. There is no menu control, contextual menu control, if you want to handle dragging and dropping UI items or creating an overlay modal window you need to do all sorts of hacks. On a desktop UI framework these are often a single line of code and it’s hard to get it wrong. I don’t think html/css is really comparable to the major native UI frameworks in term of productivity and correctness of apps produced.

I see so many websites trying to implement their own UI behaviors and getting it wrong, not scrolling smoothly, showing a modal window partially off screen in certain scenarios, preventing you from zooming out on a smartphone while overflowing the text outside of the screen, menus that are either not touch or mouse friendly, etc.

Giving UI developpers only html and css is like telling a graphic designer: all you need is microsoft paint, you see you can change the color of each pixel to whatever you want, total freedom! Yeah... No.

2 comments

HTML and CSS are languages. Languages do not have one line components. Frameworks like Ant-Design and material-ui (based on react and/or Vue) have components that are nothing more than single line.
They have components, they have tables, datepickers, buttons, etc.
Have you seen a built in HTML date picker? It's horrible and is exactly the kind of built-in uncustomizeable frameworky misfeature that I don't want in HTML / CSS.

Tables are just unstyled boxes with an alignment rule. Not very high level.

Buttons are provided by the host OS, HTML and CSS have nothing to do with their default style or behaviour, and if you start styling them you basically revert to working from unstyled boxes.

Absolutely, I agree that it sucks. And that's why UI developers are building all sorts of DIY components, too many of which fail. But that's exactly my point.
Being relatively low level is a feature. HTML / CSS / JS are languages, not frameworks. One liner modals are not a feature a language should have.

If you want, you can make a framework on top of it that will behave like a desktop UI framework with standardized elements and behaviours. There are plenty of such frameworks actually. But not having to use such a framework is nice.

Besides, the current browser environment has been historically heavily optimized for websites, not desktop apps. If it became a popular choice for desktop app UI we'd have developed more appropriate features for that use case.

Why do you call html and css a language? To me it’s a UI framework very much like winform, wpf & al.
Because it's a markup language, and a style definition language respectively, so HTML / CSS lack the high level features and components found in desktop UI frameworks such as Cocoa (standard buttons, lists, file explorers, image grids and such). Building a HTML / CSS UI is done from the ground up with basically nothing more than completely unstyled boxes, in contrast to composing higher level components.

On the web the role of desktop UI frameworks is distributed between third party frameworks such as Bootstrap which is great because those are optional.

I haven't worked with the windows frameworks you mention to compare directly to them.