Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The Age of the Javascript-Powered Desktop — Din...
Search
Evan Morikawa
June 24, 2016
Programming
0
750
The Age of the Javascript-Powered Desktop — Dinosaur JS
The Age of the Javascript-Powered Desktop. Dinosaur JS June 24, 2016
Evan Morikawa
June 24, 2016
Tweet
Share
More Decks by Evan Morikawa
See All by Evan Morikawa
Node on the Desktop — Node Conf Oslo 2016
emorikawa
0
130
JS Takes the Desktop — Scotland JS
emorikawa
0
190
Desktop JS — Empire JS 2016
emorikawa
1
520
Plugins with React & Challenges with Data
emorikawa
0
490
Space City JS — Using Electron & React to Build N1
emorikawa
1
230
MIT N1 Preview
emorikawa
0
440
Scaling Flux
emorikawa
0
520
Other Decks in Programming
See All in Programming
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
790
Conform を推す - Advocating for Conform
mizoguchicoji
3
690
PHP ステートレス VS ステートフル 状態管理と並行性 / php-stateless-stateful
ytake
0
100
Spring gRPC について / About Spring gRPC
mackey0225
0
220
color-scheme: light dark; を完全に理解する
uhyo
5
390
sappoRo.R #12 初心者セッション
kosugitti
0
250
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
220
CDK開発におけるコーディング規約の運用
yamanashi_ren01
2
130
バックエンドのためのアプリ内課金入門 (サブスク編)
qnighy
8
1.8k
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
320
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
740
Open source software: how to live long and go far
gaelvaroquaux
0
640
Featured
See All Featured
Unsuck your backbone
ammeep
669
57k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
46
2.3k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.2k
Practical Orchestrator
shlominoach
186
10k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.5k
Six Lessons from altMBA
skipperchong
27
3.6k
Bash Introduction
62gerente
611
210k
Transcript
The Age of the Javascript-Powered Desktop Evan Morikawa | @e0m
|
[email protected]
Dino JS | June 24, 2016
The Precambrian Eon 1.3 billion seconds ago
The Precambrian Eon C | C++ Swing | Qt |
Cocoa | GTK | WPF/WinRT | … 1.3 billion seconds ago
The Paleozoic Era 145 million seconds ago
The Paleozoic Era NW.js (Node Webkit) 145 million seconds ago
The Mesozoic Era 52 million seconds ago
The Mesozoic Era Shell hangouts.google.com/hangouts/_/nylas.com/code-challenge 52 million seconds ago
The Cenozoic Era 36 million seconds ago
The Cenozoic Era 36 million seconds ago
None
None
None
Chromium
Chromium Browser aka Backend aka Main Process
Chromium Browser aka Backend aka Main Process C++
Chromium Browser aka Backend aka Main Process C++ Renderer Renderer
Renderer HTML / JS (DOM) HTML / JS (DOM) HTML / JS (DOM)
Chromium Browser aka Backend aka Main Process C++ Renderer Renderer
Renderer HTML / JS (DOM) HTML / JS (DOM) HTML / JS (DOM) ipc
Browser aka Backend aka Main Process Renderer Renderer Renderer HTML
/ JS (DOM) HTML / JS (DOM) HTML / JS (DOM) ipc
Node Event Loop libuv Node & Chromium Mashup
Chromium Events MessageLoop Chromium Node & Chromium Mashup
Chromium Events MessageLoop Chromium Node Event Loop libuv ? Node
& Chromium Mashup
Chromium Events libuv Chromium Node & Chromium Mashup
Chromium Events MessageLoop Chromium Node Event Loop libuv Node &
Chromium Mashup
Node Event Loop libuv Chromium Events MessageLoop Chromium IO poll
Node & Chromium Mashup
Browser aka Backend aka Main Process Renderer Renderer Renderer HTML
/ JS (DOM) HTML / JS (DOM) HTML / JS (DOM) ipc
Nylas N1
Nylas N1 main.js
Nylas N1 main.js const win = new BrowserWindow() win.loadURL(`file://index.html`) win.show()
Nylas N1 main.js const win = new BrowserWindow() win.loadURL(`file://index.html`) win.show()
Nylas N1 main.js const win = new BrowserWindow() win.loadURL(`file://index.html`) win.show()
index.html index.js
Nylas N1 main.js const win = new BrowserWindow() win.loadURL(`file://index.html`) win.show()
index.html index.js React.render()
Nylas N1 main.js const win = new BrowserWindow() win.loadURL(`file://index.html`) win.show()
index.html index.js React.render()
Nylas N1 main.js const win = new BrowserWindow() win.loadURL(`file://index.html`) win.show()
index.html index.js React.render() Composer Work Window
None
The Age of the JS Desktop 1. “Native” experience 2.
Process Control 3. Performance 4. Data Storage & Offline 5. Plugins & Extensibility
The Age of the JS Desktop 1. “Native” experience 2.
Process Control 3. Performance 4. Data Storage & Offline 5. Plugins & Extensibility
None
The Age of the JS Desktop 1. “Native” experience 2.
Process Control 3. Performance 4. Data Storage & Offline 5. Plugins & Extensibility Native extensions | Cross-platform CSS | Retina Detail
The Age of the JS Desktop 1. “Native” experience 2.
Process Control 3. Performance 4. Data Storage & Offline 5. Plugins & Extensibility Native extensions | Cross-platform CSS | Retina Detail
Native Electron Extensions npm install sqlite3 electron/electron-rebuild
electron/electron-rebuild Native Electron Extensions
electron/electron-rebuild node-gyp install --target=${electronVersion} --arch=x64 --dist-url=https://atom.io/download/atom-shell Native Electron Extensions
electron/electron-rebuild node-gyp install --target=${electronVersion} --arch=x64 --dist-url=https://atom.io/download/atom-shell npm rebuild --target=${electronVersion} --arch=x64
--runtime=electron Native Electron Extensions
nodejs/node-gyp Native Electron Extensions
nodejs/node-gyp gyp (Generate Your Projects) make, gcc, XCode, Visual
Studio Native Electron Extensions
The Age of the JS Desktop 1. “Native” experience 2.
Process Control 3. Performance 4. Data Storage & Offline 5. Plugins & Extensibility Native extensions | Cross-platform CSS | Retina Detail Electron-Rebuild | Node GYP | Windows
The Age of the JS Desktop 1. “Native” experience 2.
Process Control 3. Performance 4. Data Storage & Offline 5. Plugins & Extensibility Native extensions | Cross-platform CSS | Retina Detail Electron-Rebuild | Node GYP | Windows
None
None
The Age of the JS Desktop 1. “Native” experience 2.
Process Control 3. Performance 4. Data Storage & Offline 5. Plugins & Extensibility Native extensions | Cross-platform CSS | Retina Detail Electron-Rebuild | Node GYP | Windows Jankbusting | Worker Windows
The Age of the JS Desktop 1. “Native” experience 2.
Process Control 3. Performance 4. Data Storage & Offline 5. Plugins & Extensibility Native extensions | Cross-platform CSS | Retina Detail Electron-Rebuild | Node GYP | Windows Jankbusting | Worker Windows
ReactiveX.js
const q = `SELECT * FROM threads WHERE dinosaur…` Rx.Observable.fromQuery(q).subscribe((threads)
=> { this.setState({threads}) })
const q = `SELECT * FROM threads WHERE dinosaur…` Rx.Observable.fromQuery(q)
.filter(myFn).subscribe((threads) => { this.setState({threads}) })
const q = `SELECT * FROM threads WHERE dinosaur…` Rx.Observable.fromQuery(q)
.filter(myFn) .map(mapFn).subscribe((threads) => { this.setState({threads}) })
None
SELECT * FROM threads WHERE account_id=123 SELECT * FROM messages
WHERE thread_id=987
SELECT * FROM threads WHERE account_id=123 SELECT * FROM messages
WHERE thread_id=987
The Age of the JS Desktop 1. “Native” experience 2.
Process Control 3. Performance 4. Data Storage & Offline 5. Plugins & Extensibility Native extensions | Cross-platform CSS | Retina Detail Electron-Rebuild | Node GYP | Windows Jankbusting | Worker Windows SQL | Observables | Tasks
The Age of the JS Desktop 1. “Native” experience 2.
Process Control 3. Performance 4. Data Storage & Offline 5. Plugins & Extensibility Native extensions | Cross-platform CSS | Retina Detail Electron-Rebuild | Node GYP | Windows Jankbusting | Worker Windows SQL | Observables | Tasks
None
https://github.com/nylas/n1 Open Source
The Age of the JS Desktop 1. “Native” experience 2.
Process Control 3. Performance 4. Data Storage & Offline 5. Plugins & Extensibility Native extensions | Cross-platform CSS | Retina Detail Electron-Rebuild | Node GYP | Windows Jankbusting | Worker Windows SQL | Observables | Tasks Native extensions | Cross-platform CSS | Retina Detail
The Age of the JS Desktop 1. “Native” experience 2.
Process Control 3. Performance 4. Data Storage & Offline 5. Plugins & Extensibility Native extensions | Cross-platform CSS | Retina Detail Electron-Rebuild | Node GYP | Windows Jankbusting | Worker Windows SQL | Observables | Tasks Native extensions | Cross-platform CSS | Retina Detail
None
None
None
None
N1 Core Team https://nylas.com/team @e0m @bengotow @juanstejada Halla Moore @jackiehluo
Drew Regitsky
Evan Morikawa | @e0m |
[email protected]
| June 2016 Thank
you! Slides here