Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Form Object へ捧げる気持ち
Search
HaiTo
September 06, 2018
Programming
1.7k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Form Object へ捧げる気持ち
HaiTo
September 06, 2018
More Decks by HaiTo
See All by HaiTo
管理画面再考
haito
0
270
ゾンビを倒してRuby.2.2に上げた話
haito
0
130
独自Worker管理が辛い
haito
0
210
色々なレビューの話
haito
0
160
おしゃれっぽくターミナルでストリーミング再生をしたかった話
haito
0
140
dendai_lt_1011
haito
0
70
Other Decks in Programming
See All in Programming
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.1k
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
410
contenteditable と日本語入力に向き合う
colorful12
0
200
ChromeでローカルLLM
ryu1013
0
140
Next.js: The final boss of Web Performance
guaca
0
260
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
110
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
3.6k
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
670
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.6k
Making Projects Easy
brettharned
120
6.8k
It's Worth the Effort
3n
188
29k
The Cost Of JavaScript in 2023
addyosmani
55
10k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
340
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Design in an AI World
tapps
1
350
Visualization
eitanlees
153
17k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
300
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Music & Morning Musume
bryan
48
7.4k
Transcript
FormObjectʹ๋͛Δؾ࣋ͪ HaiTo / දࢀಓrb#38
࣍ • About me • Conclusion • Context, Subject •
Why • Conclusion - Revival
࣍ • About me • Conclusion • Context, Subject •
Why • Conclusion - Revival
HaiTo Name: HaiTo Hobby: Game(League of Legends) ࠷ۙPHPॻ͍ͯ·͢ɻ දࢀಓ.rbٱʑ͗͢Δ
͖͑͘͢Ύʔͣ • ڧ͍ݴ༿Λൃ͠·͢ɻ • Θ͟ͱἤΓؾຯʹൃ͠·͢ɻ • ຊʮνʔϜͰٞͯ͠ྑ͍ͱࢥͬͨͦͷ࣌ͷίϯ ηϯαεʹଇͬͯιϑτΣΞॻ͍͍ͯ͜͏ͳʯͱৗʹ ࢥ͍ͬͯ·͕͢ɺҰ୴͜ͷ͜ͱΕͯ͠·͢ɻ
࣍ • About me • Conclusion • Context, Subject •
Why • Conclusion - Revival
େͳ͜ͱ࠷ॳʹ
Զ͕ѱ͔ͬͨɻૉʹؒҧ͍ΛೝΊΔ͔Βɺ ͏FormObjectͱ͔࡞ΔͷΊͯ͘Ε ݩωλ: https://qiita.com/joker1007/items/25de535cd8bb2857a6
࣍ • About me • Conclusion • Context, Subject •
Why • Conclusion - Revival
Context • ݹࠓ౦ɺRailsͷMVCɺಛʹModelͷऔѻʹ͍ͭͯਓʑ಄Λ๊ ͖͑ͯͨ • ServiceClass, FormObject, Decorator, … •
ModelΛऔΓѻ͏ผͷΛՃ͢Δ͜ͱͰɺڽूΛߴΊΔɺ͋Δ ͍ςελϏϦςΟΛߴΊΔ • ͦΜͳࢥͷதͰ͜Ε·Ͱͨ͘͞ΜͷϨΠϠʔΈ͕Railsͷ ্ʹߏங͞Ε͍ͯͬͨ • Form Objectɺ൴·ͨͦͷ͏ͪͷҰਓͩ
Subject • FormObject ͱ͍͏໊લͰɺViewModel͕ര͢Δ • ͜Εྑͦ͞͏ • ͦͯͦ͠ͷViewModel͕ͳ͔ͥӬଓԽͷࣝΛ͍࣋ͬͯ Δ •
ŠƀŜƄƂŜŽūŘ
࣍ • About me • Conclusion • Context, Subject •
Why, What • Conclusion - Revival
ͲΏ͜ͱ͔ʁ • Sublime Text 3 ʹFormObjectͷαϯϓϧίʔυ͕͋Δ ͷͰݟΔ • αϯϓϧίʔυͷ save
؆ศ͔ͩΒ͍͍͚Ͳɺ͍ͩͨ ͍FormObject͕ര͢Δͱ͖ෳࡶͳۀ༻݅ͱARͰ ఆٛ͞ΕͨσʔλεΩʔϚͷϛεϚονʹΑͬͯര͠ ͨΓɺContextΛ໌ࣔ͢ΔͨΊʹര͢ΔͷͰɺͦͷ Contextʹ͓͚ΔಛผͳValidationSave࣌ͷσʔλͷந ग़ɺܗ͕ൃੜͨ͠Γ·͢ɻ
None
ͲΏ͜ͱ͔ʁ • αϯϓϧίʔυͷ save ؆ศ͔ͩΒ͍͍͚Ͳɺ͍ͩͨ ͍FormObject͕ര͢Δͱ͖ෳࡶͳۀ༻݅ͱARͰ ఆٛ͞ΕͨσʔλεΩʔϚͷϛεϚονʹΑͬͯര͠ ͨΓɺContextΛ໌ࣔ͢ΔͨΊʹര͢ΔͷͰɺͦͷ Contextʹ͓͚ΔಛผͳValidationSave࣌ͷσʔλͷந ग़ɺܗ͕ൃੜͨ͠Γ·͢ɻ
ͲΏ͜ͱ͔ʁ • ͋ͱɺ͔ͤͬ͘ARͷੈք؍͔ΒΕͨͷʹΘ͟Θ͟ෳ ͷΛ࣋ͬͨClassΛ࡞Δͷ͍͔͕ͳͷ͔ʁ • ViewModelɺͭ·ΓෳͷϞσϧ͋ΔϞσϧ͔Βಛఆ ίϯςΫετʹଇͬͨଐੑΛ࣋ͬͨද͚ࣔͷObject ͡Όͳ͍Ͱ͔͢ • ͳΜͰͦͷViewModel͕ӬଓԽͷࣝΛ࣋ͬͯΔΜͰ͢
͔ʂ AR͡Ό͋Δ·͍ʹʂAR͡Ό͋͋Δ·͍ʹʂʂʂ
Ͱɺ͓લͲ͏͍ͨ͠ͷʁ • Sublime Text 3ͷαϯϓϧίʔυ࠶ͼ
None
Ͱɺ͓લͲ͏͍ͨ͠ͷʁ • ݸਓతʹ͜Ε͘Βཻ͍খ͍ͨ͘͞͠ • ͋Δ͍FormObject͕ࣗΛͯ͠SignupClassΛୟ͘ ͱ͔ɻ͘͢ͳ͘ͱผClassɻ
࣍ • About me • Conclusion • Context, Subject •
Why • Conclusion - Revival
OOPͱ͔FormObjectΛ͢Ε͍͍ͱ͔ͦ͏ ͍͏ͷࣙΊͯɺͱΓ͋͑ͣ΄ΜͱʹԠ͡ ͯΨϯΨϯClass࡞͍ͬͯ͜͏