News for hackers. Stuff that matters.
Re:Electron apps cannot be submitted to the Apple store by Seirdy on Tuesday November 05, 2019 @07:21AM (#21451699)
There is literally no reason to distribute an electron app when you could simply run it as a web server using `npm start` and navigate to `http://localhost:[port number]`. Electron is born out of a misplaced notion that some apps are "special" and deserve a certain extra percentage of the users' CPU cycles and battery life for a spot in a user's system tray. 10% of a user's battery life multiplied by all their electron apps is not worth it when alternatives (like starting a web server and launching the users' preferred browser) exist.
Re:Electron apps cannot be submitted to the Apple store by imtringued on Wednesday November 06, 2019 @04:51AM (#21461073)
I once used this pattern and implemented the webserver using C++. It was quite interesting that I could read gigabytes worth of files and run a sqlite database in the same process and still not exceed 3MB of RAM. Of course the tab in the browser used a lot more RAM (maybe 25MB) but browsers can suspend or simply close tabs. With regular applications the GUI would always be loaded in memory.

The reason why this pattern isn't used more commonly is the fact that right now web browsers simply aren't designed to be used this way unless you start a new instance for just a single app. The second reason is that electron developers are lazy. They only want to test a single browser (or browser version) and are perfectly happy that this means Google can get away with shady things.

Re:Electron apps cannot be submitted to the Apple store by imtringued on Wednesday November 06, 2019 @04:44AM (#21461033)
I once used this pattern and implemented the webserver using C++. It was quite interesting that I could read gigabytes worth of files and run a sqlite database in the same process and still not exceed 3MB of RAM. Of course the tab in the browser used a lot more RAM (maybe 25MB) but browsers can suspend or simply close tabs. With regular applications the GUI would always be loaded in memory.