Electron + React or React-native is the way to go. You get cross platform out of the box, mobile as well, it is silly easy to work with, hard parts all abstracted (notifications, updating, installers), the biggest dev community on earth and an immense eco system.
The traditional desktop application is dead. In desktop land you have dusty tools, slow and outdated UI frameworks (as in MVVM or worse: UI-in-code) like GTK, XAML, ..., barely any community or components to re-use. Microsoft itself starts to make its products on these new platforms. Visual Studio Code, or Office fabric for instance. Many popular everyday apps that people use without knowing it are Electron based.
We're currently transferring a huge C#/WPF monster into React. The gains are ridiculous. React runs circles around XAML (less code, less boilerplate, faster) while Redux makes handling state simple. And it's a thing of beauty seeing it run everywhere, Windows, Linux, MacOs. Android and IOS as well with few adaptions (React-native) while thanks to Redux the heart of the app is 1:1 portable.
This approach doesn't solve the problem of Electron and NW.js apps being terrible for laptop battery life, but this appears to be something that typical end users aren't terribly concerned about.
On the bright side, React Native for Windows works quite well, and there's even a WPF version of it[1]. React native for macOS[2] worked decently when I tried it, too.
I've only brushed over React native for desktop. How was your impression of it, is it worth a try over Electron? How do you handle packaging, notifications, updating, installing?
I mostly agree with you and I'd like to take the leap, but Javascript. I've tried to love it, and Typescript is a big improvement that I use happily. But in the end I'm just always going to be way more productive (especially in large projects) with a modern statically typed language with functional features. That is, C#, Kotlin, maybe F# or Scala.
Really, you're right - for most consumer apps outside of games and graphics, the web stack is hard to beat. Between the devtools and inspectability of the view layer, the fast and interactive nature of development, and the sheer size of the community, there's nothing like it. So I really blame Apple/Google/Msft for neither updating their UI toolkits to keep pace with the web, nor shipping something Electron-like in combination with a CSS framework and nice bindings for Swift/Java/.NET that would allow for development on the respective platforms that really feels and performs native while leveraging web technology in the view layer.
Both of those approaches would have worked, and neither was chosen - so now we have this bizarre situation with no good choices on the desktop. I have high hopes for WebAssembly, and if that fizzles I guess I'll have to make peace with using a language I don't like. At least if I ever want to develop for the desktop again.
Exactly, i have no idea what happened, why all these frameworks were treated like that. XAML, Flex, and many others. Well Google tried to make a bridge with CEF (Chromium embedded framework) which had .net bindings but it was quite slow last time i tried. Not a real UI framework of course.
I come from a .net/C++/C# background, too, and i disliked Javascript strongly back then when it was still a rumor that WPF would go down. But it's in a very different shape today and i mean the language itself, not just the community aspect of it. I write code in it that i would struggle with in C#. Javascript being very close to its JSON backbone and having special operators to mutate variations of it, i miss that in C#. Or dead simple async, caching, networking, it all feels very close to the core. Now where they implement atomics and shared buffers, there are very few things i would miss.
The type system has also gotten better, especially with Facebooks Flow, which is very sound and can detect deeply nested cases.
Yes, from scratch. Since it's been more than 2 years of work now it's hard to say there's a lesson to be learned other then, yes, the web is totally ripe. And perhaps that insisting to do things the way we were used to was problematic from the beginning. The web is very different, so are the tools. We are using Webpack + Babel + React + Redux and Node on the server, very happy about it.
The traditional desktop application is dead. In desktop land you have dusty tools, slow and outdated UI frameworks (as in MVVM or worse: UI-in-code) like GTK, XAML, ..., barely any community or components to re-use. Microsoft itself starts to make its products on these new platforms. Visual Studio Code, or Office fabric for instance. Many popular everyday apps that people use without knowing it are Electron based.
We're currently transferring a huge C#/WPF monster into React. The gains are ridiculous. React runs circles around XAML (less code, less boilerplate, faster) while Redux makes handling state simple. And it's a thing of beauty seeing it run everywhere, Windows, Linux, MacOs. Android and IOS as well with few adaptions (React-native) while thanks to Redux the heart of the app is 1:1 portable.