Hacker News new | past | comments | ask | show | jobs | submit login
NW.js (nwjs.io)
334 points by tommoor on Jan 14, 2015 | hide | past | favorite | 91 comments



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.


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.


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!».


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 :)


A very interesting idea. Although there would not be much lucrative work within the OS community.


"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


Yep. Yet from the homepage copy, you'd think it's something new entirely.

It's a very cool project regardless but it is still the same concept as node-webkit.


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.


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.


It's strange that the icon is a compass, but it's pointing NE (instead of NW).


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.)


I designed the node-webkit icon some time ago. However, it would be a good idea to revise it, maybe create a flat version, which it started out to be. The icon is in fact a combination of the webkit icon (a.k.a pre-yosemite safari app icon) and node.js shape with the colors of intel. On my dribbble you can see the evolution of the icon: https://dribbble.com/Jeroen_Ransijn.

Sadly, I my harddrive crashes completely a while back and all files on my side have been lost. However, Roger Wang still has a PSD, and I e-mailed him if he could send it to me again. He said he still had it and would e-mail it back, but he probably forgot. I'll contact him again. So I can at least properly export the icon, and make it available as a download.

Any suggestions or feedback is always appreciated!


I didn't even consider how compasses actually work when thinking about that logo/icon. I just saw it and it looked wrong. :)

Seems a bit counterintuitive for a logo, but I'm obviously the one that's wrong, here. Sorry!


I can't disagree that it looked wrong, expecially since this wasn't the only thread that commented on this.

However, if you were to change the needle, then it would be wrong. So, I'm not sure that there is a way out of this. Without just dropping the compass.


A "NW" at the top of the compass would help people realize their error.


I think it is great just as it is :) It is a little like a visual version of the confusion first caused by a recursive acronym. [http://en.wikipedia.org/wiki/Recursive_acronym]


This is correct. The compass needle is just a polarized magnet that is floating in solution. One side (usually the red side) points North, and the other side (usually white) points South.

If a person was holding that icon they would be facing Northwest (assuming "front" is at the top of the icon).


So what we're saying is, if you find yourself wanting to use NW.js... maybe you should think about what you're doing, turn a little bit to the right, and stop trying to develop systems out of slinkies?


the logo is a combination of webkit's and node's.


I think this is a really clever combination.


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.


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).


I believe NW will become an acronym for "native web"



A la Rocket Propelled Grenade


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.


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?


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


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.)


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).


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".


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?


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.


thanks for the links. sounds good to look at. Other risk part i have in application is calling hw decoders from gst api for playing mp4 videos. not sure how well that is supported in nw.js especially for intel and arm arch.


the closest example of the application i have would be some sort of kiosk for rail reservation. people come, select journey and time, do the payment and get the printed ticket. For such a scenario, i'm exploring nw.js.


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.


yup. you are right about the size. although in my case, the around 100mb shouldn't be big problem. But i hope something comes up in nw.js that makes it smaller to distribute applications.


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.


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.


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.


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!


Does anyone have a take on how to deal with app's appearance using these kind of tools? While a lot of apps using it look impressive, don't we lose the native look and feel of the OS?


Therefore I wrote https://github.com/tschundeee/maverix as an OSX Theme :)


Maverix looks great. I certainly see a desktop UI theme gaining traction.. Although a lot of work - be super beneficial to provide 'skins' for yosemite/windows10/gnome etc..


I thought about creating a meta CSS UI Framework for every major Desktop UI. Would be great to find some contributors to this endeavor..


well, there is http://webkitgtk.org/ for webkit on linux.


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)


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 ;)


Ooops. I keep reading it as nsfw.js - I'm not sure what that module would do.

Congrats to the NW team.


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 :(.


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.


What's the main use case for this? (e.g. Android or iOS apps, or desktop apps, all of the above, or something else?)


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.).


Is this a Node-webkit runtime? Like, I install this, and all node-webkit projects can stop bundling NW with the releases?


On the GitHub page it says: "node-webkit is renamed NW.js" https://github.com/nwjs/nw.js


By the way, who use nw here ? How ?



For my understanding, does nw.js accomplish the same thing as browserify?


Nah, they're not really related. Browserify handles dependency management on the browser side, while NW.js allows you to build desktop applications using web technologies.


This is the problem in having a vague landing page which doesn't explain anything. While browserify allows you to use node modules in the browser, NW.js (like node-webkit) allows you to build applications by providing a DOM and browser window. Like popcorntime.


Good to know that there is still something going on.

A few months ago I looked into creating desktop apps with JavaScript and found Node-Webkit and the Atom-Shell. AS seemed to bloated for my taste, but I found NW was kinda stale, back in the days.


