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
Space City JS — Using Electron & React to Build N1
Search
Nylas
May 14, 2016
Programming
0
110
Space City JS — Using Electron & React to Build N1
Using Electron & React to Build N1: The Open Source Email Client
Nylas
May 14, 2016
Tweet
Share
More Decks by Nylas
See All by Nylas
Switching Off to Switch On!
nylas
1
94
Why Observability Matters
nylas
0
420
Billions of Emails Synced with Python
nylas
0
280
Profiling Python in Production
nylas
1
230
Debugging Python using GDB
nylas
0
63
Plugins with React & Challenges with Data
nylas
0
110
Waffle JS: Desktop Apps with Electron, React, & Observables
nylas
0
440
Electron, Node, and the New Desktop @ SFNode
nylas
0
330
The New Desktop: Electron, React, and Pixel-Perfect Native-Feeling Experiences — Forward 4 Web Summit
nylas
1
950
Other Decks in Programming
See All in Programming
Kaigi on Rails 2024 - Rails APIモードのためのシンプルで効果的なCSRF対策 / kaigionrails-2024-csrf
corocn
5
3.8k
Outline View in SwiftUI
1024jp
1
300
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
760
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
160
受け取る人から提供する人になるということ
little_rubyist
0
210
現場で役立つモデリング 超入門
masuda220
PRO
15
3.1k
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
590
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
800
EventSourcingの理想と現実
wenas
6
2.2k
Macとオーディオ再生 2024/11/02
yusukeito
0
340
開発効率向上のためのリファクタリングの一歩目の選択肢 ~コード分割~ / JJUG CCC 2024 Fall
ryounasso
0
430
Jakarta EE meets AI
ivargrimstad
0
300
Featured
See All Featured
Designing the Hi-DPI Web
ddemaree
280
34k
RailsConf 2023
tenderlove
29
900
Mobile First: as difficult as doing things right
swwweet
222
8.9k
How to Ace a Technical Interview
jacobian
276
23k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.8k
Become a Pro
speakerdeck
PRO
25
5k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
820
Six Lessons from altMBA
skipperchong
27
3.5k
Facilitating Awesome Meetings
lara
50
6.1k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Code Reviewing Like a Champion
maltzj
520
39k
Transcript
Using Electron & React to Build N1: The Open Source
Email Client Evan Morikawa | @e0m |
[email protected]
| May 14 2016 Nylas
Standing on the shoulders of giants Evan Morikawa | @e0m
|
[email protected]
| May 14 2016 Nylas
None
None
None
None
None
How do we: Deliver to the desktop Support 3rd party
plugins Keep data & view in sync Work offline Keep it performant Pay it forward
How do we: Deliver to the desktop Support 3rd party
plugins Keep data & view in sync Work offline Keep it performant Pay it forward
None
Shell NW.js (Node Webkit) Swing | Qt | Cocoa |
GTK | WPF/WinRT
Shell
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
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
How do we: Deliver to the desktop Support 3rd party
plugins Keep data & view in sync Work offline Keep it performant Pay it forward
None
None
<div id=“actions”> <SendButton draft={this.props.draft} /> <AttachFileButton draft={this.props.draft} /> <TrashButton draft={this.props.draft}
/> </div>
<div id=“actions”> <InjectedComponentSet location={‘composer-actions’} passedProps={{draft: this.props.draft}} /> </div>
<div id=“actions”> <InjectedComponentSet location={‘composer-actions’} passedProps={{draft: this.props.draft}} /> </div> Actions.registerComponent(TranslateButton, {
location:’composer-actions’ })
None
None
How do we: Deliver to the desktop Support 3rd party
plugins Keep data & view in sync Work offline Keep it performant Pay it forward
React ReactiveX.js Redux Flux +
ReactiveX.js
const q = `SELECT * FROM threads WHERE …` Rx.Observable.fromQuery(q).subscribe((threads)
=> { this.setState({threads}) })
const q = `SELECT * FROM threads WHERE …` Rx.Observable.fromQuery(q)
.filter(myFn).subscribe((threads) => { this.setState({threads}) })
const q = `SELECT * FROM threads WHERE …` Rx.Observable.fromQuery(q)
.filter(myFn) .map(mapFn).subscribe((threads) => { this.setState({threads}) })
How do we: Deliver to the desktop Support 3rd party
plugins Keep data & view in sync Work offline Keep it performant Pay it forward
Web SQL Local Storage
Web SQL Local Storage
Web SQL Local Storage
None
How do we: Deliver to the desktop Support 3rd party
plugins Keep data & view in sync Work offline Keep it performant Pay it forward
None
None
How do we: Deliver to the desktop Support 3rd party
plugins Keep data & view in sync Work offline Keep it performant Pay it forward
None
https://github.com/nylas/n1 Open Source
How do we: Deliver to the desktop Support 3rd party
plugins Keep data & view in sync Work offline Keep it performant Pay it forward
N1 Core Team @e0m @bengotow @juanstejada YOU! @karim_hamidou @jackiehluo
N1 Extended Team
Evan Morikawa | @e0m |
[email protected]
| May 2016 Thank
you Slides here