SlideShare a Scribd company logo
1 of 19
Download to read offline
Electron, solvingour
cross-platform* dreams?
FOSDEM 2017
@chrischinch
*Desktop
–Sun Microsystems, 1995
“Write once, run anywhere”
Enter Electron
Use any of these?
What is it?
• From GitHub*
• JavaScript as a ‘desktop’
Application
• Version 1.5 released last week
*You might have heard of them
Install and Setup
npm install -g electron
npm install electron —save-dev
brew install Caskroom/cask/electron
For GUI fans
For CLI fans
electron .
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.
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;

});

});
The app
Packaging
• Create asar archive
• Copy files into Electron app
• Rename, distribute, etc…
• Use 3rd party tool 👍
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
Going native
• Notifications
• Recent documents
• Menus
• Progress bars, thumbnails,
represented file, dock, System
preferences…
Negatives
• Application size
• CPU
• Memory
• Not-native
• Platform inconsistencies
Thank You!
Chris Ward
gregariousmammal.com
@chrischinch
Developer Relations & Technical Writer
I have stickers and merchandise!

More Related Content

What's hot

Running Selenium tests on CI server
Running Selenium tests on CI serverRunning Selenium tests on CI server
Running Selenium tests on CI server
Aleksandr Zhuikov
 

What's hot (20)

Building high-performance web applications with Preact
Building high-performance web applications with PreactBuilding high-performance web applications with Preact
Building high-performance web applications with Preact
 
Cross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkitCross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkit
 
Cross-platform Desktop Apps development using HTML, CSS, JS with Electron
Cross-platform Desktop Apps development using HTML, CSS, JS with ElectronCross-platform Desktop Apps development using HTML, CSS, JS with Electron
Cross-platform Desktop Apps development using HTML, CSS, JS with Electron
 
Background Thread
Background ThreadBackground Thread
Background Thread
 
Using Prometheus to monitor your build pipelines
Using Prometheus to monitor your build pipelinesUsing Prometheus to monitor your build pipelines
Using Prometheus to monitor your build pipelines
 
Whatsmeteor a whatsApp like Chat App writen in Meteorjs
Whatsmeteor a whatsApp like Chat App writen in MeteorjsWhatsmeteor a whatsApp like Chat App writen in Meteorjs
Whatsmeteor a whatsApp like Chat App writen in Meteorjs
 
Vorlon.js
Vorlon.jsVorlon.js
Vorlon.js
 
Erlang On Xen @ Kiev Functional Programming event, Aug 3 2013
Erlang On Xen @ Kiev Functional Programming event, Aug 3 2013Erlang On Xen @ Kiev Functional Programming event, Aug 3 2013
Erlang On Xen @ Kiev Functional Programming event, Aug 3 2013
 
2016 05-cloudsoft-amp-and-brooklyn-new
2016 05-cloudsoft-amp-and-brooklyn-new2016 05-cloudsoft-amp-and-brooklyn-new
2016 05-cloudsoft-amp-and-brooklyn-new
 
Getting started with k8
Getting started with k8Getting started with k8
Getting started with k8
 
Debugging with VS2019
Debugging with VS2019Debugging with VS2019
Debugging with VS2019
 
SKILLWISE_SELENIUM
SKILLWISE_SELENIUMSKILLWISE_SELENIUM
SKILLWISE_SELENIUM
 
Hot deploy
Hot deployHot deploy
Hot deploy
 
Running Selenium tests on CI server
Running Selenium tests on CI serverRunning Selenium tests on CI server
Running Selenium tests on CI server
 
WebNano - Ideas for Web Frameworks
WebNano - Ideas for Web FrameworksWebNano - Ideas for Web Frameworks
WebNano - Ideas for Web Frameworks
 
Cloud agnostic serverless with fn project
Cloud agnostic serverless with fn projectCloud agnostic serverless with fn project
Cloud agnostic serverless with fn project
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyaml
 
vBrownBag DevOps Series: Puppetinabox
vBrownBag DevOps Series: PuppetinaboxvBrownBag DevOps Series: Puppetinabox
vBrownBag DevOps Series: Puppetinabox
 
Kruize
KruizeKruize
Kruize
 
Postmortem of a uwp xaml application development
Postmortem of a uwp xaml application developmentPostmortem of a uwp xaml application development
Postmortem of a uwp xaml application development
 

Viewers also liked

ParisJS #10 : PhantomJs
ParisJS #10 : PhantomJs ParisJS #10 : PhantomJs
ParisJS #10 : PhantomJs
Maurice Svay
 

Viewers also liked (20)

Entrez dans le mouvement Maker à l’aide des technologies Microsoft
Entrez dans le mouvement Maker à l’aide des technologies MicrosoftEntrez dans le mouvement Maker à l’aide des technologies Microsoft
Entrez dans le mouvement Maker à l’aide des technologies Microsoft
 
SimpleDb, an introduction
SimpleDb, an introductionSimpleDb, an introduction
SimpleDb, an introduction
 
