The article is transferred from: http://www.codebye.com/nodejs-nw-js-vs-electron.html
Copy it down for unified data management
From a development point of view, the difference between choosing to use nw.js or election is not very big. Most of the work is still on my own javascript and HTML.
Domestically well-known ones, such as WeChat web development tools and DingTalk, are all developed based on nw.js
Electron is relatively more reliable than nw.js. There are a bunch of success stories:
1. Atom editor 2. Slack (that unicorn company) 3. Visual Studio Code 4. WordPress and more. .
Advantages:
1. The open source core extension is relatively easy, currently based on node 6.x, and now gyp is very user-friendly, making it very easy to base on c++ and js.
2. The interface is highly customizable. In principle, it can do anything that the Web can do.
3. It is currently the cheapest cross-platform technology solution. HTML+JS has a large reserve of front-end technicians and a large number of existing web UI libraries. Most are very reliable.
4. Compared with other cross-platform solutions (such as QT GTK+, etc.), it is more stable and has fewer bugs. After all, as long as the browser shell is running, there will not be too many problems in it. Of course, I have also encountered some hidden pits.
5. Convenient hot update. The download is overwritten. Of course this is an advantage shared by all scripts.
Disadvantages:
1. Stuck and slow to start, this may be the fault of webkit. After all, there are indeed a lot of functions to be supported by a browser.
2. In addition to the main process, you may also need to start some auxiliary processes to complete the work. And whenever you start a new process, the starting price is the memory overhead of a nodejs!
3. Frame loss, this is the most serious, but I'm used to the silky smoothness of native. It's okay under mac, but it's a bit awkward under win.
4. The typed package is too big. (Obviously, even an empty package contains at least the size of a browser)
nw.js is half dead now, let’s abandon the pit. . (Unless you want to be compatible with XP..) codebye.com
The following is a comparison chart of nw.js and election summarized by international friends in 2016 , please refer to codebye:
NW.js 0.16.0 | Electron 1.2.8 | |
Project inception | 2011 | 2013 |
Corporate Sponsor | Intel | GitHub |
Licensing | Open Source, MIT License | |
Browser Runtime | Chromium | libchromiumcontent |
Node.js Version | 6.3.0 | 6.1.0 |
Chromium Version | 52.0.2743.82 | 51.0.2704.106 |
Entry Point | HTML or JavaScript4 | JavaScript |
Bare Distribution Size | 139MB (52MB zipped) | 125MB (45MB zipped) |
Windows Platform Support | Windows 7+ (x86 and x64) | |
Windows XP Support | In LTS version (0.14.x) | No |
Mac Platform Support | Mac OS X.9+ | |
Mac OS X.6 | In LTS version (0.14.x) | No |
Architecture Support | 32bit (Win), 64bit (Win/Mac) & arm (limited) | |
Chrome Apps Support | Yes | No |
Support of chrome.* APIs | Yes | No |
Plugin Support | NaCl, Pepper | Pepper |
Adobe Flash Support | via Pepper Plugin | |
Mac App Store Support | Yes | |
Windows App Store Support | Yes | Windows 10+ (details) |
App signing | Yes | |
Source Code Protection | V8 Snapshot1 | ASAR Archive Support2 |
Auto-update | Unclear (module) | Mac/Win (thru Squirrel) |
Crash Reporting | No | Yes |
Kiosk Mode | Partial (Buggy on Mac5) | |
PDF Viewer | Yes | Using pdf.js |
Native Node Module Support | Yes | |
SSL Client Certificate | Yes | Partial (details) |
Print Preview | Yes | No |
DevTools Extension Support | Yes | |
Debugging | DevTools + extensions | Dedicated Devtron Module |
Integration Testing | ChromeDriver & WebDriver | Dedicated Spectron Module |
Windows Installer | Yes (nw-builder) | Yes (external module) |
html5test.com Score | 492 | |
Octane 2.0 Score3 | 27205 | 27343 |
Issue Resolution Time6 | ||
Open Issues6 | ||
GitHub Trends | ||
Open Codecs/Containers | Vorbis, Theora, Opus, VP8, VP9, PCM, Ogg, WebM, WAV | |
Licensed Codecs | MP3, MP4, H.264, AAC7 |