Node-Webkit

README

Node-Webkit it's a web application runtime based on Chromium and Node.JS that lets you integrate Node.JS functions and modules directly from WebKit DOM and enables a new way of writing native application with all web technologies.

It is created and developed in Intel Open Source Technology Center. You can find an introduction to the project in Speaker Deck here: Node-Webkit App Runtime.

Features

  • Applications 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

What's Node.JS?

Node.js is a server-side software system designed for writing scalable Internet applications, notably web servers. Programs are written on the server side in JavaScript, using event-driven, asynchronous I/O to minimize overhead and maximize scalability.

It contains a built-in HTTP server library, making it possible to run a web server without the use of external software, such as Apache or Lighttpd, and allowing more control of how the web server works. Node.js enables web developers to create an entire web application in JavaScript, both server-side and client-side.

What's WebKit?

WebKit is a layout engine software component designed to allow web browsers to render web pages. It powers Google's Chrome web browser versions. As of November 2012 it has the most market share of any layout engine at over 40% of the browser market share-ahead of both the Trident engine used by Internet Explorer, and the Gecko engine used by Firefox.

Code

Node-Webkit 1

Before to continue, you need to be sure that Node-Webkit is the right technology for you, so take some minutes to check some current projects being developed with this, some of them are already famous in the web development world, some others are populars in Asia where the majority of developers supporting this project are.

Here you can find the list of applications and companies using Node-Webkit. And You may also be interested in their demos repository.

Ok, now go ahead an take a look to this code, it is very simple so you can understand that work with Node-Webkit is very easy.

$ mkdir nw-hello-world
$ cd nw-hello-world
$ touch index.html
$ touch package.json
$ cat ./nw-hello-world/index.html
  <!DOCTYPE html>
  <html>
    <head>
      <title>Hello World!</title>
    </head>
    <body>
      <h1>Hello World!</h1>
      We are using node.js <script>[removed](process.version)</script>.
    </body>
  </html>
$ cat ./nw-hello-world/package.json
  {
    "name": "nw-hello-world",
    "main": "index.html"
  }

Now compress all the files in the project folders into a ZIP archive with extension .nw, in this case we will compress index.html and package.json into called app.nw: $ zip app.nw index.html package.json

Download the pre-built binary for your platform from here and usit to open the app.nw file: $ ./nw app.nw

For more information on how to write/package/run apps, see:

Credits

Call all Node.js modules directly from DOM and enable a new way of writing applications with all Web technologies.

Node-Webkit GitHub Repository Wikipedia Nodejs Wikipedia Webkit Engine

Do you have a project idea? Let's make it together!