top | item 8887019

NW.js

334 points| tommoor | 11 years ago |nwjs.io | reply

91 comments

order
[+] STRML|11 years ago|reply
This project's homepage uses the same template as iojs.org (https://iojs.org/) and unfortunately also has the same problem: the front page says almost nothing about the project.

What does "call Node.js modules directly from the DOM" mean? I write Node.js code, all day, every day, and I have for three years, and I have absolutely no idea what that means.

NW.js appears to be some sort of "break" from node-webkit, and the copy on the main site seems to suggest that it is an entirely new project. The only useful link I see goes to a Google Groups post that says that node-webkit has been renamed to NW because it is neither Node nor Webkit.

This is missing the point entirely. The tagline should be something lke:

"NW.js is a runtime for building desktop applications using Web technologies. Like WebViews for iOS/Android, NW.js leverages the latest in web technologies (Chromium and io.js) to provide a complete platform for building fully-featured desktop applications using the same technologies used for the Web."

Instead, the tagline seems to be advertising that I can check `process.browser` from inside a <script> tag. That's cool, but somewhat analogous to the tagline for Tesla's newest car saying that it "lets you change songs with voice commands". Nice feature, but doesn't explain the project at all.

I put in a PR for the iojs.org site (https://github.com/iojs/iojs.github.io/pull/50) which is garnering some good discussion but it doesn't appear that anyone is "in charge" so it may be a long time before any sort of major change is merged.

Edit: Let me note that all of this is a shame because both of these projects (io.js and nw.js) are very exciting news for the Node community as a whole and are very well done projects! I don't mean to disparage the work of those teams whatsoever, they are doing a fantastic job.

[+] _greim_|11 years ago|reply
People who can build amazing technologies, and people who can explain amazing technologies and make them accessible to a wider audience, are not always the same people. I think you're doing the right thing by creating PRs and helping that discussion along; I hope they listen and that the public-facing info improves.

[edit] Not to say they're never the same people, just that to expect those two skills to always coincide is unreasonable, IMO.

[+] gkya|11 years ago|reply
Regarding that IO.js, it makes me giggle when the first question in FAQ is «What is this?».

I have started hanging around the HN again nowadays, and this is the second link I'm commenting on and fourth or fifth one I have seen where the first one of the comments says «the website tells practically nothing». Also here, the link title (merely «NW.js» at the time I write this) also says nothing, and the linked page is annotated to be under construction. Heck, when presenting your project to the tech world shouldn't one be more cautious and more willing to make it be received better? I mean, just be a little bit more attentive before shouting out «Hey, this is a project I wish the public uses!».

[+] acoyfellow|11 years ago|reply
This looks like a great opportunity for someone who is looking to get a gig for tech copywriting, which can be very lucrative.

Somebody who has experience writing persuasive and informative copy, and can do a PR, you could have yourself a good resume piece :)

[+] moondowner|11 years ago|reply
"NW.js appears to be some sort of "break" from node-webkit, and the copy on the main site seems to suggest that it is an entirely new project"

It's seems that it's the same project. The GitHub page says: "node-webkit is renamed NW.js" https://github.com/nwjs/nw.js

[+] mcantelon|11 years ago|reply
The io and NW sites were likely rushed to get something out there to correspond with the io release. My guess is they'll get things cleaned up in short order.
[+] deanclatworthy|11 years ago|reply
I think you have got your marketing messages the wrong way around. Your primary message should be that you can leverage web technologies to build native apps. I think the node thing is secondary to that.
[+] sjs382|11 years ago|reply
It's strange that the icon is a compass, but it's pointing NE (instead of NW).
[+] taeric|11 years ago|reply
Compass needles always point N. If you are looking at a compass and you see one like this, then you are facing NW. (Unless I am completely forgetting how compasses work, of course.)
[+] shittyanalogy|11 years ago|reply
the logo is a combination of webkit's and node's.
[+] sync|11 years ago|reply
This google group message is particularly revealing: https://groups.google.com/forum/#!msg/nwjs-general/V1FhvfaFI...

Looks like they have migrated to io.js as well.

[+] jdp23|11 years ago|reply
And it also explains why they changed the name from node-webkit: "because both parts of the name are irrelevant now" (since they're on io.js and Chromium).
[+] mnutt|11 years ago|reply
In addition to the node/iojs reasoning, I think nw.js is a clearer name. Node-webkit makes it sound like it's just webkit bindings for node, whereas it's quite a bit more than that. Fusing the node and webkit runloops together is really pretty amazing.
[+] azinman2|11 years ago|reply
Only through these comments could I even learn what this does -- build desktop apps in javascript. "NW.js lets you call all Node.js modules directly from DOM and enables a new way of writing applications with all Web technologies." does not tell me that... I thought it meant that in an ordinary web page I could 'require' node modules that used node APIs like stream.

It is all about desktop apps, right?

[+] S4M|11 years ago|reply
Honestly, I wonder why they don't bother to put an example on the main page. Looking at the github repo of the project [0] (which doesn't have a folder "example" as well), it says:

    node-webkit is an app runtime based on Chromium and node.js. You can write native apps in HTML and JavaScript with node-webkit. 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.
So I suppose it's about desktop apps ("native" must mean "desktop").

[0] https://github.com/nwjs/nw.js

