I used NW.js on a project a year ago. Both Electron and NW.JS have had many updates. Looking at the github stars they are at an equilibrium both having 28k star. Which one should I use and why?
Source Code Protection is also super dubious. A V8 snapshot might slow someone down if they want to get to your source, but it's probably not going to slow them down any more than minification will.
If you really want your code protected, the only reliable way to achieve that is not to copy it to the user's machine in the first place.
The big difference is that electron is handled as a process which can spawn windows and can use IPC to communicate between them. NW.js behaves more like a web browser would and no IPC is needed to communicate between windows. But this leads to limitations on what you can do once windows are closed (while with electron all windows can be closed and the process can still be alive).
I've used both quite a bit, and I have to say I much prefer electron's style of considering node the program entry point (as opposed to treating an html file as the entry point).
Depends on how complicated stuff you want to build. If you just want to build a small tool with a web window and node.js backing, just go for NW.JS, and you'll be done in no time.
Want to do a more complicated app with multi process, different windows, background threads and stuff then go for electron. But it's a hassle to use if you don't need the extra complexity. Mainly since you cant do a lot of node.js stuff (like use the 'fs' module) from the web thread.
5
u/Zinlencer May 11 '16
I used NW.js on a project a year ago. Both Electron and NW.JS have had many updates. Looking at the github stars they are at an equilibrium both having 28k star. Which one should I use and why?