4 ms·
Good to have this kind of feedback from someone who used both. Could you expand the comparison on a few key points?
by ronjouch 11y ago
Good to have this kind of feedback from someone who used both. Could you expand the comparison on a few key points?
- johnthedebs 11y agoI'm not OP, but I've also used both and recently switched a production app from NW.js to Electron. I'm extremely happy with the decision to switch. Benefits of Electron: * Much more active development, more frequent releases, more quickly addressed bugs (this is huge) * More active ecosystem * Lower level API that requires you to perhaps do a bit more work to achieve the same cross-platform behavior but gives more control and fewer weird issues * Much better documentation * Much better error reporting. It may have just been me, but when I had a JS error in NW.js, the process would simply crash with no feedback whatsoever (which as you can imagine is infuriating). I opened a couple issues about it and never got any help or feedback. Electron pops up a dialog with a stack trace. Edit: * Another major difference is that NW.js uses a shared global object for communicating between the main process and renderer (BrowserWindow) processes. Electron uses evented message passing using an `ipc` (inter-process communication) module that makes for more robust code. * Besides being lower-level, the API is just (IMO) a lot better/more powerful in general
- ronjouch 11y agoThanks!
- z3t4 11y agoAbout error reporting in nw.js, it's just like working with chrome (chromium), you see JS errors in: developer tools > console tab. You could probably send messages to a log instead of the developer tools (might require editing the nw.js source code).
- johnthedebs 11y agoYeah, I should have been more clear. Regular JS in the renderer processes showed errors in the console as usual. However, if I tried using one of the NW.js APIs incorrectly in the renderer, or there was any error at all in the main process (which doesn't have devtools) it would just crash.