Can you elaborate a bit more on what you found bloated about Atom-Shell over Node-Webkit?

I've been going down the AS route as I too found Node-Webkit was stale and AS was very active.

I may switch to NW.JS if the reasons are compelling enough though...


Well, AS seemed rather big to me compared to NW.js, also it wanted me to use a special directory structure for my application.


Looks like this is what Peerio was built with.


Not to be That Guy, but why oh why doesn't the compass in their logo point northwest? :)


The compass arrow points to the north, so when it is in the top right, northwest is right on top.


As someone else put it, this means you are heading northwest. If the needle is pointing northwest, your compass is broken!

Amazing how many comments there are about this though. It's a mental illusion, like "what do cows drink?"


Because then you would be traveling north east? That is, I think the point is you are looking at a compass when you are headed north west. (That make sense? Or am I otherwise just off?)



Huh, Safari too. Is this a WebKit thing, or a design "rule of thumb" like clocks being set to ~10:10?


I think it's just a more aesthetically pleasing choice. Instead of just an up and down arrow.


I'll create an issue, I think they're on with a new logo too!


Well, the points of the dial are unlabelled, so maybe it is.


site under construction

I'll just come back tomorrow then. Seriously, though, is this tool complete enough for people that are focused on building things rather than playing with trendy toys?


Where, precisely, does the problem with creative new programming projects lie? Maybe it's a reinvention of the wheel, but surely by now we all know that wheels are constantly re-engineered, with exotic new materials..


I'm not sure what you're assuming I asked, but I was actually asking the question I typed. It's impossible to tell from the site what the point is or if it's accomplishes that point. I was hoping someone on HN knew something about it.


How is this different than the already awesome Meteor which hit version 1.0 not long ago (and I have to admit it is rocking my world right now, love it).

Genuinely intrigued and interested, how is this different/better?

Edit: Oh yeah I forgot HN isn't about answering honest questions, if you dislike something then you downvote it... fucking lame.


I think it's completely different. This essentially lets you build local applications that use the dom as the UI and JS as the controlling language.

The site doesn't do much to explain that though, so here's a presentation:

https://speakerdeck.com/zcbenz/node-webkit-app-runtime-based...

Edit: Oh yeah, sometimes folks do answer honest questions ;)


This is completely different than meteor. Meteor is for making realtime web applications, this is for making desktop applications by leverage existing web technology (html/css/js).


I wonder what performance would be like for multimedia applications or gaming (which are usually written in strongly-typed, compiled langs like C++).


They are different in purpose and features. If anything, Meteor would use Node-Webkit to assist building desktop apps, the same way Meteor is using Phonegap to build mobile apps.


Basically, it's a scriptable desktop application derived from a browser.

Nothing to do with a server framework as it's at the other end of the pipe. ;)


What made you draw the conclusion that this is anything like Meteor?


What made you draw the conclusion that your comment was contributing to the discussion?

That somebody didn't know about deployment (server vs. client) differences between two young frameworks for building single page applications?


Actually I think it would be quite interesting to know what caused the confusion.

My first reaction was that the projects are completely different and the question must have been grounded in a complete misunderstanding of what NW is, but as I think more I realize that there are some notable similarities.

Meteor synchronizes the clients and server in such a way that it seems they're running in the same process on the same machine, and the only thing the developer need worry about is adding some declarative configuration for security and efficiency (obviously this simplifies things a bit).

NW actually makes the client and server run in the same process on the same machine (or rather the parts of the stack that typically run on the client and server respectively).

The parent comment asked a question which may well have provoked an interesting discussion into a topic like this. And although its phrasing may have been a little blunt, it didn't come across as rude. If we assume that evo_9's comment was honest confusion rather than laziness, it's then only fair to assume Kiro's was founded in genuine interest as to where the confusion lies.


I wasn't trying to be snarky. I was just interested.


Apologies, as I misinterpreted your short reply. It was a bit odd have "how is A different than B?" replied to as "well, how is A similar to B?".

Now that I think about it they are both quite similar ("build apps with node.js/html/js/npm") and very different at the same time (webserver vs chromium runtime), so both questions are fair.


Thank you. I agree that they are both similar and different at the same time so I don't find it strange that someone would think it's like Meteor. It would still be interesting to hear his/her reasoning though since I suspect it was due to the lack of real information on the homepage.


They are not playing on the same market, node-webkit is about creating native apps with node + webkit + web technologies. As an example, Popcorn Time is built with node-webkit.


This is quite different to Meteor, allows you to package node and webkit together to create a native-looking desktop application written in Javascript.


People will downvote if it's irrelevant to the discussion.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: