RailsでViewModel導入に 挫折しかけてる話@表参道.rb #44

RailsでViewModel導入に 挫折しかけてる話@表参道.rb #44

586a2d464eed3c7e5dd809d6fe0269d7?s=128

YABOO JAPAN

April 04, 2019
Tweet

Transcript

  1. RailsͰViewModelಋೖʹ ࠳ં͔͚ͯ͠Δ࿩ @yaboojp omotesando.rb #45 2019/4/4

  2. Self • Identifer • େ༅ Ӭ / Ϡϒ / @yaboojp

    • Job: • 22Inc. ૑ۀ -> Co-Founder & CTO • NTTdata -> ৽ଔͰΤϯδχΞ • Ed • େֶ -> ࣗવݴޠղੳͷݚڀ • ֶੜϕϯνϟʔ -> ஍ҬݶఆϑϦϚαʔϏεʢPHPʣ • Location • ژ౎ to ౦ژ • Favorites • Իָ, όΠΫ, ΫϥϑτϏʔϧ, JALϚΠϧ
  3. None
  4. None
  5. Έͳ͞ΜͷRoRͬͯ ViewModel͋Γ·͢ʁ

  6. Ҿ༻ɿ https://techracho.bpsinc.jp/hachi8833/2013_11_19/14738

  7. Ҿ༻ɿ https://techracho.bpsinc.jp/hachi8833/2013_11_19/14738

  8. MVVMύλʔϯ Frontend εϚϗΞϓϦͱ͔+4ϑϨʔϜϫʔ Ϋͷ։ൃͩͱ͓ೃછΈ Ҿ༻ɿ https://qiita.com/s_emoto/items/b000a5c076f3d6076972

  9. RoRʹ͓͚ΔViewModelͬͯʁ • Decoratorͱݺ͹ΕΔ͜ͱ͕ଟ͍(ؾ͕͢Δ) • Gemͩͱactive_decorator, draper ͳͲ

  10. ͜͏͍͏ఆٛ΋͋ΔΒ͍͠ Ҿ༻: https://tech.kitchhike.com/entry/2018/02/28/221159

  11. ࣗ෼͕ߟ͑ͯͨͷʹ͍ۙ Ҿ༻: https://qiita.com/shunhikita/items/7fdb5d95c883e38c63fc

  12. ͱΓ͋͑ͣ ΍ͬͯΈΑ͏

  13. ·͊ɺݟ͍ͯͩ͘͞Α

  14. ͜͏͍͏ը໘ΛϦϑΝΫλ͔ͨͬͨ͠

  15. ഑৴ཤྺ ഑৴༧໿ ࣗಈઃఆ Լॻ͖த Ωϟϯϖʔϯͷ഑৴Ұཡϖʔδ

  16. $POUSPMMFS ɾେྔͷΠϯελϯεϝ ιουͷੜ੒ ɾ"3΁ͷΞΫηε #FGPSF

  17. "GUFS $POUSPMMFS ɾεοΩϦ͸ͨ͠ 7JFX.PEFM ɾ̍ϝιουʹ٧ΊࠐΈ ɾಛఆͷ7JFXʹґଘ͠ ͗͢

  18. "GUFS $POUSPMMFS ɾಉ͘͡εοΩϦ 7JFX.PEFM ɾཉ͍͠৘ใຖʹϝιο υ෼͚ͨ ɾϢʔεέʔεʹ

  19. Μʔ

  20. ฐࣾΞϓϦΤϯδχΞʹฉ͍ͨ • ʮΦϨͷ஌ͬͯΔViewModelͪΌ͏ʯ • ʮ͜ΕBaseControllerͰ͑͑ΜͪΌ͏Μʯ • ...ίϨδϟφΠ

  21. > git branch -d feature/add-view-model

  22. ઃܭڧ͍ਓ͍·ͤΜ͔ʁ