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
730
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
510
Plugins with React & Challenges with Data
emorikawa
0
470
Space City JS — Using Electron & React to Build N1
emorikawa
1
230
MIT N1 Preview
emorikawa
0
430
Scaling Flux
emorikawa
0
510
Other Decks in Programming
See All in Programming
Zoneless Testing
rainerhahnekamp
0
120
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
120
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
270
ソフトウェアの振る舞いに着目し 複雑な要件の開発に立ち向かう
rickyban
0
890
testcontainers のススメ
sgash708
1
120
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
210
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
210
Haze - Real time background blurring
chrisbanes
1
510
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
130
42 best practices for Symfony, a decade later
tucksaun
1
180
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
A better future with KSS
kneath
238
17k
What's in a price? How to price your products and services
michaelherold
243
12k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Why Our Code Smells
bkeepers
PRO
335
57k
Unsuck your backbone
ammeep
669
57k
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