Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
RailsでViewModel導入に 挫折しかけてる話@表参道.rb #44
Search
YABOO JAPAN
April 04, 2019
Technology
1
960
RailsでViewModel導入に 挫折しかけてる話@表参道.rb #44
YABOO JAPAN
April 04, 2019
Tweet
Share
More Decks by YABOO JAPAN
See All by YABOO JAPAN
RubyKaigiでもらった熱量がOSSに変換された話@AFTER RubyKaigi 2019
yaboojp
0
2.6k
サービス開発する平成の君に 昭和の僕から伝えたい7つのこと@平成.rb #2
yaboojp
0
800
RailsのCacheつかってますか?@表参道.rb #44
yaboojp
0
770
夏休みの宿題 8/31にやらない話 @Otemachi.rb #14
yaboojp
0
340
ぼくが考える最強のApplicationModel @表参道.rb #43
yaboojp
0
700
大掃除 on Rails @Otemachi.rb #12
yaboojp
1
71
使わない機能の倒し方 @s-dev talks 〜サービス開発勉強会〜 大忘年LT大会
yaboojp
0
100
Other Decks in Technology
See All in Technology
Challenging Hardware Contests with Zephyr and Lessons Learned
iotengineer22
0
120
Playwright x GitHub Actionsで実現する「レビューしやすい」E2Eテストレポート
kinosuke01
0
330
LLM-Readyなデータ基盤を高速に構築するためのアジャイルデータモデリングの実例
kashira
0
210
regrowth_tokyo_2025_securityagent
hiashisan
0
170
Oracle Technology Night #95 GoldenGate 26ai の実装に迫る1
oracle4engineer
PRO
0
150
Noを伝える技術2025: 爆速合意形成のためのNICOフレームワーク速習 #pmconf2025
aki_iinuma
2
2k
エンジニアとPMのドメイン知識の溝をなくす、 AIネイティブな開発プロセス
applism118
4
820
A Compass of Thought: Guiding the Future of Test Automation ( #jassttokai25 , #jassttokai )
teyamagu
PRO
1
240
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
5分で知るMicrosoft Ignite
taiponrock
PRO
0
190
技術以外の世界に『越境』しエンジニアとして進化を遂げる 〜Kotlinへの愛とDevHRとしての挑戦を添えて〜
subroh0508
1
380
Edge AI Performance on Zephyr Pico vs. Pico 2
iotengineer22
0
110
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Building an army of robots
kneath
306
46k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
A Tale of Four Properties
chriscoyier
162
23k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Docker and Python
trallard
47
3.7k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
RailsConf 2023
tenderlove
30
1.3k
Transcript
RailsͰViewModelಋೖʹ ࠳ં͔͚ͯ͠Δ @yaboojp omotesando.rb #45 2019/4/4
Self • Identifer • େ༅ Ӭ / Ϡϒ / @yaboojp
• Job: • 22Inc. ۀ -> Co-Founder & CTO • NTTdata -> ৽ଔͰΤϯδχΞ • Ed • େֶ -> ࣗવݴޠղੳͷݚڀ • ֶੜϕϯνϟʔ -> ҬݶఆϑϦϚαʔϏεʢPHPʣ • Location • ژ to ౦ژ • Favorites • Իָ, όΠΫ, ΫϥϑτϏʔϧ, JALϚΠϧ
None
None
Έͳ͞ΜͷRoRͬͯ ViewModel͋Γ·͢ʁ
Ҿ༻ɿ https://techracho.bpsinc.jp/hachi8833/2013_11_19/14738
Ҿ༻ɿ https://techracho.bpsinc.jp/hachi8833/2013_11_19/14738
MVVMύλʔϯ Frontend εϚϗΞϓϦͱ͔+4ϑϨʔϜϫʔ Ϋͷ։ൃͩͱ͓ೃછΈ Ҿ༻ɿ https://qiita.com/s_emoto/items/b000a5c076f3d6076972
RoRʹ͓͚ΔViewModelͬͯʁ • DecoratorͱݺΕΔ͜ͱ͕ଟ͍(ؾ͕͢Δ) • Gemͩͱactive_decorator, draper ͳͲ
͜͏͍͏ఆٛ͋ΔΒ͍͠ Ҿ༻: https://tech.kitchhike.com/entry/2018/02/28/221159
͕ࣗߟ͑ͯͨͷʹ͍ۙ Ҿ༻: https://qiita.com/shunhikita/items/7fdb5d95c883e38c63fc
ͱΓ͋͑ͣ ͬͯΈΑ͏
·͊ɺݟ͍ͯͩ͘͞Α
͜͏͍͏ը໘ΛϦϑΝΫλ͔ͨͬͨ͠
৴ཤྺ ৴༧ ࣗಈઃఆ Լॻ͖த Ωϟϯϖʔϯͷ৴Ұཡϖʔδ
$POUSPMMFS ɾେྔͷΠϯελϯεϝ ιουͷੜ ɾ"3ͷΞΫηε #FGPSF
"GUFS $POUSPMMFS ɾεοΩϦͨ͠ 7JFX.PEFM ɾ̍ϝιουʹ٧ΊࠐΈ ɾಛఆͷ7JFXʹґଘ͠ ͗͢
"GUFS $POUSPMMFS ɾಉ͘͡εοΩϦ 7JFX.PEFM ɾཉ͍͠ใຖʹϝιο υ͚ͨ ɾϢʔεέʔεʹ
Μʔ
ฐࣾΞϓϦΤϯδχΞʹฉ͍ͨ • ʮΦϨͷͬͯΔViewModelͪΌ͏ʯ • ʮ͜ΕBaseControllerͰ͑͑ΜͪΌ͏Μʯ • ...ίϨδϟφΠ
> git branch -d feature/add-view-model
ઃܭڧ͍ਓ͍·ͤΜ͔ʁ