Building DesktopApplications with ElectronSteve Kinney — @stevekinney
View Slide
Electron (née Atom Shell)
Electron (née Atom Shell)A framework for building cross-platform desktopapplications with web technologies.
So, why would you want touse this Electron thing?
You want to build an applicationthat has advanced permissionslike accessing the file system.
You want to build a smallapplication that lives in theuser’s menubar or system tray.
You want to build an appthat works well offline.
You want to be able toCommand/Alt-Tab to yourapplication.
You want to build a GUIfor your Nodeapplication.
@noopkat
sindresorhus/caprine
Why is Electron sosuper cool?
Chrome Content ModuleHTML5 supportGPU accelerationBlink and V8
Node 6.5.0Filesystem accessNative modules
Electron uses a prettymodern build of Chromium.Electron: 1.4.6Node: 6.5.0Chromium: 53.0.2785.143V8: 5.3.332.47
HTML ImportsShadow DOMCustom ElementsWeb MIDI API(…and other hard to draw APIs…)
The web browser lives in a kind ofsandbox with a bunch of restrictionsin place in the name of security.
Electron applicationshave all of the freedom ofany other Node process.
require(…);
You get to choose.
muan/mojibar
How does Electronwork?
Let's take a look at aeverything from a highlevel before we dig in.
npm install -gelectron
Inherently,offline first.
Building a menu
And more…
versus
No good.
electron.remote
npm install menubar
Distribution
npm installelectron-packager
npm installelectron
What about JSXor SASS or LESS?
npm installelectron-prebuilt-compilenpm installelectron-packager-compile
Want better insight intothe user's macOS settings?
npm installelectron-osx-appearance
What about an applicationthat launches when the OSboots?
npm installauto-launch
Need a graphical userinterface for sudo?
npm installelectron-sudo
Want to have localshortcuts that aren't menuitems?
npm installelectron-localshortcut
Want to use the latest andgreatest features comingto JavaScript?
npm installbabel-preset-electron
Did watching me try tomanage state make youwant to cry?
npm installelectron-redux
What aboutEmber CLI?
ember installember-electron
sindresorhus/awesome-electron
Fin.