Successfully reported this slideshow.

Electron - Solving our cross platform dreams?

0

Share

1 of 19
1 of 19

Electron - Solving our cross platform dreams?

0

Share

Download to read offline

I'm back at the infamous FOSDEM, this time to talk about how the Electron framework may or may not help our cross-platform dreams.

I'm back at the infamous FOSDEM, this time to talk about how the Electron framework may or may not help our cross-platform dreams.

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

Electron - Solving our cross platform dreams?

  1. 1. Electron, solvingour cross-platform* dreams? FOSDEM 2017 @chrischinch *Desktop
  2. 2. –Sun Microsystems, 1995 “Write once, run anywhere”
  3. 3. Enter Electron
  4. 4. Use any of these?
  5. 5. What is it? • From GitHub* • JavaScript as a ‘desktop’ Application • Version 1.5 released last week *You might have heard of them
  6. 6. Install and Setup npm install -g electron npm install electron —save-dev brew install Caskroom/cask/electron
  7. 7. For GUI fans
  8. 8. For CLI fans electron .
  9. 9. An Electron project index.html: The web page rendered by default. main.js: Starts app and creates a browser window to render HTML. package.json: Lists application dependencies, meta data and files needed.
  10. 10. main.js const electron = require('electron');
 const app = electron.app;
 const BrowserWindow = electron.BrowserWindow;
 
 var mainWindow = null;
 
 app.on('window-all-closed', function() {
 if (process.platform != 'darwin') {
 app.quit();
 }
 });
 
 app.on('ready', function() {
 mainWindow = new BrowserWindow({width: 800, height: 600});
 mainWindow.loadURL('file://' + __dirname + '/app/index.html');
 mainWindow.on('closed', function() {
 mainWindow = null;
 });
 });
  11. 11. The app
  12. 12. Packaging • Create asar archive • Copy files into Electron app • Rename, distribute, etc… • Use 3rd party tool 👍
  13. 13. Electron Packager electron-packager /Users/chrisward/Workspace/sp_electron MarvelBrowse --platform=darwin --arch=x64 --asar --prune --out=/Users/chrisward/Workspace --overwrite --icon=/Users/chrisward/Workspace/sp_electron/marvel-app.icns
  14. 14. Going native • Notifications • Recent documents • Menus • Progress bars, thumbnails, represented file, dock, System preferences…
  15. 15. Negatives • Application size • CPU • Memory • Not-native • Platform inconsistencies
  16. 16. Thank You! Chris Ward gregariousmammal.com @chrischinch Developer Relations & Technical Writer I have stickers and merchandise!

×