
Building a desktop application with Electron - bojzi
https://medium.com/@bojzi/building-a-desktop-application-with-electron-204203eeb658
======
sktrdie
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.

~~~
aikah
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.

~~~
big_paps
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...

~~~
touristtam
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.

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

~~~
bojzi
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.

------
thom_nic
I made a simple demo/ starter app in Electron right around the time when the
project was renamed from Atom-Shell. [https://github.com/thom-nic/electron-
demo/](https://github.com/thom-nic/electron-demo/)

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

~~~
bojzi
That looks pretty cool and I love that there's a ready made gulp file for most
of the common tasks. :)

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

~~~
yesimahuman
We are doing some larger scale desktop stuff with Ionic right now, and someone
from the community wrote about doing something similar:
[http://www.raymondcamden.com/2015/07/23/some-initial-
thought...](http://www.raymondcamden.com/2015/07/23/some-initial-thoughts-on-
building-desktop-apps-with-ionic-and-electron)

It's interesting. Not sure where we'll take it, but I love the idea of one
code base running everywhere, including desktop.

~~~
pbreit
The "one" code base is sorta interesting but I really like the one, relatively
easy programming model.

------
anoldgangstah
great great turotial, Coming from php I've learned a lot in minutes.

------
knocte
_facepalm_

