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
フロントエンドの秩序は保たれているか?
Search
masawada
July 12, 2017
Technology
0
4k
フロントエンドの秩序は保たれているか?
Hatena Engineer Seminar #8
https://connpass.com/event/60276/
masawada
July 12, 2017
Tweet
Share
More Decks by masawada
See All by masawada
よりよいレビュー環境を求めて / A code review odyssey
masawada
0
2.8k
Getting Started with ScratchX
masawada
0
650
GyaPC::Asia Tokyo 2015 LT
masawada
0
1.4k
Privileged Apps with Vue.js
masawada
0
160
Chikubeam
masawada
1
1.5k
Git講習 2014.04.15
masawada
1
300
Hack U at UEC 2014.03.27
masawada
0
1.5k
Firefox OS勉強会 4th Untitled
masawada
0
1.2k
C Lecture 2013.09.19
masawada
0
140
Other Decks in Technology
See All in Technology
エムスリー全チーム紹介資料 / Introduction of M3 All Teams
m3_engineering
1
320
プロダクト開発の貢献をアピールするための目標設計や認知活動 / Goal design and recognition activities to promote product development contributions.
oomatomo
5
870
Oracle Database 23ai 新機能#4 Application Continuity
oracle4engineer
PRO
0
120
Webセキュリティのあるきかた
akiym
32
10k
ラブグラフ紹介資料 〜プロダクト解体新書〜 / Lovegraph Product Deck
lovegraph
0
14k
業務ヒアリングと知識の呪い
tamai_63
0
290
AWSの初級者向けAI・ML資格『AWS Certified AI Practitioner』の傾向と対策/So You Want To Pass AWS Certified AI Practitioner
quiver
0
420
【shownet.conf_】放送局とShowNetが共創する、未来の放送システム ~Media over IP 特別企画の裏側~
shownet
PRO
0
360
テストコードの品質を客観的な数値で担保しよう〜Mutation Testのすすめ〜
ysknsid25
12
3.2k
トークナイザー入門
payanotty
2
970
KubeVirt Networking ONIC 2024
orimanabu
3
560
コード✕AIーソフトウェア開発者のための生成AI実践入門~
yuhattor
3
820
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
362
19k
A better future with KSS
kneath
237
17k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
1
290
Facilitating Awesome Meetings
lara
49
6k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
3
230
Music & Morning Musume
bryan
46
6.1k
Rails Girls Zürich Keynote
gr2m
93
13k
Bootstrapping a Software Product
garrettdimon
PRO
304
110k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
23k
Design by the Numbers
sachag
278
19k
The Language of Interfaces
destraynor
154
24k
Transcript
IS THE ORDER MAINTAINED? ϑϩϯτΤϯυͷடং อͨΕ͍ͯΔ͔ʁ @masawada
id:masawada
None
ࠓ͙͢ొʂ IUUQCMPHIBUFOBOFKQSFHJTUFS !!!!!!!!!!!!!! !!!!!!!!!!!!!! !!!!!!!!!!!!!!! !!!!!!!!!!!!!! !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!! !!!!!!!!!!!!!!!
None
ͯͳϒϩά प
ख़͞Εͨ +4ίʔυ܈
/PEFֶԂࡇͰͷൃද
,ZPUPKTͰͷൃද
ࠓ͜ΕҎ߱ ͷ͜ͱΛ͠· ͢ʂʂʂʂʂʂ ʂʂʂʂʂʂʂ
ͷલʹ
લճ·Ͱͷ ͋Β͢͡
+4ͷׂ w ݹ͖ྑ͖DPODBU͔ΒCSPXTFSJGZʹ w Ұ෦ͷϑΝΠϧߦ͘Β͍͋ͬͨʜ w ˠߦʹ
None
$*ͰςετΛճ͢ w ͪΌΜͱϏϧυͰ͖Δ͔ w &4-JOUͰνΣοΫ w Ϣχοτςετ
$*ͰςετΛճ͢ +4ςετͷ࣮ߦ݁Ռ
OQNΞοϓσʔτσʔͷಋೖ w ຖ݄ୈҰ݄༵Λ OQNΞοϓσʔτσʔʹ w ಉ࣌ʹ/PEFKTͷΞοϓσʔτ ߦͳ͏
OQNΞοϓσʔτσʔͷಋೖ
ΦϨΦϨ'MVYΛ3FEVYʹدͤΔ w ͜Ε·ͰಠࣗܰྔϥΠϒϥϦͰ 'MVY w 3FBDU'MVYք۾ͷ͕ࣝඞཁ w νʔϜͷΤϯδχΞʹ ϑϩϯτΤϯυઐډͳ͍
ΦϨΦϨ'MVYΛ3FEVYʹدͤΔ w ಠࣗ'MVY࣮ΛϦϑΝΫλϦϯά w 3FEVYΞʔΩςΫνϟʹ͚ۙͮΔ w 3FEVYΘͳ͍
·ͩ·ͩ ൃల్্
ࠓޙͷվળʹඞཁͳͷ w νʔϜϝϯόʔͱͷ૬ஊ w ࣮ํ๏ͷυΩϡϝϯτԽ w
ྑ͍αʔϏεΛ ࡞͍ͬͯͧ͘ʂ ʂʂʂʂʂʂʂ ʂʂʂʂʂʂʂ
ͱ͜Ζ͕
None
None
ࠓ͢͜ͱ
݄·Ͱʹͬͨ͜ͱ w ࠷৽ใΛΩϟονΞοϓ͢Δ ମ੍Λ͑Δ w ςετվળ w OQNΞοϓσʔτσʔͷഇࢭ w 3FBDUͷར༻ൣғΛ͛Δ
Mission 1: INPUT & OUTPUT
+4൪ෆࡏ
࠷৽ใͷऩूͱڞ༗ w ऩू w ϑϩϯτΤϯυϥϯν w ࣾ֎ަྲྀ w ڞ༗ w
υΩϡϝϯτͷඋ w '8(ͷ։࠵ ݱࡏഇࢭ
υΩϡϝϯτͷඋ Ҿ͖ܧ͗
υΩϡϝϯτͷඋ Ҿ͖ܧ͗ w ٧·ΓͲ͜ΖΛͳ͘͢ w ࢦͷڞ༗ w ελΠϧͷࢦఠͳͲ&4-JOUʹͤΔ
υΩϡϝϯτͷඋ Ҿ͖ܧ͗
'8(ͷ։࠵
'8(ͱ w ϑϩϯτΤϯυϫʔΩϯάάϧʔϓ w ϑϩϯτΤϯυʹؔ͢Δ Α͠ͳ͠͝ͱΛ͠߹͏ w 18(ͱซ࠵
18(ͱ w ύϑΥʔϚϯεϫʔΩϯάάϧʔϓ w ΠϯϑϥपΓͷ༷ࢠΛఆظతʹ؍ w ରԠ͕ඞཁͰ͋Ε *TTVFͷ༏ઌΛ্͛ΒΕΔ
18(ͱ
None
1BHF4QFFE*OTJHIUT
'8( w Ұϲ݄͝ͱ։࠵ w ৽ͨʹಋೖٕͨ͠ज़Λࣗຫ w ࠔΓ͝ͱΛڞ༗ w ͷʹΑͬͯ༏ઌΛ্͛Δ
'8(
'8( w ࠷ۙഇࢭ͞Ε·ͨ͠ w ͋Δఔҙࣝͷڞ༗͕Ͱ͖ͨ w ใڞ༗ࣾάϧʔϓ PSJTTVF Ͱ
IMPROVE THE TEST ENVIRONMENT Mission 2:
ςετڥͷվળ w 'MPXಋೖ w QPXFSBTTFSUಋೖ w &O[ZNFಋೖ
QPXFSBTTFSU CBCFMQMVHJOFNQPXFSBTTFSU
QPXFSBTTFSU require(‘assert’); ↓ require(‘power-assert’); উखʹஔ͖͑ͯ͘ΕΔ
&O[ZNF 3FBDU$PNQPOFOUͷ ςετ͍͍ײ͡ʹ ॻ͚ΔΑ͏ʹ͢Δͭ
None
ςετڥͷվળ w ςετΛॻ͖͍͢ڥΛ࡞Δ w ϨϏϡʔΑΓલʹؒҧ͍ʹ ؾ͚ΔڥΛ࡞Δ w ࡉ͔͘ೖΕ͍ͯํΛνʔϜʹڞ༗
Mission 3: MODULE UPDATING STRATEGY
OQNΞοϓσʔτσʔͷಋೖ
OQNΞοϓσʔτσʔͭΒ͍ w $)"/(&-0(Λ୳͢ͷʹ͕͔͔࣌ؒΔ w ࡞ۀऀʹϨϏϡΞʔʹෛ୲͕͔͔Δ w ϨϏϡʔࣗମʹख͕͔͔ؒΔ w ຊʹҰϲ݄͝ͱʹΔͷͳͷ͔
w ͲΕ͘Β͍ͷϖʔεͰݹͼ͍ͯ͘ͷ͔Γ͍ͨ
ZBSOPVUEBUFEGPSNBUUFS
$ yarn outdated --json
ZBSOPVUEBUFEGPSNBUUFS w $)"/(&-0(Λ.BSLEPXOʹؚΊͯग़ྗ w ύοέʔδͱ$)"/(&-0(ͷରΛ :".-ʹอଘ w .BDLFSFMʹݹ͍ύοέʔδΛߘͰ͖Δ w ແࢹ͢ΔϑΝΠϧΛࢦఆͰ͖Δ
w K2VFSZͷΞοϓσʔτͳͲ͚͍ͨ
None
None
IUUQEFWFMPQFSIBUFOBTUB⒎DPNFOUSZ
'"2 2(SFFOLFFQFSݕ౼ͨ͠
'"2 "ͯ͠·ͤΜ
(SFFOLFFQFS w ͢Έ·ͤΜΒͳ͔ͬͨ w ݕ౼ͯ͠Θͳ͔͔ͬͨͳɺɺ w ϒϩάͰ(JU)VC&OUFSQSJTFΛ͍ͬͯͯ ؾܰʹ͓ࢼ͠Ͱ͖ͳͦ͞͏ w ZBSOPVUEBUFEGPSNBUUFS͘Β͍ͳΒ
ίετ গͳͯ͘Ͱ͖Δ
Mission 4: REACTIZE VIEW
कΓ
߈Ί
3FBDUBTB5FNQMBUF&OHJOF
3FBDUBTB5FNQMBUF&OHJOF w 9TMBUFͷ55FSTFΛ͍ͬͯΔ w 1FSMͷςϯϓϨʔτΤϯδϯ w ૉ
[% IF element.selected %] class=“active” [% END %] 3FBDUBTB5FNQMBUF&OHJOF
3FBDUBTB5FNQMBUF&OHJOF 3FBDUʹدͤΔ
3FBDUBTB5FNQMBUF&OHJOF w 1FSM • $r->embed_state(‘pro’, $json) w +BWB4DSJQU • const
state = InitialState.get(‘pro’)
None
None
None
None
3FBDUBTB5FNQMBUF&OHJOF 2443͠ͳ͍ͷ
3FBDUBTB5FNQMBUF&OHJOF "ݱঢ়Ͱ443ʹ͢Δ ϝϦοτΛݟੵ͍ͬͯͳ͍
1FSMPO3FBDUPO443 w ·ͩେʑతʹਐΊ͍ͯΔΘ͚Ͱͳ͍ w ͦͦ1FSMͰ443ͷ࣮͕গͳ͍ w ఫୀՄೳͳܗͰਐΊ͍ͯΔ
IS THE ORDER MAINTAINED? ϑϩϯτΤϯυͷடং อͨΕ͍ͯΔ͔ʁ @masawada
ࠓͨ͜͠ͱ w +4൪͕͍ͳ͍͚ͯͬͯ͘Δ νʔϜͮ͘Γ w ςετ͕ॻ͖͍͢ྑ͘ͳ͍͕ ͔Γ͍͢ڥͮ͘Γ w ৽ͨͳ͜ͱΛ͢Δͱ͖ఫୀ͘͢͠
ͨΓલͷ͜ͱ Λॗʑͱͬͯ ͍͘εϐϦοτ
·ͩ·ͩ Δ՝
ࠓޙΓ͍ͨ w ͞ΒͳΔςετվળ w 1IBOUPN+4ग़ w &&ςετ$*Ͱճ͢ w υΩϡϝϯτͷߋ৽
ಓʹվળΛଓ ͚͍ͯͧ͘ʂʂ ʂʂʂʂʂʂʂ ʂʂʂʂʂʂʂ
ྑ͍αʔϏεΛ ࡞͍ͬͯͧ͘ʂ ʂʂʂʂʂʂʂ ʂʂʂʂʂʂʂ
͋Γ͕ͱ͏͍͟͝·ͨ͠