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
2.1k
よりよいレビュー環境を求めて / A code review odyssey
masawada
0
2.9k
Getting Started with ScratchX
masawada
0
670
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.3k
Other Decks in Technology
See All in Technology
祝!Iceberg祭開幕!re:Invent 2024データレイク関連アップデート10分総ざらい
kniino
3
320
ハイテク休憩
sat
PRO
2
170
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
490
マルチプロダクト開発の現場でAWS Security Hubを1年以上運用して得た教訓
muziyoshiz
3
2.4k
MLOps の現場から
asei
7
650
podman_update_2024-12
orimanabu
1
280
20241220_S3 tablesの使い方を検証してみた
handy
4
640
大幅アップデートされたRagas v0.2をキャッチアップ
os1ma
2
540
Google Cloud で始める Cloud Run 〜AWSとの比較と実例デモで解説〜
risatube
PRO
0
110
小学3年生夏休みの自由研究「夏休みに Copilot で遊んでみた」
taichinakamura
0
170
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
190
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
170
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
A Tale of Four Properties
chriscoyier
157
23k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Side Projects
sachag
452
42k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
170
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
Building Adaptive Systems
keathley
38
2.3k
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 υΩϡϝϯτͷߋ৽
ಓʹվળΛଓ ͚͍ͯͧ͘ʂʂ ʂʂʂʂʂʂʂ ʂʂʂʂʂʂʂ
ྑ͍αʔϏεΛ ࡞͍ͬͯͧ͘ʂ ʂʂʂʂʂʂʂ ʂʂʂʂʂʂʂ
͋Γ͕ͱ͏͍͟͝·ͨ͠