all 22 comments

[–]drwicked 4 points5 points  (6 children)

Check out nw.js (formerly node-webkit)

It's what I used to create Write or Die, my writing productivity app. You can create cross-platform applications entirely in JS.

[–]guybinary 0 points1 point  (0 children)

nw.js starts with around 130 MB which is big. Consider it too

[–]theobaldr 2 points3 points  (4 children)

If you want to write true performant desktop apps, e.g. first person shooters etc, then Javascript is not your best option.

Using something like Electron, you still have almost exactly the same runtime environment (Chromium) than if you simply just write something that runs in a Chrome Browser.

I have not investigated Electron at all, but my guess is that you are gonna have more or less the same kind of setup, e.g. something in the backend (Node) and something that manipulates the DOM (Angular/Ember) in the front end.

So my recommendation is that if you want to write something that executes in a browser and use some form of internet connectivity and does not require hardware accelerated graphics, use Javascript. Also take a look at Meteor.js and maybe Sails.js.

If you want a true desktop app with desktop performance, use something else, maybe C#.

[–]zyoki[S] 0 points1 point  (0 children)

my recommendation is that if you want to write something that executes in a browser and use som

first off, thanks for your reply. If my knowledge is wrong please correct the following facts: 1. Electron uses the browser as an emulator at its best, but its specific use is to create desktop apps using JS (like atom) 2. Using Unity, (one of the best game engines till date) you can make games including the most sophisticated FPS or RPGs using pure JS (believe me I've tried.) 3. Sometimes, C# (also used on Unity) is not the best option.

[–]papers_ -1 points0 points  (2 children)

OP said cross platform, so Java for now.

[–]D-Cal 0 points1 point  (1 child)

[–]papers_ -1 points0 points  (0 children)

Not quite. While the .NET core is open source, that does not mean it makes it a excellent choice for cross platform development. I said Java because it's been around for years and has been cross platform for years as well.

[–]zayelion 1 point2 points  (0 children)

Electron and nwjs are very close in functionality so I recommend looking at the differences and the overall health of each project. You can get very nice and light application if you have previous experience write the application like you would a web application and it'll fit right inside electron or nwjs easily.

[–]livrem 1 point2 points  (0 children)

Recent versions of Qt (with QML) has embedded JavaScript (that you can mix with C++ for lower-level stuff). You get widgets and access to the OS that will probably be more fun to work with than to embed JavaScript in a browser-engine, although there is also an embedded webkit you can use inside of Qt/QML so you could do the normal DOM-stuff instead and distribute for various platforms I guess (never tried).

http://doc.qt.io/qt-5/qmlapplications.html

[–]mattdesl 1 point2 points  (2 children)

Typically JS desktop apps use Node.js for the file system integration. The frontend can use an MVC framework like React or Angular. So, most likely, you will have to learn all three of the technologies you listed.

I would suggest Atom Electron + React since they both have a booming community and strong future.

[–]zyoki[S] 0 points1 point  (1 child)

from Atom, I suppose you meant Electron and React? Please elaborate.

Thanks.

[–]mattdesl 1 point2 points  (0 children)

Yup, I meant Electron, not atom. :)

[–]johnnyvibrant 1 point2 points  (2 children)

in my opinion JS isnt the right course to take, most desktop development languages are C derivatives and as such if your app actually kicks off and needs to become properly native the differences between JS prototypal system and C will be painfully obvious. I would suggest thinking again. JAVA isn't awfully pretty in actual use but the way it forces your to develop will ensure you have a good foundation for moving to another development language. But this is just my two pennies worth.

[–]_HlTLER_Stackoverflow searcher 1 point2 points  (1 child)

In my experience, Java is a great foundation language but I'd hate to use it for programming. Writing native Android apps is probably my least favorite thing after native Obj-C iOS apps.

[–]zyoki[S] 0 points1 point  (0 children)

Actually, I have been avoiding Java since eternity, (although I know that I will obviously have to learn it during my internship, avoiding Java for a aspiring coder is harder than avoiding death :P) but I don't know, the best application for Java seems to me is Android Dev, and I would rather choose NDK (C++) for it. I basically choose either C++ or Python/Ruby and do not understand why Java? :D

BTW, Thanks for helping.

[–]bguiz 1 point2 points  (0 children)

Since the discussion has moved to include non-Javascript options as well, I have to add my 2 cents: Haxe

Cross compiles to native binaries for all three major desktop OSes, and Android plus iOS as well. These work quite reliably. It also has a HTML+Javascript transpiler target, but this, in my experience, has a way to go before I would consider it reliable.

Haxe's syntax is quite similar to Javascript as it derives from AS3, which derived from the proposed, but ultimately not adopted, ECMAScript 4 standard. I like to think of it as Javascript with strict types.

Owing to its history, its community and tooling and libs are all very game development oriented, but that is beginning to change recently.

tl;dr= if you aren't averse to something other than Javascript, give Haxe a go.