From Blazor roadmaps a few months ago, I think the idea is that Blazor will become the recommended .NET Core cross-platform UI choice sometime after .NET 5.
But the big advantage of using Electron is that you know exactly what browser and Node version you are targetting. That takes away a lot of the cross-browser HTML/CSS pain.
I don't really see this as an advantage anymore (especially contrasted against how horrible electron is in terms of memory & CPU utilization). Modern browsers are much better about being consistent with standards.
Perhaps if you are starting from zero on the CSS front you will see minor quirks browser-to-browser, but if you start with something like bootstrap 4 and leverage the responsive layouts you can see consistent results that your clients will enjoy pretty much immediately.
Instinctively this does seem better than Electron as a solution. It's much leaner, isn't subject to the browser sandbox, and should be consistent across platforms - so it ticks the same boxes in a leaner package. I just don't think Electron is a solution we should try to emulate elsewhere.
Most Electron apps that I've seen don't really need access to the underlying platform, and as a user I really don't want to trust the author with native access to the platform where it's not obviously necessary. Even where it is necessary I have no real granularity as regards the permissions I'm handing over.
PWA's are dismissed more or less out-of-hand in the article but they're pretty much what it goes on to suggest, just with compromises.
Electron (or an Electron-but-leaner approach) gives us this:
- Common platform for offline applications that run in a browser engine.
PWA's give you that, and also this:
- Permissions system for out-of-the-ordinary platform requirements that (1) have API consistency across devices and (2) that the user has visibility and granular control over.
- Updates are managed inherently by the nature of the open web (reload page, service worker updates).
- No seperate framework to install for JS, but if a framework needs to be bundled (e.g. for .NET Core) it can be cached between applications similarly to if it were installed on the computer seperately.
Honestly I think PWA's over WebAssembly and the open web is a much better fit for this.
People complain about Electron not being available on mobile devices and things like Chromebooks, but the reason for that is because there's a better solution already in place:
Websites pinned to the home screen.
They're a webview without window chrome that can request access to perform most tasks you might want to do with Electron, but inside the sandbox.
The only thing I can think of that needs platform access and is commonly built on Electron is code editors, and even then only to run and debug command line applications that are running seperately on the platform. For almost every other type of application I've seen on Electron it would be better as a PWA.
Microsoft is not a single entity; there is plenty of room for innovative ideas like what Steve has that challenges the status quo around formerly innovative ideas like electron. We certainly have no shortage of highly successful electron apps at the company either (e.g., VS Code and Teams).