DDD + Flux?

14084b6462b19a8512ce5208a76f8925?s=47 fand/amagitakayosi
September 08, 2015
3.6k

DDD + Flux?

14084b6462b19a8512ce5208a76f8925?s=128

fand/amagitakayosi

September 08, 2015
Tweet

Transcript

  1. DDD + Flux? @amagitakayosi

  2. Implementing Domain Driven Design

  3. ͱࢥͬͨ͜ͱΛ঺հ͠·͢ 㵺㱿㵺 ɻP 'MVYͰ͸ʁ

  4. Flux

  5. %JTQBUDIFS $PNQPOFOU 4UPSF "DUJPO %BUB Flux

  6. %JTQBUDIFS $PNQPOFOU #BS"DUJPO 'PP4UPSF 'PP 'PP"DUJPO #BS4UPSF #BS Store͕૿͑Δͱ…

  7. DDD

  8. Domain-Driven Design • ϏδωεϩδοΫΛυϝΠϯʹ෼ׂ • ΞϓϦέʔγϣϯ = υϝΠϯͷू߹ • ϩδοΫͱ࣮૷ͷ෼཭Λॏࢹ

  9. %JTQBUDIFS $PNQPOFOU #BS"DUJPO 'PP4UPSF 'PP 'PP"DUJPO #BS4UPSF #BS Store͕૿͑Δͱ…

  10. %JTQBUDIFS $PNQPOFOU #BS"DUJPO 'PP4UPSF 'PP 'PP"DUJPO #BS4UPSF #BS Store͕૿͑Δͱ… $PNQPOFOU

  11. %JTQBUDIFS $PNQPOFOU #BS"DUJPO 'PP4UPSF 'PP 'PP"DUJPO #BS4UPSF #BS $PNQPOFOU FooυϝΠϯ

    BarυϝΠϯ
  12. #SPXTFS React 4FSWFS

  13. Store "1* %#

  14. Store "1* %# 4FSWJDF΋4UPSF্Ͱ࣮૷͢Δʂʂʂ

  15. CQRS

  16. Command Query Responsibility Segregation • ௚༁͢ΔͱʮίϚϯυΫΤϦ੹೚෼཭ʯ • ίϚϯυ : ঢ়ଶΛมߋ͢Δ

    • ΫΤϦ : ঢ়ଶΛऔಘ͢Δ • ঢ়ଶͷऔಘํ๏Λ੍ݶ͠ɺߟ͑ΔࣄΛݮΒ͢
  17. FluxͱCQRS • Action ≒ Command ? • Store͸ɺߋ৽ͷͳ͍ActionΛແࢹ͢Δ • Store.getState()

    ≒ Query ? • StoreΛ௚઀มߋ͢Δͷ͸ !
  18. Flux

  19. 4UPSF "DUJPO %JTQBUDIFS $PNQPOFOU .PEFM

  20. Flux

  21. Flux

  22. Event Sourcing

  23. EventSourcing • ू໿ΛΠϕϯτͷγʔέϯε͔Β࡞Δ • ݱࡏͷঢ়ଶ = ॳظঢ়ଶ + Πϕϯτ •

    CommandͷΈอଘ͢Ε͹ྑ͍ • ActionΛه࿥͍ͯ͠Ε͹͓̺
  24. DispatcherͰه࿥ͯ͠ΈΔ • facebook/flux ͷ Dispatcher Λ֦ு • Πϕϯτͱ࣌ࠁΛه࿥ • replayػೳ

  25. None
  26. None
  27. σϞ http://gmork.in/rec-act/

  28. ·ͱ Ί

  29. ·ͱΊ • Store = υϝΠϯͱ࣮૷Λͭͳ͙ϙʔτ • Entity͸Storeʹஔ͘ • Redux౳ͩͱEntity࣋ͪʹ͍͘ •

    ΈΜͳͰStoreߏ଄Խͯ͜͠ʂʂʂʂ