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)
There are two types of builds: A debug/development and release build. By default, with no additional configuration, cordova build electron will build default packages for the host operating system that triggers the command. Below, are the list of default packages for each operating system.
On macOS/Linux you can build Electron app for Windows locally, except Appx for Windows Store (in the future (feel free to file issue) electron-build-service will support Appx target). You can use build servers — e.g. Travis to build macOS/Linux apps and AppVeyor to build Windows app.
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.
Free public Electron Build Service is used to build Electron app for Linux on Windows. On macOS/Linux you can build Electron app for Windows locally, except Appx for Windows Store (in the future (feel free to file issue) electron-build-service will support Appx target).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With