Post on 16-Apr-2017
Desktop Apps in a Javascript World
Marc MacLeod@marbemac
Me
PHP -> Ruby -> Python -> Node / Go
Vanilla -> Backbone -> Ember -> Meteor -> React
Backend
Frontend
<3 Techstars & Austin
JS Desktop Apps? What’s the difference?
Web
Desktop
access to node
JS Desktop Apps? What’s the difference?
access to packages (npm)
access to OS specific functionality / features
app stores!
Electron Node-Webkit (NW.js) MacGap
Sponsor Github Intel N/A
Node? Yes Yes No
OS X Store Maybe Maybe Yes
Windows Store Yes Yes No
Auto-Update Included? Yes No No
Native OS Bindings Yes Yes Yes
Size > 60mb > 60mb ~1mb
The Landscape
https://github.com/marbemac/electric-tunes
Let’s build an app
Main Process vs Render Processes
main.js
Sprinkle in some Node (io.js)
app.js
Sprinkle in some native
main.js
IPC!
main -> renderrender -> main
Communicating between main and render processes
electron-packager
Distribution
https://github.com/maxogden/electron-packager
Storage / Persistence
HTML5 Local Storage
NEDB (node)https://github.com/louischatriot/nedb
PouchDB (javascript / couch db)http://pouchdb.com/
What else?
Managing a local http server
Manage command line apps via node child_process / spawn
Load dev tools extensions
Auto-Updates (Squirrel Framework)