When comparing NW.js (w/xvfb) vs Electron, the Slant community recommends NW.js (w/xvfb) for most people. In the question“What are the best tools for building cross-platform desktop apps with web technologies?” NW.js (w/xvfb) is ranked 2nd while Electron is ranked 3rd. The most important reason people chose NW.js (w/xvfb) is:
The integration of Node with the DOM in NW.js opens up a number of new options in how your headless testing workflow can be facilitated. The distinct separation of JavaScript contexts, the introduction of a separate node context, and the ability to cross communicate, offers a lot of power and flexibility.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Node integration
The integration of Node with the DOM in NW.js opens up a number of new options in how your headless testing workflow can be facilitated.
The distinct separation of JavaScript contexts, the introduction of a separate node context, and the ability to cross communicate, offers a lot of power and flexibility.
Pro NaCl support/integration
Access to the Native Client offers up more options in implementing your testing workflow.
Pro Healthy community
Github is behind electron and there is a lot of big companies using it to make their cross platform apps.
Pro Active development
Electron receives updates frequently (multiple times each month). For example, the recent updates (as of July 15, 2016) are:
1.2.6 (released July 6)
1.2.5 (released June 23)
1.2.4 (released June 22)
1.2.3 (released June 16)
1.2.2 (released June 8)
Pro learning curve is less
Electron has less learning curve when compare to qt like other options
Pro Great documentation
Electron has a nice website with great documentation. It also features a lot of samples.
Pro Solid API
Cons
Con xvfb Requirement (for now)
Headless is on the NW.js roadmap, but for now xvfb is necessary to get going. The community has done the work and you can find the details here.
Con Apps can have memory issues
Apps made with Electron are likely to have memory issues unless you specifically design the app with efficient coding.
Con High CPU Usage
Electron Has High CPU Usage
Con Needs to run chromium
Runs chromium in the background which consumes a lot of resources.