Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Full-Stack JavaScript meets DDD.

Full-Stack JavaScript meets DDD.

2020-01-10 に開催された、DDD meetup#3 でのLT資料です。
Vuex+Express環境でどんなアーキテクチャを採用したか、して良かったこと/悪かったことをまとめました。

Yusuke SAITO

January 10, 2020
Tweet

Other Decks in Technology

Transcript

  1. 8IPBN* iOS ߨࢣ IT ΞʔΩςΫτ αʔϏε σβΠφ iOS ΤϯδχΞ UX

    σβΠφ swiftຊ ࣥච 1 +*#6/45:-&*OD$&0 ೥
  2. େࣄͩΑͶɺڞ௨ೝࣝ ʮࢲͷதͷʯDDD ໨త γεςϜϞσϧΛϝϯλϧϞσϧͱ͚ۙͮΔ͜ͱ Ұޱʹ ݴ͏ͱ υϝΠϯ஌ࣝͱͦͷଞͷίʔυͷ෼཭ DDDͨ͠ ࡍͷ ΰʔϧ

    ᶃ υϝΠϯ஌͕ࣝϝϯλϧϞσϧʹ͍ۙܗͰ ϞσϦϯά͞Ε͍ͯΔ ᶄ υϝΠϯ஌ࣝͱͦͷଞͷίʔυ͕෼཭͞Εͨ ԿΒ͔ͷΞʔΩςΫνϟ͕࠾༻͞Ε͍ͯΔ 3
  3. 7VFYͱ͸ ૝ఆ͢Δํ๏ʢϢʔεέʔεʣ ͷΈ͕ঢ়ଶΛมߋͰ͖Δ͜ͱΛ อূ͢Δɺঢ়ଶ؅ཧύλʔϯΛ ࣮ݱ͢ΔϥΠϒϥϦɻ 7 Actions Mutations State Vue

    Components dispatch commit mutate render Backend API Vuex ͕͜͜ VueJS → Vuex͕૝ఆ͢Δϑϩϯτ ΤϯυΞʔΩςΫνϟ
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  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 'VMM4UBDL +4 υΧϯ ΞʔΩςΫνϟʂ 10