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
1
4.1k
フロントエンドの秩序は保たれているか?
Hatena Engineer Seminar #8
https://connpass.com/event/60276/
masawada
July 12, 2017
Tweet
Share
More Decks by masawada
See All by masawada
10年続くサービスのデータを1日未満のメンテナンスウィンドウで安全に移管する
masawada
5
2k
よりよいレビュー環境を求めて / A code review odyssey
masawada
0
2.8k
Getting Started with ScratchX
masawada
0
660
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
310
Hack U at UEC 2014.03.27
masawada
0
1.5k
Firefox OS勉強会 4th Untitled
masawada
0
1.2k
Other Decks in Technology
See All in Technology
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
120
障害対応指揮の意思決定と情報共有における価値観 / Waroom Meetup #2
arthur1
5
490
Lexical Analysis
shigashiyama
1
150
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
120
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.7k
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
150
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
950
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.9k
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
130
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
140
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
130
Featured
See All Featured
Music & Morning Musume
bryan
46
6.2k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
900
Why Our Code Smells
bkeepers
PRO
334
57k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Building Adaptive Systems
keathley
38
2.3k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
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 υΩϡϝϯτͷߋ৽
ಓʹվળΛଓ ͚͍ͯͧ͘ʂʂ ʂʂʂʂʂʂʂ ʂʂʂʂʂʂʂ
ྑ͍αʔϏεΛ ࡞͍ͬͯͧ͘ʂ ʂʂʂʂʂʂʂ ʂʂʂʂʂʂʂ
͋Γ͕ͱ͏͍͟͝·ͨ͠