[+] api|11 years ago|reply
I've been following this as node-webkit for a while. It's like Qt Quick except it leverages all that's been built for the web and you don't need to waste mental bandwidth learning another new thing.

(Not that I'm against learning new things, but I only do so when there is a reward. Qt Quick isn't "enough better" than the web to justify it.)

[+] mackwic|11 years ago|reply
Especially the full compatibility with all the HTML/CSS/JS widgets for UI, and the npm packages for computing/interfacing.

I have a lot of pleasure to ship software developed with nwjs, there's plenty of choice and the issues are well known (esp. for a new thing like this).

[+] z3t4|11 years ago|reply
NW.js has both the Browser JavaScript API's and the Node.js API's. It is bleeding edge technology witch enable you to make desktop applications the same way you make web apps.

It can be weird if you are used to HTTP server > client as it's possible within a script tag to use Node.js API's.

An advantage with going desktop instead of browser is that you can do much more and it's easier to sell your application. There are for example already games on Steam that are just web apps, but using NW and run "natively" on the desktop.

You do not need an SDK, or full blown IDE, just use your usual tools. I program in Notepad myself. Just write html and JS files and treat NW as just another browser. Then package and distribute your app and the user wont notice or care that they are using a "browser".

[+] hitlin37|11 years ago|reply
nice to see node-webkit in a new form. nw.js looks to be the right tool to write cross-platforms apps. I used some of the apps written using node-webkit and they run great on ubuntu/linux. I've been thinking of re-writing an old application (written using xulrunner) into a nw.js app. Since i'm new to nw.js, its probably good to ask here. As i understand node suits for the application where I/O are required. My application talks a lot from hardware such as getting setting files using network, sending status over the same. The application has its own protocol for talking over the network socket with other devices over the network. Is nw.js is a good choice for such an app?
[+] mackwic|11 years ago|reply
Seems like it is.

We use nwjs with lot of files + sqlite3[1] + bluetooth + http + child synchronization for tasks in other languages[2].

It works well, scale well, is cross-platform with changing very few of the application code (the build process is quite complex, thought).

Also, building an html with bootstrap, eventually with the chrome developer tools, takes agility to a whole new level when we speak about desktop applications.

[1] With http://bookshelfjs.org/ but http://sequelizejs.com/ is better in most cases

[2] With https://github.com/primus/primus we spawn watchdogs which run processes (via http://nodejs.org/api/child_process.html). It's very effective.

[+] Gurkenmaster|11 years ago|reply
But from a distribution perspective it's terrible compared to the web where you just need to type in the url into your browser. There is no central installer, that means you either have to ship NW.js(about 100MB) for every application or you have to trust your users to put it into the PATH.
[+] kbody|11 years ago|reply
Any worthy changes or just the name? Like for instance using libchromiumcontent instead of building chromium like https://github.com/atom/atom-shell ?

I also like the node way of not forcing a window and instead using an entry.js to bootstrap anything you want, more freedom, especially handy on tray apps.

[+] alphaomegacode|11 years ago|reply
Great projects & comments.

Am I correct in assuming that the end users need Node Webkit (or NWjs) installed before this runs? That means Node as well?

Instead of doing proof of projects in C# or Obj-C or C++, this could be a great time saver.

I've seen the build instructions but it seems they all need Node installed and the node-webkit path referenced.

[+] faboo|11 years ago|reply
It depends on how you've packaged your application. Technically, yes, the user needs NW.js to run your application, but you can ship with NW.js if you like (it's just one fat executable). When NW.js is run, it looks for a NW.js app to run in the working directory, so all the user needs to do is run the NW.js binary you provided and it will launch your app.
[+] beefman|11 years ago|reply
I've been making desktop apps for clients with node-webkit for over a year now, and it's a dream. Popcorn Time and Light Table are both built on it (the latter being written in ClojureScript). Happy to see this change and can't wait to try it out!
[+] chrisrickard|11 years ago|reply
Much better name imho. I love node-webkit, although at the moment I am grappling with mp3 support (finding the right version of ffmpegsudo.so that works with the latest nw version)
[+] mkohlmyr|11 years ago|reply
Wrote my first node-webkit app the other week, pretty enjoyable experience overall. Very easy to do as someone with web development experience. Also it seemed appropriate as I was already running https://github.com/mixu/nwm as my window manager ;)
[+] premasagar|11 years ago|reply
Ooops. I keep reading it as nsfw.js - I'm not sure what that module would do.

Congrats to the NW team.

[+] TheAceOfHearts|11 years ago|reply
I haven't used this new release, but I've played around with it when it was node-webkit. I love the idea of it... But when using it, I found the tooling was lacking. Developing anything on it was tedious :(.
[+] quickvi|11 years ago|reply
Has anyone been able to combine this with python? I have some python ML code that would be difficult to port to js and it would be nice to be able to pack everything together.
[+] _greim_|11 years ago|reply
What's the main use case for this? (e.g. Android or iOS apps, or desktop apps, all of the above, or something else?)
[+] thomasfoster96|11 years ago|reply
Desktop apps. It's Node and Chromium together, so you can have a desktop app written in HTML and JavaScript and have access to the APIs that come with Node (so you have access to the file system, etc.).
[+] rtpg|11 years ago|reply
Is this a Node-webkit runtime? Like, I install this, and all node-webkit projects can stop bundling NW with the releases?