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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Rize MISUMI
April 24, 2015
Technology
1.3k
2
Share
Being Flux on Electron
Electron (Atom Shell) 勉強会 #1
Rize MISUMI
April 24, 2015
More Decks by Rize MISUMI
See All by Rize MISUMI
5 Smashing Changes Your Extension Will Encounter #phpblt
misumirize
0
3k
Effective Espresso #roppongi_aar
misumirize
0
2.5k
Build your APK beyond Docker #dockerlt
misumirize
2
2.9k
某イベントを支えるRuby
misumirize
0
1k
Other Decks in Technology
See All in Technology
電子辞書Brainをネットに繋げてみた(自力編)
raspython3
0
310
「使われるデータ基盤」を目指してデータアナリストとワークショップをやった話
jackojacko_
2
920
AI時代から振り返るTerraform drift運用の歴史 / AI Age Reflections on the History of Terraform Drift Operations
aeonpeople
0
580
個人AIからチームAIへ:開発における品質と生産性の再設計
moongift
PRO
0
290
Anthropic AIネイティブ・スタートアップ構築のプレイブック を理解する
nagatsu
0
210
Agentic AI時代における メルカリのAIガバナンスとガードレール実装
naoichihara
16
17k
ポスター発表&デモと総括 / Poster Presentations & Demonstrations and Summary
ks91
PRO
0
150
さきさん文庫の書籍ができるまで
sakiengineer
0
300
AI Adaptable なテストを整える工夫 / Ways to Make Your Tests AI-Adaptable
bitkey
PRO
2
150
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
6
1.5k
Datadog 認定試験の概要と対策
uechishingo
0
180
美味しいスイスチーズを作ろう🧀🐭
taigamikami
1
140
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
190
Navigating Team Friction
lara
192
16k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
160
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
390
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
200
A designer walks into a library…
pauljervisheath
211
24k
Darren the Foodie - Storyboard
khoart
PRO
3
3.4k
How to build a perfect <img>
jonoalderson
1
5.5k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
280
Everyday Curiosity
cassininazir
0
210
[SF Ruby Conf 2025] Rails X
palkan
2
1.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