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

Unidirectional Data Flow in ReSwift

E3d96b25e645921d9e5acbaa36c507a5?s=47 Masato Oshima
February 09, 2016

Unidirectional Data Flow in ReSwift

Kyobashi.swift #1

E3d96b25e645921d9e5acbaa36c507a5?s=128

Masato Oshima

February 09, 2016
Tweet

Transcript

  1. Unidirectional Data Flow in ReSwift @_mpon Kyobashi.swift #1

  2. Masato Oshima github.com/mpon @_mpon ಢ໦ݝ๕լ܊ग़਎ iOS Developer

  3. None
  4. None
  5. DDoommaaiinn DDrriivveenn DDeessiiggnn

  6. ͋Δ೔ͷ4MBDL

  7. ͱ͍͏͜ͱͰ 3F4XJGU Λௐ΂ͯΈΔ

  8. Ұఆํ޲ͷΈͷσʔλϑϩʔJO4XJGU 3FEVY͔ΒΠϯεύΠΞ͞Εͨ

  9. 3FEVY

  10. b`3FEVYJTBOBMUFSOBUJWF PSBWBSJBUJPOPGUIF qVYGSBNFXPSL``

  11. 'MVY

  12. b`'MVYJTUIFBQQMJDBUJPO BSDIJUFDUVSFUIBU'BDFCPPLVTFT GPSCVJMEJOHDMJFOUTJEFXFC BQQMJDBUJPOT``

  13. Ұఆํ޲ͷΈͷσʔλϑϩʔ 4UPSF͸ࣗ෼ࣗ਎Λॻ͖׵͑Δ

  14. +BWB4DSJQUΞϓϦέʔγϣϯͷͨΊͷϑϨʔ ϜϫʔΫɻ'MVYΛਐԽͤͯ͞ෳࡶੑΛճආ͠ Α͏ͱ͍ͯ͠Δɻ

  15. 3FEVYͱಉ͡ߏ੒

  16. 4UPSF͸ΞϓϦέʔγϣϯ ͷ4UBUFΛ؅ཧ͍ͯ͠Δɻ "DUJPO͸4UPSFͷ4UBUFΛ มߋ͢ΔͨΊͷએݴ͕ॻ ͔Ε͍ͯΔɻ 3FEVDFS͸"DUJPOΛड͚ औͬͯ৽͍͠4UBUFΛฦ ͢ɻ

  17. ϘλϯΛλοϓͨ͠ͱ͖ʹ"DUJPOΛੜ੒ͯ͠ɺ 4UPSFʹEJTQBUDI͢Δɻ

  18. 4UPSF͸ड͚औͬͨ"DUJPOΛ3FEVDFSʹ౉ ͢ɻ

  19. 3FEVDFS͸"DUJPOΛ΋ͱʹ৽͍͠4UBUF Λฦ͢ɻ

  20. 4UPSF͸৽͍͠4UBUFΛ4VCTDSJCF͍ͯ͠Δશ ͯͷ7JFXʹ௨஌͢Δɻ

  21. None
  22. 7JFX$POUSPMMFS͕TUPSFΛTVCTDSJCF͢Δɻ

  23. ϘλϯΛԡͨ͠ͱ͖ʹɺ"DUJPOΛੜ੒ͯ͠ɺ 4UPSFʹEJTQBUDI͢Δɻ

  24. 4UPSF͸"QQ%FMFHBUFͰͨͩͭଘࡏͯ͠શͯͷঢ়ଶΛ؅ ཧ͍ͯ͠Δɻͦͯ͠ɺ4UPSF͸3FEVDFSΛ࣋ͪɺ3FEVDFS ͸IBOEMF"DUJPOͱ͍͏ϝιουΛඞͣ࣋ͭɻ IBOEMF"DUJPO͸͖ͬ͞EJTQBUDI͞Εͨ"DUJPOͱݱࡏͷ TUBUFΛ΋ͱʹ৽͍͠"QQ4UBUFΛੜ੒͢Δɻ

  25. 3FEVDFS͸"DUJPOͷछྨʹΑͬͯॲཧΛߦ͍৽͍͠ TUBUFΛੜ੒͢Δɻ΋ͱͷTUBUFΛมߋ͢Δ͜ͱ͸͠ ͳ͍ɻ

  26. 4UPSF͔Β৽͍͠TUBUF͕OPUJGZ͞ΕΔͷͰɺTUBUFΛ ΋ͱʹɺϥϕϧͷදࣔΛߋ৽͢Δɻ

  27. ΞϓϦ͕େ͖͘ͳ͖ͬͯͨ ͱ͖ʹ4UBUF͕େมͳ͜ͱʹ ͳΓͦ͏ʁ খ͞ͳมߋʹରͯ͠WJFXͷ ࠶ඳըͷύϑΥʔϚϯε͸ Ͳ͏ͳΜͩΖ͏ʁ "OJNBUJPOͷ్தঢ় ଶ΋؅ཧ͢Δͷ͔ʁ

  28. ࢀߟʹͨ͠αΠτ w IUUQTSFBMNJPOFXTCFOKJFOD[VOJEJSFDUJPOBMEBUBqPXTXJGU w IUUQGBDFCPPLHJUIVCJPqVYEPDTPWFSWJFXIUNM w IUUQTHJUIVCDPN3F4XJGU3F4XJGU w IUUQTHJUIVCDPNSBDLUSFEVY w

    IUUQJOTJEFQJYJWOFUFOUSZ w IUUQRJJUBDPNLJJUBJUFNTBGCDGC
  29. ReSwift ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