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
130
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
Amplify 🩷 Bedrock 〜生成AI入門〜
minorun365
PRO
8
400
The AI Revolution Will Not Be Monopolized: Behind the scenes
inesmontani
PRO
1
150
非同期推論システムによるコスト削減と信頼性向上
koki_nishihara
1
360
Além do else! Categorizando Pokemóns com Pattern Matching no JavaScript
wmsbill
0
700
AOAI をきっかけに 社内の Azure 管理を見直した話
recruitengineers
PRO
1
440
BPStudyの200回を中心にIT業界を振り返る。そしてこれから
haru860
3
390
家族アルバム みてねにおけるGrafana活用術 / Grafana Meetup Japan Vol.1 LT
isaoshimizu
1
910
TechFeed Experts Night#27 〜 フロントエンドフレームワーク最前線 (Svelte)
baseballyama
2
590
KubeConにproposalを送りたい人へのアドバイス
sat
PRO
3
270
DMM.com アルファ室採用案内資料
hsugita
1
220
Azureの基本的な権限管理の勉強会
yhana
1
2k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
4
37k
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
290
19k
GraphQLとの向き合い方2022年版
quramy
33
12k
What the flash - Photography Introduction
edds
64
11k
What’s in a name? Adding method to the madness
productmarketing
PRO
17
2.7k
How To Stay Up To Date on Web Technology
chriscoyier
782
250k
Gamification - CAS2011
davidbonilla
77
4.6k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
Designing with Data
zakiwarfel
96
4.8k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
19
1.6k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
123
39k
Docker and Python
trallard
35
2.7k
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 ϥΠϑΛ!