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
720
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
500
Plugins with React & Challenges with Data
emorikawa
0
460
Space City JS — Using Electron & React to Build N1
emorikawa
1
230
MIT N1 Preview
emorikawa
0
410
Scaling Flux
emorikawa
0
510
Other Decks in Programming
See All in Programming
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
2
220
プロジェクト新規参入者のリードタイム短縮の観点から見る、品質の高いコードとアーキテクチャを保つメリット
d_endo
1
1.1k
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
590
Quine, Polyglot, 良いコード
qnighy
4
630
Ethereum_.pdf
nekomatu
0
380
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
110
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
130
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
540
OpenTelemetryでRailsのパフォーマンス分析を始めてみよう(KoR2024)
ymtdzzz
5
2k
macOS でできる リアルタイム動画像処理
biacco42
9
2.3k
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
480
Jakarta EE meets AI
ivargrimstad
0
210
Featured
See All Featured
KATA
mclloyd
29
14k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
700
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Scaling GitHub
holman
458
140k
BBQ
matthewcrist
85
9.3k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
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