8 ms·
Is anyone else sad that we have adopted HTML/CSS as the universal lingua franca for describing views? I understand why (or at least I believe I do): HTML/CSS i
by rkangel 6y ago
Is anyone else sad that we have adopted HTML/CSS as the universal lingua franca for describing views?
I understand why (or at least I believe I do): HTML/CSS is an inevitable part of the ecosystem because the web is an important target. A lot of devs will know at least some, and your organisation may already have loads of them because you also need to target the web. Maybe you even already have some view code written for the web platform that you want to re-use. This means that HTML/CSS gives you a head-start due to existing skillsets. It's familiar for some people and they can get going.
The problem is that it's bad. I say this as someone who comes from the outside, and isn't an expert ("barely competent" in HTML/CSS is probably accurate). Basic layout of things in a way that copes with different screen sizes/orientations is a surprisingly black art sometimes. There's a lot of history confusing the issue and three ways of doing each thing.
Coming at it fresh, it's a lot to learn to build a desktop/mobile UI. Flutter (for example) has its issues, but getting things to lay out correctly did not take a lot of learning. Once you've got the basics (3 days to a week for me, including learning Dart) things behaved predictably - it seems to take a lot of HTML/CSS knowledge before that is the case.
- mikece 6y agoJust like JavaScript: it's bad but it is the only thing that works everywhere so it's won.
- pjmlp 6y agoJust like C: it's bad but it is the only thing that works everywhere so it's won.
- warent 6y agoThanks for pointing this out. I've made a respectable living off web technologies, and the products I've built create value for many people. Maybe it's not the sharpest knife in the kitchen and I'm not Gordon Ramsay, but the final consumer product is still pretty close to being regarded as Michelin Star quality, not as a boast but just a point of fact. Giving an flip "XYZ technology bad!" remark usually comes across as a meme or as uninformed and snobbish. The fact is these "bad" technologies do a whole lot of good.
- pjmlp 6y agoActually I see them as weight that prevents the industry to move forward.
- agumonkey 6y agoIsn't C a sweet spot of portability and minimalism ? no matter the defects .. the previous qualities seemed to matter more. I mean there were attempts at replacing C but nothing came close to remove it right ?
- pjmlp 6y agoC only got there, because UNIX just like the Browser did to JavaScript, has placed it everywhere. This happened only because Bell Labs/AT&T were forbidden to sell UNIX, hence its source code spread across the industry, with a symbolic price that made it by comparison with other OS vendors feel almost as quite cheap beer. During the 80's and early 90's, C only mattered in universities and companies that had access to some kind of UNIX flavour. Everywhere else we had Assembly, Modula-2, Pascal and Basic flavours, BLISS and some PL/I variants like PL/M on CP/M. So when you happen to have UNIX, and a C compiler around, trying to bring people to use something else, it is the same as trying to replace JavaScript on the browser. So we come up with our CoffeScript and Typescript likes for systems programming, but C (even in C++, Objective-C) is always there.
- agumonkey 6y agoWe're all well aware of the unix/c coupling. What I'm saying is that for low level memory mangling and primitive operations over the set of register based machines.. you don't get any benefits from using another language it seems. I.. just a dude but some people doing HPC said that you can even reach FORTRAN speed on numerics if you fiddle with the right keywords to avoid aliasing. Again I'm not a C fan.. but what would pascal or basic give you that is a critical factor in making a better system with it ? modula I can't say. Asm is too coupled to the underlying cpu it's out of the window already.
- pjmlp 6y agoSafer with less memory corruption exploits to start with. Fixing C is so beyond hope that Apple, Oracle, Google, Microsoft, ARM are all driving hardware based solutions for memory tagging and pointer validation, while at the same time reducing the use cases for it across their OS stacks.
- speedgoose 6y agoModern JavaScript is pretty good.
- mikece 6y agoAnd that's something a lot of JS haters have overlooked. I have purposely ignored it for the past few years and am just now getting back into it for doing CLI and back-end Node work... I find myself amazed at what's been added and improved since I was writing jQuery and AngularJS a few years back. I still have no interest in getting back into DOM work if I can avoid it but Node is kinda nice!
- franklampard 6y agoDon’t even tell them. The modern JavaScript/TypeScript is so amazing and probably the best language I have used. I have extensive programming experience in other languages like Java, Scala, Python, Ruby, C, Lisp. But JavaScript definitely wins.
- agumonkey 6y agoi'm not a js hater but i'd be curious to hear what you think is so great about ts
- dirtnugget 6y agoIt is pretty damn powerful and quite elegant. What do you find bad about it?
- agumonkey 6y agoNot a lot is bad in the language since es6 (I don't know if they kept hoisting or not) but in any case I don't find any reason to put it that high above the rest :) but I was curious about your reasons mostly.
- eingaeKaiy8ujie 6y agoIt's not the only thing that works everywhere anymore, other languages can be compiled to JS and WebAssembly.
- cphoover 6y ago> The problem is that it's bad. I say this as someone who comes from the outside, and isn't an expert ("barely competent" in HTML/CSS is probably accurate). Basic layout of things in a way that copes with different screen sizes/orientations is a surprisingly black art sometimes. There's a lot of history confusing the issue and three ways of doing each thing. How can you say this with a "barely competent" level of expertise? I would rather hear a well reasoned argument from someone who knows the ecosystem and its trade-offs.
- rkangel 6y ago> How can you say this with a "barely competent" level of expertise? I get that, and that's why I declared it. I have two reasons why I think the opinion is still valid: I'm not completely incompetent. I have produced useful web frontend work. After having spent more time on web technologies than a lot of others I still find it to be slower and harder. This point is about learning - I have done some learning in both and I can compare. It's a small sample size, but seems to agree with the experience of other people. The other point is that most people talking about this are already experts in HTML/CSS. That learning is a sunk cost for them so they're not making fair comparisons. I also sometimes feel like there's a little 'Stockholm syndrome' - they've invested time and effort in learning the techniques and tools required to produce good quality web UI, and now that they can they overlook the effort required to get to that point and proclaim the wonderful nature of what they're using. The sunk cost thing is the important aspect. I'm not even saying that it's wrong that it's become the standard UI description language - it as at least an open specified standard. I'm just saying that not enough attention is paid to the downsides.
- franklampard 6y agoI have a hard time understanding why the cost of learning web dev (CSS/html) is a sunk cost. It’s reaping so much benefit that these experts can easily make mobile apps without learning another way to describe UI.
- asiachick 6y ago
- nolok 6y agoI just don't understand what happened to classical RAD from the late 90s early 00s. OK web was out of touch because no one really uses the "standard gui" anymore, even something as simple as a button has different look and behavior on every website. But mobile app should be prime targets for it, and theming is a well understood concept for it too. So why do we not have a proper rad tool (drag and drop my button where I want it, see the list of events, double clic onclic to edit code to run on clic event, customize onrender if I want some magic look or draw on a canvas,...). It has got to be better than this html/js horror show.
- cultofmetatron 6y agoDelphi is still around and they do let you drag and drop a mobile layout and target ios and android. I don't know anyone using it though.
- pjmlp 6y agoDelphi scene is still quite active in Germany, enough to keep getting articles on the Windows and .NET developer related magazines, and a yearly conference. Delphi suffers from the mismanagement from all its owners, and given its target market, you will usually see it being used across corporations that don't think twice about paying for SAP and Oracle licenses.
- cultofmetatron 6y agoits a real shame too because the pascal langauge is quite nice and would hold its own against zig or c++. I would even learn the free version and potentially invest in the paid version if it ran on osx or linux. Anything thats windows only is a hard no for me.
- pjmlp 6y agoYou can still help improve and contribute to FreePascal and Lazarus on that case.
- 6y ago
- eingaeKaiy8ujie 6y agoYes, we need GUI abstractions that compile to HTML/CSS and native platforms, not doing it the other way around.
- c-smile 6y agoJust in case: Sciter (https://sciter.com https://sciter.com) and Sciter.JS (https://github.com/c-smile/sciter-js-sdk https://github.com/c-smile/sciter-js-sdk) allow to build native UI applications with HTML/CSS extended by native languages (C, C++, Rust, Go, etc.)
- j45 6y agoUse what works for you. Why does it have to be the same way for everyone?
- jdjfktkrnj 6y agoI've used pretty much all GUI frameworks - raw Win32, MFC, WinForms, wxWindows, Qt, WPF, native Android and iPhone. HTML/CSS is vastly more powerful and productive, especially when using something like React/Vue. It's not because "web devs who don't know anything else". HTML/CSS is just a superior technology. No wonder that even traditional GUIs are moving this direction - Qt with QML, windows with their new Win10 flat design API (forgot its name) > Basic layout of things in a way that copes with different screen sizes/orientations is a surprisingly black art sometimes. It's still easier to solve these problems than in a traditional GUI, which if you noticed tend to have a mostly fixed layout, exactly because dynamic layout is so difficult to get right in them.
- mmcnl 6y agoProbably an unpopular opinion but I wholeheartedly agree. I think HTML/CSS is excellent.
- jarek83 6y agoHave the same feelings about HTML/CSS and even similar towards JS. I believe that if one gets a grasp of it, then CSS is extremely easy now, compared to like 5-6 years ago, where on top of CSS itself, you had to be good with all the quirks for IE and other browsers. If today someone tells that CSS is hard, I honestly get stunned. I wonder if the idea of "everyone can code" might be root cause of current state. I mean - if after some time you cannot get intermediate CSS skills, then I'd say that web programming (and maybe any other) is not for you. It was with the boom of Tailwind CSS when I started to see a lot of comments like "OMG this framework is great - CSS was always hard for me, now I can do much more".
- virgil_disgr4ce 6y agoSo glad to hear this sentiment. It's frustrating that so many people don't seem to acknowledge how flexible HTML/Javascript is. It's not perfect, it's probably not the most efficient possible set of APIs, but it has to deal with a whole lot of legacy, just like most programming languages/platforms/frameworks. Much of this conversation seems to consist of "the popular solution to this insanely complex problem is hard! Why isn't it trivially easy!?"
- Escapado 6y agoAs someone who is currently making a living as a frontend dev I feel you - however for anything more visually advanced and everything less standard (and I understand that it is debatable whether that should be done in the first place) it's often quite difficult to achieve a certain visual effect in all the other gui toolkits I have tried (QT, PyGtk). Often image-blending modes, configurable shadows, animations (especially on those properties) and dynamical effects either are not available at all or not as simple to set up as I am used to. Nevertheless I'd like to be educated which framework would be a good fit for building your typical animation rich dribbble/behance design with glassmorphism shadow magic and whatnot without writing custom shaders. Maybe Flutter?
- c-smile 6y ago> HTML/CSS is an inevitable part of the ecosystem because the web is an important target. You did confuse cause with effect. In the first place Web accepted HTML/CSS/JS for the good reason - as a classic implementation of "Separation of Concerns" principle. See: 1. HTML defines semantic structure of UI - DOM tree. 2. JS, as language-behind-the-UI, handles users events and updates DOM tree and its state. 3. CSS defines how that DOM tree is presented to the user in its current state. These three tasks are so distinct that require their own languages that are optimal for the task. That split has a lot of sense. For example, HTML and abstract DOM tree alone enables accessible access (a.k.a. Section 508). And so on. There were, are and will be all-in-one approaches to UI, like Flutter or WPF for example. They will never be universal UI solutions for reasons outlined above, especially on desktop UI.
- kall 6y agoI think they adopted them for good reason and they are good at what they are made for: web pages. It shines in situations where content, behaviour and presentation are seperate concerns. A good example is a CMS/wordpress (which as we know makes up a third of the internet or something): Editors are concerned with content, themes are concerned with presentation, plugins are concerned with behaviour. Applications, especially desktop applications, are nothing like that. Seperations of concerns gains you very little there. If it does, its a different separation like M-V-C. I think all the successful user interface things introduced in the last few years are going for an all in one code approach for good reason: SwiftUI, Flutter, Jetpack Compose, React Native... I may be a little mobile focused? The options that ios/mac os/android offered for a while to create UI structure seperate from code where not very popular with developers which often preferred to construct and modify the entire UI tree with code "manually". What‘s the state of the art in windows and linux UI programming?
- c-smile 6y ago> Applications, especially desktop applications, are nothing like that. Seperations of concerns gains you very little there. I think you are making critical mistake here. IAccessible & Co. (https://docs.microsoft.com/en-us/windows/win32/api/oleacc/nn-oleacc-iaccessible https://docs.microsoft.com/en-us/windows/win32/api/oleacc/nn...) maps nearly directly onto HTML DOM tree. So no matter what CSS you have there your UI will accessible. The thing is that accessibility works acceptable only on semantic DOM trees. HTML and its DOM was designed with that in mind. Flutter's DOM is not, it is not semantic - it is a Dart code that defines visual structure for particular screen layout. Mobile applications are significantly less demanding (more simple in UI terms) - they have very reduced set of components and layouts. Essentially all mobile UIs are built with <radio>,<checkbox>,<button> and <list> vocabulary. The reason is simple: most of the time mobile apps are serving "reading user" role. While desktop is the place for "writing user"s (a.k.a "content generation" role). Desktop is the place where you must support different editing, object manipulation paradigms - UI on desktop is more rich. Just check apps on your mobile - 90% of them are very close UI-wise.
- u678u 6y agoIts probably because the best guis are written by JS devs, so the end stack becomes the way they're used to seeing it.
- kgin 6y agoIf you throw out everything except plain containers (DIVs) and standardized flexbox (like Yoga). It's great. It's 5000% better than iOS AutoLayout.
- threatofrain 6y agoI’m sad at CSS but not HTML. If you look at other front end approaches by other communities they will have something similar to reusable components which can be nested as a DAG with some technique to pass state around, but which community is inspired by CSS?
- whytaka 6y ago> Basic layout of things in a way that copes with different screen sizes/orientations is a surprisingly black art sometimes. I've been manually crafting HTML/CSS websites since 2001. Since the arrival CSS flexbox/grid, I don't know anything easier to build layouts than HTML/CSS. I like what Fluter offers but HTML/CSS is far cleaner/easier to read and simpler.