Slide 1

Slide 1 text

ੌ۩౟ۿ द੘ೠ׮Ҋ ੹೧ۄ how to get started with Electron @ragingwind electron-kr

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

Build - Electron: Desktop Apps with Web Languages - http://goo.gl/K6pAiO

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Web Tech Use HTML, CSS, and JavaScript with Chromium and Node.js to build your app - Any Web Frameworks and Libraries - React, AngularJS, Polymer, WinJS, jQuery, Bootstrap, Photonkit … - Node integration issue [1], [2] - Latest Chromium via libchromiumcontent - Chromium Content API, Webkit API(V8) - Bumped new stable Chrome version within one or two weeks after release - Chromium: v47.0.2526.110, V8: v4.7.80.27 - Stable and Latest APIs on Node.js - Upgrading after a month to avoid bugs - Ready to latest features going with V8 upgrades - v5.1.1 (Node.js stable v5.4.1) - ES2015 shipping features is default - Supporting from over 200,000 npm packages by Electron v0.36.4 -2016/01/16

Slide 7

Slide 7 text

Polymer Starter Kit https://github.com/electron-kr/electron-psk-boilerplate

Slide 8

Slide 8 text

WinJS + React https://github.com/felixrieseberg/electron-windows-sample

Slide 9

Slide 9 text

Photonkit http://react-photonkit.github.io

Slide 10

Slide 10 text

Eddystone (Beacon) https://goo.gl/cCsUIj

Slide 11

Slide 11 text

Open Source Electron is open source; maintained by GitHub and an active community - Github !!! - Supporting from powerful-big-vendors - Many of Open source apps as a sample - Got blessed by npm module developers

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

awesome-electron by Sindre Sorhus https://github.com/sindresorhus/awesome-electron#open-source

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

Yeoman Official Generator
 built on top of Electron https://github.com/yeoman/yeoman-app

Slide 19

Slide 19 text

Cross Platform Electron apps build and run on Mac, Windows, and Linux - One-stop build for Electron apps - Auto update
 except Linux so far - MAS (Mac App Store) Submission - ARM devices support - Platform features

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

- Squirrel/Squirrel.Windows · GitHub - https://goo.gl/O6nvbb
 - Squirrel/Squirrel.Mac: Cocoa framework for updating OS X apps - https://goo.gl/DvnGsa - atom/grunt-electron-installer: Grunt plugin to build Windows installers for Electron apps - https://goo.gl/1KerLO

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

Desktop Environment Integration

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

Electron Somethings we should know - Node.js, npm - Web technologies - Platform features - Electron Architecture - Running Electron app - Debugging and Testing Electron app - Packaging Electron app

Slide 27

Slide 27 text

Practice on embedding Node.js into Atom Editor // Speaker Deck - https://goo.gl/ENyzp9

Slide 28

Slide 28 text

Build - Electron: Desktop Apps with Web Languages - https://goo.gl/uoSpk2

Slide 29

Slide 29 text

Practice on embedding Node.js into Atom Editor // Speaker Deck - https://goo.gl/ENyzp9

Slide 30

Slide 30 text

Electron initialization for browser process

Slide 31

Slide 31 text

Practice on embedding Node.js into Atom Editor // Speaker Deck - https://goo.gl/ENyzp9

Slide 32

Slide 32 text

Electron event loop pseudo sequence

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Electron Installation Get Electron - Build with source on Mac - Download released files - electron-prebuilt

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

Setup and launch app without source

Slide 37

Slide 37 text

Electron, Hello Hello! - Project tree of Electron App ȍȇȇ index.js ȍȇȇ package.json ȍȇȇ index.html ȍȇȇ index.css ȍȇȇ license Ȍȇȇ readme.md - index.js is MUST. 
 Entry point of Electron app
 - package.json is SHOULD. 
 For dependencies and project info - index.html is.
 for view of Electron app but not requirement

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

Hello world on Electon

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

eddystone-beacon-menubar-scanner - https://goo.gl/1n01iC

Slide 46

Slide 46 text

- Inspector via Chrome Dev Tools - node-inspector for Debugging
 on Main Process - console.log or LOG(INFO) - Automated testing - Chrome Driver for Electron - spectron Electron Testing npm test

Slide 47

Slide 47 text

Testing your Electron apps with ChromeDriver // Speaker Deck - https://goo.gl/meIP9R

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

Test Electron app with spectron and ava

Slide 51

Slide 51 text

Electron Packaging Ready to shipping - Packaging via electron-packager - Installer via electron-builder - Signing helper for MAS - App packaging with asar - Like tar but no extract, random access - Avoiding of exposing app’s source code - Code protection? - Not supporting a way of code protection on Electron - mksnapshot, (V8) Snapshot for Electron - Packaging with asar - Using commercial software for protection - Using edge.js and edge-atom-shell for Windows (Slack) - Using dynamic library loader via node-ffi

Slide 52

Slide 52 text

asar

Slide 53

Slide 53 text

electron-packager . newapp --out=dist --ignore='^/dist$' --prune --asar --all -- version=0.36.5

Slide 54

Slide 54 text

Life is short, boiler-platings are too much

Slide 55

Slide 55 text

Using generator-electron via Yeoman

Slide 56

Slide 56 text

- Well-structured project - Up-to-date features and updates - Neat(-est) source code of boilerplate - Prepared configure and scripts sindresorhus/generator-electron: Scaffold out an Electron app boilerplate - https://goo.gl/rMOGCp

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

Thanks.