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 objects
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Roman Dubrovsky
June 16, 2016
Programming
180
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Form objects
Roman Dubrovsky
June 16, 2016
More Decks by Roman Dubrovsky
See All by Roman Dubrovsky
Life with GraphQL
roman_dubrovsky
0
160
Timezone pain (lighting)
roman_dubrovsky
0
38
Feature toggling
roman_dubrovsky
0
75
GraphQl paratemers (lightning)
roman_dubrovsky
0
22
Views and Controllers, Forms
roman_dubrovsky
0
28
Railway Oriented Programming
roman_dubrovsky
0
180
Git tips
roman_dubrovsky
0
72
Cells refactroing
roman_dubrovsky
0
45
Other Decks in Programming
See All in Programming
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
150
dotNET_vulnclicker_intro.pdf
deka_morita
0
150
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
100
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
270
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
230
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
1k
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
180
Kotlinize Is Not Just Converting to Kotlin
chigichan24
1
180
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
150
Jetpack Compose Mechanisms
skydoves
3
860
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
200
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
270
Featured
See All Featured
Docker and Python
trallard
47
4.2k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
630
Balancing Empowerment & Direction
lara
6
1.3k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
410
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Done Done
chrislema
187
17k
Raft: Consensus for Rubyists
vanstee
142
7.8k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
67k
Transcript
Form Objects
None
User model
None
None
None
None
https://github.com/apotonick/reform
Defining form
Defining form Building form
Defining form Building form Using form
Defining form Building form Using form Using form
Form objects can: • Mapping attributes from models to form
• Define validations for form • Simple render form’s attributes
Form object is easy
1st case
1st case
Using form
Rendering form
accepts_nested_attributes_for:
2nd case accept_nested_attributes_for cocoon
Without form objects
None
With form objects
Move validations out of models
3rd case
None
With form object it’s easy
4th case
None
None
Using forms
Summary • Form objects can mapping attributes from models to
form • Form objects defining validations for form • Simple render form’s attributes with form objects • No validations in model
None
Pros • New abstraction • Clean models • No more
conditional validations • No more conditional params permissions
Cons • New abstraction • More code • Human factor
None
ПОТРАЧЕНО