Content Management Systems and Refactoring - Drupal, WordPress and eZ Publish
Content Management Systems and Refactoring - Drupal, WordPress and eZ PublishContent Management Systems and Refactoring - Drupal, WordPress and eZ Publish
Content Management Systems and Refactoring - Drupal, WordPress and eZ Publish
 
Why you should come to DrupalSouth
Why you should come to DrupalSouthWhy you should come to DrupalSouth
Why you should come to DrupalSouth
 
Scaling Social Games
Scaling Social GamesScaling Social Games
Scaling Social Games
 
Mongrel2, a short introduction
Mongrel2, a short introductionMongrel2, a short introduction
Mongrel2, a short introduction
 
A Documentation Crash Course, LinuxCon 2016
A Documentation Crash Course, LinuxCon 2016A Documentation Crash Course, LinuxCon 2016
A Documentation Crash Course, LinuxCon 2016
 
Offre développeur Javascript Back-end
Offre développeur Javascript Back-endOffre développeur Javascript Back-end
Offre développeur Javascript Back-end
 
Contentful Berlin Offices
Contentful Berlin OfficesContentful Berlin Offices
Contentful Berlin Offices
 
Erlang introduction geek2geek Berlin
Erlang introduction geek2geek BerlinErlang introduction geek2geek Berlin
Erlang introduction geek2geek Berlin
 
Automate your docs, automate yourself
Automate your docs, automate yourselfAutomate your docs, automate yourself
Automate your docs, automate yourself
 
