I'll-Be-Back I'll-Be-Back - 10 months ago 76
Node.js Question

Electron and Cordova for Windows build

Electron can allow to develop desktop applications (.exe) using JavaScript, HTML and CSS. It is based on Node.js and Chromium

It seem I could also do the same using Cordova but what Cordova couldn't do that Electron can (In term of desktop applications)?

I need to build an App that can do full screen, use AppCache (manifest) and store data using IndexedDB. It need to work well with Barcode Scanner and Serial Port communication (eg: https://github.com/voodootikigod/node-serialport)

Answer Source

Apache Cordova is a platform for building native mobile applications using HTML, CSS and JavaScript.

It seems like the main difference is that Cordova targets mobile platforms and apps first and foremost, while Electron is primarily focused on desktop platforms and apps. Cordova does appear to support Windows, Ubuntu, and OS X desktops to some extent, however they do mention the following in the OS X repository:

Note that the current focus of this cordova platform is to provide kiosk-like applications for OSX, that usually run fullscreen and have little desktop interaction. So there is no direct support for menus, dock integration, finder integration, documents, etc. Think of it as a mobile app running on a very big screen.

It also appears that Cordova's plugin system is not directly compatible with regular NPM packages and native NodeJS addons, so you will probably have to create some sort of plugin wrapper for node-serialport before you could use it in a Cordova app, or perhaps use an existing plugin.