The problem with this is that users have to download a binary of over 40mb just to run a "hello world" app. The whole thing has to embed all of node.js plus all of a browser. I miss the days where to download a crazy complicated app required only 200kb - like uTorrent for example. I know space and bandwidth have gotten cheaper, but there's something about creating an app that only carries the bare essentials that calls for quality.
> The problem with this is that users have to download a binary of over 40mb just to run a "hello world" app.
Sure, but the overhead is pretty fixed. So yes, if all your app does is say "hello world", then the overhead ends up being 99% of the app. But maybe you shouldn't be making an app for that in the first place? If your application actually does something, and has code, and text, and images, and audio, then the overhead is negligible.
The problem is more about using webtechs for the UI than the size of the binary. There is a reason why people aren't massively moving from text editors such as Sublime Text to Webtech based editors like atom : performances. But everything is cyclical, we are just still in the "you can do everything with html and js" era. Go,Nim,Rust,Crystal and others are on their way in. They are statically typed, multithreaded, easier than C and C++ , compiled and can be linked to Gtk,Qt and other multiplateform UI toolkits. Javascript everywhere even where it doesn't make sense is on its way out.
The reason for all this, despite the "man, js is terrible / slow" argument, is just that there are a lot of web-developers out there, with a big bag of tools, frameworks and "to-js"-compilers, wanting to create something, but just don't have the time to learn a complete new cross-plattform infrastructure, which JUST DOESNT REALLY EXISTS.
You have to ponder if its just worth the efforts to build something native or go fast(in terms of development-time) and cross-plattform with sometimes reasonable trade-offs.
If there will be a "mostly unified" UI-Framework for android,ios,win10-mobile,windows, osx and linux for any compiled language, i will be the first to jump onto that waggon...
There has got to be a middle ground where the backend of such application is build on something that is faster and safer while the front end adopts the web languages (HTML/CSS/JS). Specially for application that are not graphically intensive by default.
This is a good introduction. I recently started playing with Electron after being frustrated with trying to get NW.js to install gracefully (without having to edit a binary first).
I'm currently working with node-sodium on a simple E2E encrypted chat app in Electron (for fun only! I'm not reinventing Cryptocat).
Yeah, that's what put me off of NW.js too. The prebuilt Electron binaries, electron-packager and electron-builder are too good to pass up.
That also sounds like a sweet project to learn the ins and outs of Node because you can hack away at a chat app for weeks adding cool features.
I'm sure documentation has improved since then but at the time it was very inconsistent. Also props to the author of this article for doing a clever app that doesn't look like it's a page in a browser window - I wasn't that clever ;)
Still seems like there should be an approach like this to build mobile and desktop? TideKit (split off from Appcelerator Titanium) was giving it a shot but I think might have dissolved.
"It's worth noting that we're not chasing “write once, run anywhere.” Different platforms have different looks, feels, and capabilities, and as such, we should still be developing discrete apps for each platform, but the same set of engineers should be able to build applications for whatever platform they choose, without needing to learn a fundamentally different set of technologies for each. We call this approach “learn once, write anywhere.”"