The Anatomy of Content Management (workshop by J Gollner at Intelligent Conte...
The Anatomy of Content Management (workshop by J Gollner at Intelligent Conte...The Anatomy of Content Management (workshop by J Gollner at Intelligent Conte...
The Anatomy of Content Management (workshop by J Gollner at Intelligent Conte...
 
AWS Lambda in infrastructure
AWS Lambda in infrastructureAWS Lambda in infrastructure
AWS Lambda in infrastructure
 
Le futur de Drupal et des applications web
Le futur de Drupal et des applications webLe futur de Drupal et des applications web
Le futur de Drupal et des applications web
 
Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...
Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...
Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...
 
Devoxx France 2015 - Se préparer à l'arrivée d'Angular 2
Devoxx France 2015 - Se préparer à l'arrivée d'Angular 2Devoxx France 2015 - Se préparer à l'arrivée d'Angular 2
Devoxx France 2015 - Se préparer à l'arrivée d'Angular 2
 
Back to the future with static site generators
Back to the future with static site generatorsBack to the future with static site generators
Back to the future with static site generators
 
ParisJS #10 : PhantomJs
ParisJS #10 : PhantomJs ParisJS #10 : PhantomJs
ParisJS #10 : PhantomJs
 
Erlang as a cloud citizen, a fractal approach to throughput
Erlang as a cloud citizen, a fractal approach to throughputErlang as a cloud citizen, a fractal approach to throughput
Erlang as a cloud citizen, a fractal approach to throughput
 
Google : Prise en charge de l'Ajax et de l'Angular JS
Google : Prise en charge de l'Ajax et de l'Angular JSGoogle : Prise en charge de l'Ajax et de l'Angular JS
Google : Prise en charge de l'Ajax et de l'Angular JS
 

Similar to Electron - Solving our cross platform dreams?

Similar to Electron - Solving our cross platform dreams? (20)

Building Cross Platform Apps with Electron
Building Cross Platform Apps with ElectronBuilding Cross Platform Apps with Electron
Building Cross Platform Apps with Electron
 
Electron
ElectronElectron
Electron
 
Electron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easyElectron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easy
 
Electron
ElectronElectron
Electron
 
Electron Firenze 2020: Linux, Windows o MacOS?
Electron Firenze 2020: Linux, Windows o MacOS?Electron Firenze 2020: Linux, Windows o MacOS?
Electron Firenze 2020: Linux, Windows o MacOS?
 
Electron: Linux, Windows or Macos?
Electron: Linux, Windows or Macos?Electron: Linux, Windows or Macos?
Electron: Linux, Windows or Macos?
 
Bringing Javascript to the Desktop with Electron
Bringing Javascript to the Desktop with ElectronBringing Javascript to the Desktop with Electron
Bringing Javascript to the Desktop with Electron
 
Get that Corner Office with Angular 2 and Electron
Get that Corner Office with Angular 2 and ElectronGet that Corner Office with Angular 2 and Electron
Get that Corner Office with Angular 2 and Electron
 
Clojure.tokyo.descjop
Clojure.tokyo.descjopClojure.tokyo.descjop
Clojure.tokyo.descjop
 
Electron presentation
Electron presentationElectron presentation
Electron presentation
 
SenchaCon 2016: Advanced Techniques for Buidling Ext JS Apps with Electron - ...
SenchaCon 2016: Advanced Techniques for Buidling Ext JS Apps with Electron - ...SenchaCon 2016: Advanced Techniques for Buidling Ext JS Apps with Electron - ...
SenchaCon 2016: Advanced Techniques for Buidling Ext JS Apps with Electron - ...
 
Desktop apps with Electron... for fun and profit
Desktop apps with Electron... for fun and profitDesktop apps with Electron... for fun and profit
Desktop apps with Electron... for fun and profit
 
Cross-Platform Desktop Apps with JavaScript
Cross-Platform Desktop Apps with JavaScriptCross-Platform Desktop Apps with JavaScript
Cross-Platform Desktop Apps with JavaScript
 
React Native for multi-platform mobile applications
React Native for multi-platform mobile applicationsReact Native for multi-platform mobile applications
React Native for multi-platform mobile applications
 
React_Complete.pptx
React_Complete.pptxReact_Complete.pptx
React_Complete.pptx
 
Electron. Build cross platform desktop apps with web technologies!
Electron. Build cross platform desktop apps with web technologies!Electron. Build cross platform desktop apps with web technologies!
Electron. Build cross platform desktop apps with web technologies!
 
Modern frontend in react.js
Modern frontend in react.jsModern frontend in react.js
Modern frontend in react.js
 
NativeScript 環境のインストールとはじめてのプロジェクト実行
NativeScript 環境のインストールとはじめてのプロジェクト実行NativeScript 環境のインストールとはじめてのプロジェクト実行
NativeScript 環境のインストールとはじめてのプロジェクト実行
 
Intro to Android Programming
Intro to Android ProgrammingIntro to Android Programming
Intro to Android Programming
 
Local SQLite Database with Node for beginners
Local SQLite Database with Node for beginnersLocal SQLite Database with Node for beginners
Local SQLite Database with Node for beginners
 

More from Chris Ward

More from Chris Ward (19)

Android Programming without Java
Android Programming without JavaAndroid Programming without Java
Android Programming without Java
 
The past, present and future of swift, Voxxed Belgrade 2016
The past, present and future of swift, Voxxed Belgrade 2016The past, present and future of swift, Voxxed Belgrade 2016
The past, present and future of swift, Voxxed Belgrade 2016
 
Always Listening User Experience
Always Listening User ExperienceAlways Listening User Experience
Always Listening User Experience
 
JS, CMS, untangle the mess
JS, CMS, untangle the messJS, CMS, untangle the mess
JS, CMS, untangle the mess
 
Extend Drupal with a CRM, DrupalGov 2013
Extend Drupal with a CRM, DrupalGov 2013Extend Drupal with a CRM, DrupalGov 2013
Extend Drupal with a CRM, DrupalGov 2013
 
Drupal DevOps - Melbourne DevOps July 2013
Drupal DevOps - Melbourne DevOps July 2013Drupal DevOps - Melbourne DevOps July 2013
Drupal DevOps - Melbourne DevOps July 2013
 
Removing Barriers in Engagement - Melbourne Geek Night, July 2013
Removing Barriers in Engagement - Melbourne Geek Night, July 2013Removing Barriers in Engagement - Melbourne Geek Night, July 2013
Removing Barriers in Engagement - Melbourne Geek Night, July 2013
 
Power your mobile app with Drupal - Melbourne Mobile, July 2013
Power your mobile app with Drupal - Melbourne Mobile, July 2013Power your mobile app with Drupal - Melbourne Mobile, July 2013
Power your mobile app with Drupal - Melbourne Mobile, July 2013
 
Tweak, Test and Debug your mobile apps from Web directions code 13
Tweak, Test and Debug your mobile apps from Web directions code 13Tweak, Test and Debug your mobile apps from Web directions code 13
Tweak, Test and Debug your mobile apps from Web directions code 13
 
Why your image of the world could be wrong
Why your image of the world could be wrongWhy your image of the world could be wrong
Why your image of the world could be wrong
 
Take your drupal sites offline
Take your drupal sites offlineTake your drupal sites offline
Take your drupal sites offline
 
Green Renters' Giant Green Games
Green Renters' Giant Green GamesGreen Renters' Giant Green Games
Green Renters' Giant Green Games
 
Customising civicrm
Customising civicrmCustomising civicrm
Customising civicrm
 
Drupal - Melbourne cryptoparty
Drupal - Melbourne cryptopartyDrupal - Melbourne cryptoparty
Drupal - Melbourne cryptoparty
 
HP Lovecraft, laneway learning
HP Lovecraft, laneway learningHP Lovecraft, laneway learning
HP Lovecraft, laneway learning
 
CiviCRM and Wordpress
CiviCRM and WordpressCiviCRM and Wordpress
CiviCRM and Wordpress
 
Blogging with drupal
Blogging with drupalBlogging with drupal
Blogging with drupal
 
Building mobile apps with PhoneGap and Titanium appcelerator
Building mobile apps with PhoneGap and Titanium appceleratorBuilding mobile apps with PhoneGap and Titanium appcelerator
Building mobile apps with PhoneGap and Titanium appcelerator
 
Jquery mobile
Jquery mobileJquery mobile
Jquery mobile
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Electron - Solving our cross platform dreams?