Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Form objects
Search
Roman Dubrovsky
June 16, 2016
Programming
1
170
Form objects
Roman Dubrovsky
June 16, 2016
Tweet
Share
More Decks by Roman Dubrovsky
See All by Roman Dubrovsky
Life with GraphQL
roman_dubrovsky
0
150
Timezone pain (lighting)
roman_dubrovsky
0
33
Feature toggling
roman_dubrovsky
0
60
GraphQl paratemers (lightning)
roman_dubrovsky
0
17
Views and Controllers, Forms
roman_dubrovsky
0
21
Railway Oriented Programming
roman_dubrovsky
0
150
Git tips
roman_dubrovsky
0
62
Cells refactroing
roman_dubrovsky
0
40
Other Decks in Programming
See All in Programming
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
640
組織で育むオブザーバビリティ
ryota_hnk
0
170
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
100
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
500
Basic Architectures
denyspoltorak
0
660
AI & Enginnering
codelynx
0
110
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
250
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
510
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
Featured
See All Featured
Marketing to machines
jonoalderson
1
4.6k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
320
Prompt Engineering for Job Search
mfonobong
0
160
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
160
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
440
Test your architecture with Archunit
thirion
1
2.1k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
170
エンジニアに許された特別な時間の終わり
watany
106
230k
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
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
ПОТРАЧЕНО