Writing a desktop HTML5 application
Have you ever wondered about writing a desktop application with HTML5 and JavaScript? Nowadays, we can do this quite easily with NW.js. This project is a cross-platform application runtime based on Chromium and Node.js. So, it provides a frameless browser where both the DOM API and Node.js API are available. In other words, we can run NW.js classical web-applications, access low-level APIs (filesystem, network, processes, and so on), and reuse the modules of the NPM repository. Interesting? We'll start a tutorial where we will create a simple HTML5 application and run it with NW.js. It'll be a roster application with a form to enter names and a list of already submitted ones. The names will be stored in localStorage. Let's rock it.
Setting up the project
First of all, we have to download the NW.js run-time relevant to our platform (Mac OS X, Windows, or Linux) from http://nwjs.io. Next to the NW.js executable (nw.exe
, new.app
, or nw.
depending on the platform...