I am a fan of VIM but I find the whole discussion around Electron rather amusing - almost as if we need to justify our need for regular punishment by reinventing the wheel. It is fun to do things from scratch but it will not get you there fast.
Yes, Electron apps are a bloat considering that each one of them brings its entire runtime like games, and you know that most games will exceed several Gs of disc space and memory. The actual app that runs under electron is probably a few KB up to several megabytes of packed JS. Now consider statically linking the entire Cococa framework and other supporting frameworks in your app. Why would you do that when the OS is doing all the heavy lifting for you? Well, Electron is not part of your OS so if you develop with it you need to absorb the cost. The cost of disk space and memory - don't forget that. The OS does a lot of clever stuff to minimize your memory footprint. For example, DLL code is actually shared across all processes and mapped into each process/thread virtual memory space. This alone is a lot of optimisation taken for granted.
Ignoring decades of progress for the sake premature optimisation is stupid. The web is a reality and there is a lot of investment behind it. What needs to happen is for browser and OS vendors to offer means to execute web apps as part of the OS with all the optimisations needed for it to happen. Windows is able to run web apps (HTA) under the context of an isolated IE using COM but no other mainstream OS does as far as I know. Do you think that having in kernel virtual machine crazy? This feature already exists in all major kernels and your GPU drivers as well. You just don't see it because it is abstracted for away for most development tasks.
So yes, vim is nice and Electron is a bloat. But that only stands if you ignore the fact that the modern browser is effectively a modern OS. So think of Electron apps in the same way you think of docker containers. It is a snapshot of executable code - all the code you will need to run your app and it is portable across OS-es. That is a huge order to fill and it is done almost effortlessly.
UWP apps can be written in HTML/JS. You can run local js / html in a webview in most platforms. React Native is pretty much just this. It's a shame there isn't a cross-platform framework using webviews and native frameworks.
Electron provides some nice integrations with the base OS that you can access with JS. However, such abstraction, although maybe not as complete as the one in Electron, can be easily written so that the native browser can be used as the main renderer. As long as the application works across all browsers, it will remain small and pretty much portable. You still need to update the browser wrapper through which is more annoying than pushing some code to a web server.
> You still need to update the browser wrapper through which is more annoying than pushing some code to a web server.
Yes, you'd need to update and build apps for each native platform separately, but the end result would be worth it. We're talking about maybe halving ram usage simply by writing a little more native code to package up our javascript
Yes, Electron apps are a bloat considering that each one of them brings its entire runtime like games, and you know that most games will exceed several Gs of disc space and memory. The actual app that runs under electron is probably a few KB up to several megabytes of packed JS. Now consider statically linking the entire Cococa framework and other supporting frameworks in your app. Why would you do that when the OS is doing all the heavy lifting for you? Well, Electron is not part of your OS so if you develop with it you need to absorb the cost. The cost of disk space and memory - don't forget that. The OS does a lot of clever stuff to minimize your memory footprint. For example, DLL code is actually shared across all processes and mapped into each process/thread virtual memory space. This alone is a lot of optimisation taken for granted.
Ignoring decades of progress for the sake premature optimisation is stupid. The web is a reality and there is a lot of investment behind it. What needs to happen is for browser and OS vendors to offer means to execute web apps as part of the OS with all the optimisations needed for it to happen. Windows is able to run web apps (HTA) under the context of an isolated IE using COM but no other mainstream OS does as far as I know. Do you think that having in kernel virtual machine crazy? This feature already exists in all major kernels and your GPU drivers as well. You just don't see it because it is abstracted for away for most development tasks.
So yes, vim is nice and Electron is a bloat. But that only stands if you ignore the fact that the modern browser is effectively a modern OS. So think of Electron apps in the same way you think of docker containers. It is a snapshot of executable code - all the code you will need to run your app and it is portable across OS-es. That is a huge order to fill and it is done almost effortlessly.