5 ms·
This is part of why it bemuses me to see web developers cling so hard to using HTML/CSS beyond the browser. I'd much sooner tangle with a proper UI SDK designed
by filleduchaos 6y ago
This is part of why it bemuses me to see web developers cling so hard to using HTML/CSS beyond the browser. I'd much sooner tangle with a proper UI SDK designed from the start to support applications than fight with a layout/painting engine that relies on a document model. The sheer inability of CSS to handle dynamic heights should be frustration enough for anyone.
- franga2000 6y agoOne big reason I often go with HTML rather than any kind of actual UI framework, especially for prototypes or ad-hoc interfaces, is that's it makes it so much easier to do dumb things that weren't intended, aren't versitile or accessible, but I don't care. I can put a div in a div, border-radius=50%, position=relative,absolute, add a single event handler and that's a digital joystick. Run a local single-exe websocketify and you can control anything from a CNC router to an army of drones. I dislike Electron* as much as the next guy and steer clear of npm like my life depends on it, but there's no single thing that's more universal and easy to hack on than a simple HTML file.
- filleduchaos 6y ago> I can put a div in a div, border-radius=50%, position=relative,absolute, add a single event handler and that's a digital joystick Are you implying that this is somehow unique to the web or HTML? Because I can assure you that it is not.
- franga2000 6y agoIt's true that it's been a while since I've tried doing horrible things in an actual UI framework, but last time I did it was only very easy in QML, which is (was?) a royal pain in the ass to build for Android.
- deergomoo 6y agoEven layout aside (I'm hoping Houdini will eventually bring some form of constraint-based layout to browsers), HTML is the lamest UI toolkit going. We've got a handful of basic form inputs, incredibly inflexible tables, and some semantic rectangles. That's basically it. Even the form inputs can be a pain. It's insane to me that the only way to change the background colour of a checkbox is to hide it and build your own with CSS hacks (pseudo-elements etc.). I guess the fact that any element needs to function purely from markup without any code severely hampers them, but I can't believe how much time we're all wasting having to build things as basic as pop-out menus by hand.
- danShumway 6y ago> HTML is the lamest UI toolkit going I will die on this hill. HTML is not a UI toolkit or an SDK. It is a user-facing interface. I know it gets presented as a toolkit, I know that on some level it overlaps with a toolkit/layout language. But the most important thing HTML does is it provides a plain-text user-facing interface for an app. Complaints like this are kind of like arguing that the terminal is a bad layout tool. I guess? But many of the things that would make the terminal into a better layout tool would get in the way of forcing developers to provide a pure-text interface for their apps. In the same way, many of the features people want to pull into HTML (data-bindings for tables, content reflow between arbitrary elements, arguably a lot of the custom element/template work that Google is doing) are kind of counterproductive once you start looking at HTML as an interface instead of as a programming tool.
- deergomoo 6y agoThis is exactly my point though. It’s not a UI toolkit, but if you want to write applications for the web you have to awkwardly shoehorn it into one. There is no alternative. It’s not fit for the purpose of building applications. I strongly support the idea of an alternative.
- danShumway 6y ago> but if you want to write applications for the web you have to awkwardly shoehorn it into one. No, you have to treat it like a render target. You can write your applications with another UI toolkit, you just have to be able to render to DOM. To go back to the terminal analogy, the terminal is the end-user interface. It's not a framework or a toolkit. What you're complaining about isn't that the terminal is a bad UI toolkit, you're just complaining about supporting the terminal in general. > I strongly support the idea of an alternative. The only way that alternative would be easier to work with is if it didn't force you to render your visual state to a pure-text XML-based UI. But getting rid of that requirement would be bad for the end user. It's annoying on purpose, because the default render target for not just your documents, but also your applications, should mostly be a pure-text XML-based tree representing your current state. It's a user feature, not a developer feature. I mean, I can think of a lot of ways to make web programming easier if we don't care about the format of the end-user UI. It would simplify things dramatically if we didn't need to care about stuff like responsive design or resizable text. But the beauty of HTML is that by default, the easiest way to build a web application just happens to be the way that supports screenreaders, adblockers, scraping, graceful degradation, responsive layouts, etc... HTML encourages even junior developers to fall into a pit of success by forcing them to think about the accessible text interface first, before they're allowed to think about what the pixels on the screen will look like.