137 points · by rmason · 8y ago · 136 comments
I can appreciate the concerns about maintaining multiple codebases and dealing with different delivery mechanisms and their rules, but modern iOS/macOS and Windows APIs (at least; I cannot speak for Android and Linux) seem just as easy, let you work in arguably better languages, evolve at a faster rate, and provide a better experience for users and their machines.
If it was so easy as you said, a lot of macOS apps would've been portable to Windows years ago given the market share.
I work for a cross-platform company, Windows is a much more difficult to develop for compared to macOS. You can write a Cocoa UI but what do you do on Windows when you need to support Windows 7 and above? Win32 controls are grossly outdated but the best accessible/consistent experience across multiple versions, UWP controls is limited to Windows 10 and best under MS Store, WPF has been neglected but so far it is the fastest way to develop a GUI. Microsoft has decided to split UWP out of Microsoft Store to bring it to everyone with UWP XAML Islands etc.
The reason Slack prefers Electron is because you can just write the same HTML/CSS front-end, deploy it, and all Slack apps can simply be refreshed to show the newest UI. You cannot do that with native apps at all. You could get around with a few webviews embedded in the native apps but might as well go full Electron.
I don’t want the same “GUI experience” across platforms, I want a GUI experience that is consistent with the platform I am running.
When I was a heavy Mac user, I hated iTunes on Windows because it felt like being on a Mac instead of Windows.
Qt and other GUI frameworks (like Juce and FLTK) exist and are blisteringly fast. You don't have to package an entire web browser to make something cross platform.
At least back in the 1980s and 1990s, cross-platform toolkits tried to look native everywhere, and that’s why.
At least N times the work for N platforms.
Fewer developers, harder to recruit.
Cross-platform options like Qt are not modern/pretty enough and sometimes aren't that much thinner than Electron (depending on how well written the app is). Java/Swing/SWT is also quite bloated and looks terrible.
Development is much slower in languages like C++. Other languages are not cross-platform or have immature/buggy cross platform support. How's ObjC on Windows? C# on Mac? They exist, but nobody uses them.
I really think we're in a UI dark age. Native UI development has gone backwards compared to the ease of WYSIWYG GUI design 10-20 years ago. Go back and use the VB.NET GUI builder from 2004 and be in awe at the incredible productivity you could achieve. Platforms are more fragmented today too. There is even fragmentation on the same platform! Do I use Qt or GTK or (insert one of a dozen others) on Linux? WPF or Windows Forms on Windows? Cocoa or UIKit on Mac? Which one will MS or Apple kill tomorrow? ... or I could just say fXXk it and use Electron and be done with it.
This is 100% the fault of vendors. If you hate the bloat blame Microsoft, Apple, and Linux developers, not people who use Electron.
Edit: mobile UI development is less fragmented but it's not really that great either. You get no choice in dev tools and the code is absolutely unportable. I see higher-level web or web-ish views/libraries/frameworks taking over there too. It's already happening.
That almost nothing like this exists today is evidence that personal computing is dying, IMO. Companies don't want to empower users, they want them to be good little content consumers who do what the ads tell them. Developers (OSS developers included) don't respect them and assume they're too stupid to be permitted to use anything but the safety scissors. After all, if they were worthy of creating things they'd be C greybeards.
What's wrong with C# on Mac? It's basically bindings to the native API via Xamarin.Mac.
You can build a cross-platform app with Xamarin on iOS / Android / Mac, UWP on Windows, and Gtk# on Linux. Using something like MvvmCross will allow to share most of the business logic between platforms.
Only if 100% of the code is the GUI.
Ah, but you see, the modern developer does not care about the user experience. "Developer time is worth more than user time", "move fast and break things", etc. Users are the cattle we feed ads to and farm for salable data.
You could still use a web UI but without embedding Chrome and Node.
Writing Slack as a native app would be a massive pain. Especially due to all the web-like features it has, the fact that it's one codebase (mainly) for desktop and web.
They also have to support Windows, Linux, Mac and mobile. Not an easy task
That doesn't even seem correct - the BrowserWindow emits "hide" and "show" events [1] that Slack could use to do exactly what you're describing. I'm guessing they just don't want to implement it for some reason?
[1] https://electronjs.org/docs/api/browser-window#event-show
“Additionally, on macOS, the visibility state also tracks the window occlusion state. If the window is occluded (i.e. fully covered) by another window, the visibility state will be hidden. On other platforms, the visibility state will be hidden only when the window is minimized or explicitly hidden with win.hide().”
A good example is on mobile, where playing media on the web is a hassle because you never know what the background behaviour will be, whether it’ll carry on playing when you’re on another tab, or on another app, or with the screen off, or after five minutes. It seems to be a free for all now for the browsers, not much user control.
Here's hoping something deeper was broken about them that now drastically changes top-level api behaviour!
I think the WordPress team usually does a good job, e.g. https://wordpress.org/news/2017/11/tipton/
Is there a significant speed/memory usage change? Is the install smaller? Some new features that people want?
I don’t know. And I’m not going to read the names of dozens of tickets to try to find out.
No, it still packages two different runtime environments, one of which is a browser, which, in turn, is basically an OS.
https://github.com/burtonator/polar-bookshelf
We've been releasing with the 3.0 betas for about a month now and haven't had any issues. It's been pretty stable.
Actually more stable than the 2.x series as it has a number of bug fixes that weren't in the 2.0.0 ... really glad this platform is still moving forward aggressively.
There are also 4.0 beta builds up which I haven't played with yet.
I think the fix is: https://github.com/electron/electron/pull/13760
Is it because of a release cycle?