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
Being Flux on Electron
Search
Rize MISUMI
April 24, 2015
Technology
2
1.2k
Being Flux on Electron
Electron (Atom Shell) 勉強会 #1
Rize MISUMI
April 24, 2015
Tweet
Share
More Decks by Rize MISUMI
See All by Rize MISUMI
5 Smashing Changes Your Extension Will Encounter #phpblt
misumirize
0
2.9k
Effective Espresso #roppongi_aar
misumirize
0
2.3k
Build your APK beyond Docker #dockerlt
misumirize
2
2.9k
某イベントを支えるRuby
misumirize
0
960
Other Decks in Technology
See All in Technology
GitHub Copilot のテクニック集/GitHub Copilot Techniques
rayuron
37
15k
非機能品質を作り込むための実践アーキテクチャ
knih
5
1.5k
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
小学3年生夏休みの自由研究「夏休みに Copilot で遊んでみた」
taichinakamura
0
170
kargoの魅力について伝える
magisystem0408
0
210
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
560
Turing × atmaCup #18 - 1st Place Solution
hakubishin3
0
490
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
490
普通のエンジニアがLaravelコアチームメンバーになるまで
avosalmon
0
110
LINEヤフーのフロントエンド組織・体制の紹介【24年12月】
lycorp_recruit_jp
0
530
多領域インシデントマネジメントへの挑戦:ハードウェアとソフトウェアの融合が生む課題/Challenge to multidisciplinary incident management: Issues created by the fusion of hardware and software
bitkey
PRO
2
110
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
350
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Embracing the Ebb and Flow
colly
84
4.5k
A Modern Web Designer's Workflow
chriscoyier
693
190k
How to Ace a Technical Interview
jacobian
276
23k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
We Have a Design System, Now What?
morganepeng
51
7.3k
Building Your Own Lightsaber
phodgson
103
6.1k
Into the Great Unknown - MozCon
thekraken
33
1.5k
4 Signs Your Business is Dying
shpigford
181
21k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Thoughts on Productivity
jonyablonski
67
4.4k
Fireside Chat
paigeccino
34
3.1k
Transcript
Being Flux on Electron Apr. 24, 2015 / Electron (Atom
Shell) ษڧձ #1 @Misumi_Rize
console.log(me); Twitter @Misumi_Rize GitHub @MisumiRize http://misumirize.hatenablog.com ࠷ۙ React Native Λ
Android Ͱಈ͔ͨ͠Γͯͨ͠
Demo GHCache GitHub Λϒϥζ͠ͳ͕ΒཪଆͰ git clone https://github.com/MisumiRize/GHCache
GHClone Electron WebView, GlobalShortcut, Remote, Shell CoffeeScript ී௨ͷ͍ํ React ී௨ͷ͍ํ
Flux Architecture ޙड़
WebView ϨϯμϥʔͱผϓϩηεͰϖʔδඳը σϑΥϧτͰ Node ػೳͳ͠ ෦తʹ Custom Component
CoffeeScript આ໌ུ require('coffee-script/register')Ͱಈ͘
Flux architecture આ໌ུ
Problem Flux architecture ॲཧ͕Ϩϯμϥʔϓϩηε෦Ͱ݁͢ΔͳΒ ༗ޮ BrowserWindow ؒͰঢ়ଶΛڞ༗͍ͨ͠
Solution: Remote IPC ϝΠϯϓϩηεͱϨϯμϥʔͷؒͰ௨৴ ͦΕΛநԽͨ͠ػೳ͕ Remote େࡶʹݴ͏ͱɺϝΠϯϓϩηεͰಈ͘ API ΛϨϯμϥʔ͔Βݺ Δ
Using Remote ϝΠϯϓϩηεଆʹ Dispatcher, Store ͷηοτΛ࡞ΕΞϓϦέ ʔγϣϯશମʹมߋ௨Ͱ͖Δ
Flux on Electron rev.1
Problem again ϨϯμϥʔϓϩηεͷΦϒδΣΫτ͕ React ͷϥΠϑαΠΫϧΛ֎ ΕΔ e.g. ΟϯυΛด͡ΔͱɺϝΠϯϓϩηεͷ Store ʹͭͳ͗ࠐΜ
ͩ Listener ͕औΓআ͔Εͳ͍··Ϩϯμϥʔ͕ࣺͯΒΕΔ
Dispose of Renderer ϝΠϯϓϩηε͕ϨϯμϥʔଆͷΦϒδΣΫτΛࢀর͍ͯͨ͠ ߹ɺϨϯμϥʔ͕ഁغ͞ΕΔͱແޮͳࢀরͱͳΔ ࢀর͢Δͱ NullPointerException ঢ়ଶ
Deja vu ωΠςΟϒΞϓϦέʔγϣϯతͳਏ͞ IPC ͕ࣦഊ͢Δ͚͔ͩͩΒϚγͱݴ͑Δ
Flux is not enough Flux Architecture ϥΠϑαΠΫϧͷϢʔβૢ࡞͕શͯഁյతͰ ͳ͍߹ͷΈ༗ޮ ϥΠϑαΠΫϧதʹը໘͕ด͡ΒΕͯഁغ͞ΕΔͷఆͷൣғ֎
Dispose of View at Flux ࠷ऴతͳഁغ View
Activity BrowserWindow ͷഁغΛୡ MVP ͬΆ͍͚Ͳҧ͏
Flux on Electron rev.2
Conclusion ࣗ༝͕ߴ͍ωΠσΟϒΞϓ Ϧέʔγϣϯʹ͍ۙਏ͕͋͞Δ Flux શ໘ల։ແཧ͕͋Δ ͍Ζ͍ΖߏΛߟ͑Δͱ໘നͦ ͏
cyclotron by Robert Couse-Baker https://www.flickr.com/photos/29233640@N07/6781174568