Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Build Cross Platform Desktop Application with E...
Search
WM
October 04, 2015
Technology
910
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Build Cross Platform Desktop Application with Electron
@JSDC.TW 2015
WM
October 04, 2015
More Decks by WM
See All by WM
Fetch Web Streams
kidwm
0
280
Metaprogramming in ES2015
kidwm
3
1k
Other Decks in Technology
See All in Technology
Post AI時代のリファクタリング実践記 / Refactoring in the post AI era
kaminashi
1
230
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
160
今さら理解するウェブフォントver.2026
takanorip
3
770
コンテナ運用におけるネットワーク・コンテナコストの削減方法/How to Reduce Network and Container Costs in Container Operations
masakiokuda
1
150
NDIでApple Vision Proにリアルタイム映像送信
jyouryuusui
0
120
Gemini Intelligence 入門 ― AppFunctions と Gemini Nano
takuroabe
0
250
20261017福岡devIO 「AIは"良いダッシュボード"を作れるか?
jtakeda
0
140
分析の民主化を支えるメタデータ整備の実践
kakehashi
PRO
4
1.4k
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
470
分析AIエージェントを育てる、動く環境を育てる
codatum
1
1.1k
Code for Security プロジェクト紹介 2026年10月
yu23ki14
0
110
継続的なAIコスト最適化
bgpat
1
340
Featured
See All Featured
From π to Pie charts
rasagy
1
400
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
570
Writing Fast Ruby
sferik
630
63k
The Invisible Side of Design
smashingmag
301
52k
Mobile First: as difficult as doing things right
swwweet
225
10k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
600
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Building AI with AI
inesmontani
PRO
1
1.3k
Product Roadmaps are Hard
iamctodd
55
13k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Transcript
Build Cross Platform Desktop Application with Electron @kidwm 1
Why to Build Desktop Application?
Desktop Factors • Massive Assets (Game) • Quick Typing (Messenger)
• Urgent Usage (Office) • Frequent Access (Music) Show Logo to your user constantly 3
How to Build Desktop Application?
How to Build Cross Platform Desktop Application?
Cross Platform Technology • Java • GTK+ / Qt •
XULRunner • Chrome Apps • Chromium Embedded Framework CEF everywhere! 6
CEF integrated with nodejs • brackets-shell • NW.js (node-webkit) •
Electron (atom-shell) Electron everywhere! 7
What is Electron?
History • Started in January 2013 • Built initially for
the Atom text editor • Renamed from atom-shell • use libchromiumcontent and Brightray to wrap Chromium Content module 9
browser process renderer process renderer renderer process process ipc
main.js var app = require('app') ; app.on('ready', function() {
electron-prebuilt sudo npm install --global electron-prebuilt electron main.js 12
Features
require modules built-in modules and npm packages modules for main
process and renderer process read module documentation 14
Inter-Process Communication
ipc • ipc.send(channel, args) • ipc.on(channel, callback) browser process renderer
process renderer renderer process process ipc 16
message channel app.js (renderer process) ipc.send ('connect', url); main.js (browser
process) ipc.on ('connect', function(event, url){}); 17
remote • remote.require(module) • remote.getCurrentWindow() • remote.getGlobal(name) browser process renderer
process renderer renderer process process ipc 18
remote procedure call main.js (browser process) global['config'] = JSON.parse(fs.readFileSync(path, 'utf8'));
app.js (renderer process) remote. getGlobal('config') ; 19
browserWindow & webContents • window.capturePage() • webContents.printToPDF() • webContents.enableDeviceEmulation() •
webContents.sendInputEvent() • webContents.executeJavaScript(code[, userGesture]) 20
webContents.session • session.cookies • session.enableNetworkEmulation() • session.setProxy() • session.clearStorageData() 21
<webview />
webview • preload script • disable websecurity • webview.openDevTools() •
webview.insertCSS() 23
shell
shell • shell.openExternal(url) • shell.openItem(fullPath) • shell.showItemInFolder(fullPath) • shell.moveItemToTrash(fullPath) 25
dialog
dialog • dialog.showOpenDialog() • dialog.showSaveDialog() • dialog.showMessageBox() remote.require('dialog'). showOpenDialog({
menu
menu template var Menu = remote.require('menu') ; var menu =
Menu.buildFromTemplate([{
contextmenu event window.addEventListener('contextmenu', function (e) {
tray
menubar 32
global-shortcut
auto-updater
Development Tips
Augmentation Add-on • Native Node Module • node-ffi • PPAPI
(Flash) 36
-webkit-user- drag: none;
window.process
electron- packager
asar
Pros • Latest nodejs and Chrome integration • Expose many
browser features • Actively Developing • Update with Upstream Quickly • Great Community Support 41
Cons • binary size is big⋯ • limited native system
features (still improving) • lack some browser features (eg. workers) but you have nodejs & npm! 42
Who uses Electron?
Kitematic
None
Slack
Caprine
nodeshot
Nightmare
Kaku
Mojibar
Plasmon
Plasmon • http://pcman.ptt.cc/ • Powered by pcman.js • currently focus
in Mac OSX • Welcome contribution 53
more on Awesome Electron
Thanks! @kidwm 55