Using Node and Electron to build Desktop Apps: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<gallery> | <gallery> | ||
Nodejs-new-pantone-black.png|Node | Nodejs-new-pantone-black.png|Node.is | ||
Npm.png|Node Package Manager | Npm.png|Node Package Manager | ||
Electronjs.png|Electron | Electronjs.png|Electron | ||
</gallery> | </gallery> | ||
Revision as of 23:06, 19 February 2019
-
Node.is
-
Node Package Manager
-
Electron
AppStudio now supports the use of a some of the biggest new technologies in the web development world.
Node.js is a runtime environment that executes JavaScript code outside the browser. That makes it suitable for writing server side software, which would normally be done in PHP or other languages. It works by having an executable stub which is able to call the V8 JavaScript engine, which powers Chrome.
npm is a repository of code which can be used with Node.js. It's included when you download Node. There is a huge number of packages available - over 750,000 at last count. You can include these packages in your Node project to add functionality. It might be for convenience: there are a lot of libraries which are much easier to include in your project than to write yourself. It might be for functionality: the modules can implement features which would not be available in the browser.
An example of a convenient library would be Lodash which adds hundreds of additional functions to JavaScript. A missing feature library would be fs-extra which allows full access to the file system.
Electron is framework which allows for the development of desktop GUI applications. Since it's built on Node.js, it already has the ability to run JavaScript code. It also uses Chrome's browser engine to render the UI using regular HTML. Each Electron app includes the V8 Runtime as well as the Chrome browser. Slack, Github Desktop and Whatsapp are examples of apps built using Electron.