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
Full-Stack JavaScript meets DDD.
Search
Yusuke SAITO
January 10, 2020
Technology
1
160
Full-Stack JavaScript meets DDD.
2020-01-10 に開催された、DDD meetup#3 でのLT資料です。
Vuex+Express環境でどんなアーキテクチャを採用したか、して良かったこと/悪かったことをまとめました。
Yusuke SAITO
January 10, 2020
Tweet
Share
Other Decks in Technology
See All in Technology
「規約、知識、オペレーション」から考える中規模以上の開発組織のCursorルールの 考え方・育て方 / Cursor Rules for Coding Styles, Domain Knowledges and Operations
yuitosato
6
1.6k
ゆるSRE #11 LT
okaru
1
590
API の仕様から紐解く「MCP 入門」 ~MCP の「コンテキスト」って何だ?~
cdataj
0
150
TODAY 看世界(?) 是我們在看扣啦!
line_developers_tw
PRO
0
160
AI技術トレンド勉強会 #1MCPの基礎と実務での応用
nisei_k
1
180
比起獨自升級 我更喜歡 DevOps 文化 <3
line_developers_tw
PRO
0
150
宇宙パトロール ルル子から考える LT設計のコツ
masakiokuda
2
100
上長や社内ステークホルダーに対する解像度を上げて、より良い補完関係を築く方法 / How-to-increase-resolution-and-build-better-complementary-relationships-with-your-bosses-and-internal-stakeholders
madoxten
13
7.6k
CI/CDとタスク共有で加速するVibe Coding
tnbe21
0
120
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
3
17k
Model Mondays S2E01: Advanced Reasoning
nitya
0
320
自分を理解するAI時代の準備 〜マイプロフィールMCPの実装〜
edo_m18
0
110
Featured
See All Featured
Writing Fast Ruby
sferik
628
61k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
How to train your dragon (web standard)
notwaldorf
92
6.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Practical Orchestrator
shlominoach
188
11k
Designing for humans not robots
tammielis
253
25k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
The Cost Of JavaScript in 2023
addyosmani
50
8.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
329
24k
Facilitating Awesome Meetings
lara
54
6.4k
It's Worth the Effort
3n
184
28k
Transcript
'VMM4UBDL+BWB4DSJQU NFFUT%%% 2020-01-10 ੪౻ ༞ี @uskwitter JIBUNSTYLE Inc.
8IPBN* iOS ߨࢣ IT ΞʔΩςΫτ αʔϏε σβΠφ iOS ΤϯδχΞ UX
σβΠφ swiftຊ ࣥච 1 +*#6/45:-&*OD$&0
ࠓ͢͜ͱ https://twitter.com/little_hand_s/status/1177366806853369856 2
େࣄͩΑͶɺڞ௨ೝࣝ ʮࢲͷதͷʯDDD త γεςϜϞσϧΛϝϯλϧϞσϧͱ͚ۙͮΔ͜ͱ Ұޱʹ ݴ͏ͱ υϝΠϯࣝͱͦͷଞͷίʔυͷ DDDͨ͠ ࡍͷ ΰʔϧ
ᶃ υϝΠϯ͕ࣝϝϯλϧϞσϧʹ͍ۙܗͰ ϞσϦϯά͞Ε͍ͯΔ ᶄ υϝΠϯࣝͱͦͷଞͷίʔυ͕͞Εͨ ԿΒ͔ͷΞʔΩςΫνϟ͕࠾༻͞Ε͍ͯΔ 3
ΞʔΩςΫνϟΛಋ͖ग़ͨ͢Ίͷجຊࢦ ΞϓϦέʔγϣϯ υϝΠϯ ͦͷଞ ϝϯλϧϞσϧΛࢀߟʹ υϝΠϯϞσϦϯάͨ͠ ΦϒδΣΫτ܈ υϝΠϯϞσϧ܈Λ ͬͯϢʔεέʔεΛ ࣮ݱ͢ΔΦϒδΣΫτ܈
UI࣮API௨৴ɺ DB੍ޚ͋Δ͍OS ͔ΒͷΠϕϯτΛ ѻ͏ΦϒδΣΫτ܈ 4
ΞʔΩςΫνϟΛಋ͖ग़ͨ͢Ίͷجຊࢦ ΞϓϦέʔγϣϯ υϝΠϯ ͦͷଞ ϝϯλϧϞσϧΛࢀߟʹ υϝΠϯϞσϦϯάͨ͠ ΦϒδΣΫτ܈ υϝΠϯϞσϧ܈Λ ͬͯϢʔεέʔεΛ ࣮ݱ͢ΔΦϒδΣΫτ܈
UI࣮API௨৴ɺ DB੍ޚ͋Δ͍OS ͔ΒͷΠϕϯτΛ ѻ͏ΦϒδΣΫτ܈ 4 ͍͍ͬͯͯ ґଘੑٯస
7VFY &YQSFTTΛ%%%Ͱɻ 5
7VF+4ͱ MVCͰ͍͏ViewͷඳըϑϨʔϜϫʔΫɻ HTMLςϯϓϨʔτʹσʔλΛΊࠐΈ DOMʹඳը͢Δɻ τϦάϰΣ ϦʔϯεΧΫʢTrygve Reenskaugʣ, 1979 6
7VFYͱ ఆ͢Δํ๏ʢϢʔεέʔεʣ ͷΈ͕ঢ়ଶΛมߋͰ͖Δ͜ͱΛ อূ͢Δɺঢ়ଶཧύλʔϯΛ ࣮ݱ͢ΔϥΠϒϥϦɻ 7 Actions Mutations State Vue
Components dispatch commit mutate render Backend API Vuex ͕͜͜ VueJS → Vuex͕ఆ͢Δϑϩϯτ ΤϯυΞʔΩςΫνϟ
Back-End Shared Infrastructure (DB) presenter .js interactor .js Front-End ࢲͷ࠾༻ͨ͠
ΞʔΩςΫνϟ view.vue presenter .vue Infrastructure (API) DB domain models Infrastructure Interfaces Mutations State interactor .js 7
Shared Infrastructure (DB) presenter .js interactor .js Front-End ϑϩϯτʹண view.vue
presenter .vue Infrastructure (API) DB domain models Infrastructure Interfaces Mutations State interactor .js Back-End 8
Back-End Shared Infrastructure (DB) presenter .js interactor .js όοΫ͚ͩݟΔͱ view.vue
presenter .vue Infrastructure (API) DB domain models Infrastructure Interfaces Mutations State interactor .js Front-End 9
Back-End Shared Infrastructure (DB) presenter .js interactor .js όοΫ͚ͩݟΔͱ view.vue
presenter .vue Infrastructure (API) DB domain models Infrastructure Interfaces Mutations State interactor .js Front-End 9
Back-End Shared Infrastructure (DB) presenter .js interactor .js Front-End શମͰݟΔͱʜ
view.vue presenter .vue Infrastructure (API) DB domain models Infrastructure Interfaces Mutations State interactor .js interactor Infrastructure 10
Back-End Shared Infrastructure (DB) presenter .js interactor .js Front-End શମͰݟΔͱʜ
view.vue presenter .vue Infrastructure (API) DB domain models Infrastructure Interfaces Mutations State interactor .js interactor Infrastructure 'VMM4UBDL +4 υΧϯ ΞʔΩςΫνϟʂ 10
1SPT$POT Pros oFront-EndͰυϝΠϯ͕ࣝඞཁʹͳͬͯͬͪΌΒ oFront-EndͱBack-End߹ܭͰͷΞʔΩςΫνϟϧʔϧΛݮͰ͖ͨ oఆϑΝΠϧͷڞ௨Խ Cons oϓϩδΣΫτʹಉ໊͡લͷιʔεϑΝΠϧ͕૿͑ͯࠞཚͨ͠ oFront-EndͷES Modulesʢex. importʣͱɺBack-EndʢNodeJSʣͷ
CommonJSʢex. requireʣʹۤ͠ΊΒΕͨ → esmImportΛར༻ͯ͠ղܾ 11
1SPT$POT Pros oFront-EndͰυϝΠϯ͕ࣝඞཁʹͳͬͯͬͪΌΒ oFront-EndͱBack-End߹ܭͰͷΞʔΩςΫνϟϧʔϧΛݮͰ͖ͨ oఆϑΝΠϧͷڞ௨Խ Cons oϓϩδΣΫτʹಉ໊͡લͷιʔεϑΝΠϧ͕૿͑ͯࠞཚͨ͠ oFront-EndͷES Modulesʢex. importʣͱɺBack-EndʢNodeJSʣͷ
CommonJSʢex. requireʣʹۤ͠ΊΒΕͨ → esmImportΛར༻ͯ͠ղܾ 11 ͊͞ɺ͋ͳͨ Full-Stack JavaScript Ͱ շదͳ DDD ϥΠϑΛ!