I understand that node.js is a server side javascript. I want to write a desktop application using node.js. What would be the best tool to build a UI for this application/ what languges frameworks do people usually use to build a GUI for node.js app.
-
2While Node.js is cross platform not all of GUI libraries are; hence what are your target operating systems?– Nick Dickinson-WildeCommented Apr 15, 2014 at 8:07
-
by the way Node package manager probably will have something for you.– Nick Dickinson-WildeCommented Apr 15, 2014 at 8:09
-
Haven't really thought about the target operating system but It would be good to have it run on all the platforms. Webkit seems to be doing it.– sublimeCommented Apr 15, 2014 at 18:38
4 Answers
NW.js (formerly node-webkit)
You can write desktop apps using websites (HTML, CSS, JavaScript) while retaining access to all Node.JS features and APIs.
Quoting its readme on GitHub:
NW.js is an app runtime based on Chromium and node.js . You can write native apps in HTML and JavaScript with NW.js. It also lets you call Node.js modules directly from the DOM and enables a new way of writing native applications with all Web technologies.
Features (also quoting from the readme):
- Apps written in modern HTML5, CSS3, JS and WebGL.
- Complete support for Node.js APIs and all its third party modules.
- Good performance: Node and WebKit runs in the same thread: Function calls are made straightforward; objects are in the same heap and can just reference each other;
- Easy to package and distribute apps.
- Available on Linux, Mac OSX and Windows
2016 Update
There are few options for writing GUI apps in Node:
- AppJS - the oldest one, not actively developed, recommends NW.js or Electron
- NW.js - previously known as node-webkit, sponsored by Intel and Gnor Tech, used in Intel XDK, WhatsApp for Desktop and many others apps
- Brackets Shell by Adobe, a CEF-based application shell for the Brackets editor, not really meant for use in anything other than Brackets, but people use it for other projects and there are some tutorials online
- Electron by GitHub - previously known as the Atom Shell originally created for the Atom editor, used by Atom, Slack, Visual Studio Code, Ionic Lab, Light Table, WordPress.com, Google Play Music Desktop Player, Yeoman and many other apps - (the 1.0 just released on May 11, 2016)
Electron can be used for it. You can check it out here It's all by HTML CSS and JS Hope it helps
There's a project called NodeGUI, which is based on Qode. It allows developing applications using the QT toolkit. If you've used PyQT/PySide, you should be at home with this.
NodeGUI is still under active development (not recommended for production) and might not contain all QT widgets/functionality.