5 ms·
Unpopular opinion: native GUI app development on most platforms is a shitshow. Huge toolkits, copious amounts of boilerplate, and a huge amount of dev effort th
by indymike 5y ago
Unpopular opinion: native GUI app development on most platforms is a shitshow. Huge toolkits, copious amounts of boilerplate, and a huge amount of dev effort thrown at the platform just to get it working.
Meanwhile, say what you will about the web ecosystem, I've given interns/jr devs tickets like: see if you can get this webapp running in electron, and maybe figure out how to do push notifications and save data locally. Two days later the project is done. A week later, the app is ready to install.
I think the real reason I quit doing meaningful amount of native GUI development a decade ago was velocity. The developer experience with iOS is probably about the best of the major GUI platforms, but even that is rife with tarpits of tribal knowledge and gets really complicated to release an app due to the whole App Store experience.
- StevePerkins 5y agoI don't think I have ever witnessed a comment on Reddit, prefixed with "Unpopular opinion:", that did not actually contain a VERY popular opinion, and therefore rocket to the top of the thread thanks to reverse psychology upvotes. It's depressing to watch this trope start to bleed over into HN.
- chrisco255 5y agoWell, it's at least a controversial opinion even if it also maintains popularity. People seem to rag on Electron apps all the time on HN due to their inefficient usage of computing resources. However, they are an optimal use of developer resources, which are far more constrained for the average project.
- w-j-w 5y agoYou regularly see opposition to this opinion on HN though. Complaining about electron being inefficient is super common around here.
- zamadatix 5y agoProblems with the prefix aside (I'm not a fan either) Reddit does it's best to show you popular comments. If you go looking in the -10 through 10 range on relevant threads you'll have a decent chance of spotting them. Not "controversial", not "top" (or bottom of "top"), not "hot", just the 95% of comments that aren't driving engagement numbers. After all it's neither going to be popular because it's a popular sentiment nor is it particularly likely to be something interesting/relevant to get upvotes on merit. It's just going to be an unpopular opinion that gets ignored.
- zython 5y agohttps://en.wikipedia.org/wiki/Survivorship_bias https://en.wikipedia.org/wiki/Survivorship_bias You are less likely to read the truly unpopular opinions but yes I agree, seems like a cheap way to gain popularity.
- yesenadam 5y agoAlso the phrase seems close to breaking the guideline against commenting about the voting on comments, and is a boring meta-comment that just adds noise. It seems like putting up a preemptive umbrella.
- cosmotic 5y agoYou're taking about wrapping a boilerplate ridden platform in another boilerplate ridden platform where someone else wrote either boilerplate. You're talking about a browser without window dressing. That's not making an app nor eliminating any boilerplate.
- cosmotic 5y agoI'll also add that you lose most of the benefits of a native app and most of the benefits of a web app.
- ajkjk 5y agoWell.. people around here love to hate on Electron so I can understand thinking it's an unpopular take. But seriously Electron is so many times better than writing native apps .. or even trying to find the documentation for how to do _one single thing_ in a native app the way you want to.
- ironmagma 5y agoI second this. Further, the number of times I’ve tried to get into native development is about ten, and every time I’ve done it the APIs are completely different as the OSes have moved on to new ways of doing things. Meanwhile, the DOM APIs have been more or less the same since I learned them 15 years ago, with the oddball world-changing addition of querySelector or enhancements that people rarely use like Shadow DOM and filesystem API.
- PaulDavisThe1st 5y agoThe APIs for cross-platform native GUI development haven't changed in any significant ways in 20 years or more. If you insist on using the new hotness being offered for any platform (web, native, whatever), then sure, you're doing to see this. But in the web context, you reference the DOM APIs that are stable ... in the same way that Qt, GTK (or even Cocoa) have been. New APIs for web dev show up monthly, but you apparently manage to not keep switching from one to the other. Why would you do the same thing for native dev?
- ironmagma 5y agoQt isn’t a native API. It’s true that there are stable libraries like GTK or WxWidgets which allow you to write native-looking apps (or for Linux, I spose that is native, and granted, Linux probably has the best native dev experience), and those exist in the form of React et. al. for the web world. But the number of Windows native app APIs is insane, and every year I try to learn how to create an XCode basic app and it’s different. Creating a simple app with HTML and JS however is the same as it’s always been.
- PaulDavisThe1st 5y agoI use the term native to mean "an application that runs on the metal and has direct access to system calls, not in a VM of any kind, including a browser". Qt is native in that sense, just as much as any other toolkit designed for the same purpose.
- PaulDavisThe1st 5y ago
- kall 5y agoYep. Getting started on the web platform is honestly still a marvel to me and unmatched after decades. Sure you can use babel/webpack/vite whatever, but you can also still create a text file called app.html, type your little program into it and then double click to run.
- PaulDavisThe1st 5y ago> see if you can get this webapp running in electron, and maybe figure out how to do push notifications and save data locally. Two days later the project is done. A week later, the app is ready to install. So you had an app that was already written, ported it to electron (designed to make the port as painless as possible), and you note that this is easier than writing it from scratch with non-web APIs? This is not exactly suprising, is it?
- ratww 5y agoSo true. I don't think it's a surprise for anyone that developers experienced in web technology find it easier to make apps using the thing they're experienced with. In a parallel universe, a junior dev who only learned Qt would have same amount lot of trouble making websites.
- throwaway9870 5y agoMaybe, but there a lot more web programmers than Qt programmers, so chances are you going to be dealing with someone who knows the web and not Qt.
- indymike 5y ago> So you had an app that was already written, ported it to electron True, and had we tried to port to native, that intern would have given up. Most of the business functionality was in a REST api, so porting to native was something that was doable, but the level of effort would have been extreme. Oh, and had we wanted native on Mac, Windows, Linux, Android and iOS... well... that's 5x jumbo right there.
- PaulDavisThe1st 5y agoAs a general remark, I get confused and maybe even a little irritated when people conflate Android & iOS with macOS/linux/windows. I mean, a device that you interact with almost entirely via (multitouch) and generally has extremely limited display real-estate is fundamentally a totally different platform than a desktop computer. The interaction model, the display design... you're never going to want the same thing on both (unless what you want to do is extremely constrained). You can sort of kind of pull this off with a relatively limited web app, where the interactions are limited to tapping (since there's generally touch interaction on the desktop) and the fluid layout possibilities of modern CSS give you some chance of coming up with a general design that can work sort of kind of OK across all browsers on all platforms. But try this for a more complex app, the sort that has been traditionally desktop only, and I think it's extremely hard to design the GUI in a way that can work on both mobile and desktop platforms, regardless of the actual toolkits /technology you are willing to use.
- jollybean 5y agoNot sure this is a very 'unpopular' opinion ...
- citrin_ru 5y agoI haven't touched GUI development for many years but 20 years ago I was able to learn Turbo Vision and create a simple TUI app having very little programming experience. A few years later I was using Java AWT and It didn't took too much time to learn it too. I cannot create a WebApp or even an Electron app of similar GUI complexity without spending much more time. Native GUI is more cplicated nowadays too, but I don't expect it to change too much - controlling layout using CSS+HTML is harder than in most (if not all) native GUI frameworks.
- Gluber 5y agoCannot agree more. I have used like 20 Native UI Toolkits ( MFC,WxWidgets,QT, WinForms, WPF, VCL, Android, Jetpack, SwiftUi, GTK, and the list goes on ) i have even written one myself ( for in game uis ) I still cannot comprehed how we ended up with the shitshow that is CSS/HTML. Even Javascript nowadays is a workable language ( or otherwise typescript ) WebAssembly is great... but the actual UI Layer with the DOM and CSS .... just a nightmare Every time i have to work on something a bit more complex on the browser, i ponder of writing my own UI Toolkit based on Canvas/WebGL or WebGPU and just draw everything myself
- zeroc8 5y agoFlutter for Web is doing exactly that. For some webapps, this might be a great way to go.
- wazzaps 5y agoThe performance of flutter on the web is unusable, I would be ashamed to ship an app using it. What other framework doesn't maintain 60 fps in its hello world?! Flutter works great on mobile and desktop though, I shipped multiple apps using it and currently writing a desktop app.
- Gluber 5y agoI am not sure, Flutter is still using DART ? That's a pretty big no go, last time i looked DART was a haphazard clone of Java/C#/Kotlin with no discerning features of any value.... I rememember when it was supposed to be the new Javascript (transpiling and big dreams of landing a native Dart VM in browsers ) For me its a no go to have a language that's bascially a dead end outside of one specific ui framework.. Seems like a solution in search of a problem.
- dundarious 5y agoGetting started in the web ecosystem involves a lot of similarly impenetrable "magic". There just isn't a community built around creating project templates and creation scripts and such for lower-level programming. I'd say you're right about the GUI shitshow, and the web ecosystem is just a slightly different kind of shitshow.
- urthor 5y agoAbsolutely. There's a huge amount of tiny chores with web development, that if you hadn't learnt how to do them in 1.5 seconds 5 years ago, would take you 2-3 days to figure out. There are a hundred small chores that must be done to build and launch software on the web that you have to learn before you get it going. I strongly doubt desktop doesn't have the exact same volume of inane things as webdev.
- bluedino 5y agoHave you tried the Mac?
- pjmlp 5y agoThe size of node_modules and the compile times beg to differ.
- smoldesu 5y agoI'll concede that native GUI development is tedious on pretty much every platform in existence. However, there was a golden age of Linux GUI programming that spanned from the mid 2000s to 2019, where you could spin up fantastic GTK interfaces in the span of a weekend afternoon. I still use GTK3 to make simple forms and utilities, and I reckon I will for quite a few more years; the workflow is flexible and straightforward, there's a ton of fantastic desktop widgets that work as well as they do on a touchscreen as they do with a mouse, and it was surprisingly extensible too. GTK4 has seemingly put that behind them to focus on a "write your app in this specific way or don't write it at all" ethos, but frankly I'm happy to stick with the prior toolkits. Maybe it sounds cheesy, but it really was my "ideal" GUI library for a while.
- GeneralMaximus 5y agoI recently switched to Fedora and discovered that it's straightforward to create native GUI apps for Linux these days: just use GTK+ with your choice of official binding (C, JavaScript, or Rust) and you're done. Things are well documented and generally easy to set up, at least in my limited experience. Flatpaks make distribution a non-issue too.