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
57
GraphQl paratemers (lightning)
roman_dubrovsky
0
15
Views and Controllers, Forms
roman_dubrovsky
0
19
Railway Oriented Programming
roman_dubrovsky
0
130
Git tips
roman_dubrovsky
0
58
Cells refactroing
roman_dubrovsky
0
38
Other Decks in Programming
See All in Programming
レガシープロジェクトで最大限AIの恩恵を受けられるようClaude Codeを利用する
tk1351
2
170
コンテキストエンジニアリングで変わるAI活用 リファクタリングワークフローの実践から学んだ形式知
leveragestech
0
100
Dart 参戦!!静的型付き言語界の隠れた実力者
kno3a87
0
200
自作OSでDOOMを動かしてみた
zakki0925224
1
1.4k
AIレビュアーをスケールさせるには / Scaling AI Reviewers
technuma
2
200
AIエージェント開発、DevOps and LLMOps
ymd65536
1
150
Amazon Q CLI開発で学んだAIコーディングツールの使い方
licux
3
180
一人でAIプロダクトを作るための工夫 〜技術選定・開発プロセス編〜 / I want AI to work harder
rkaga
12
2.7k
あのころの iPod を どうにか再生させたい
orumin
2
2.5k
DockerからECSへ 〜 AWSの海に出る前に知っておきたいこと 〜
ota1022
5
1.6k
Google I/O Extended Incheon 2025 ~ What's new in Android development tools
pluu
1
290
Langfuseと歩む生成AI活用推進
licux
3
250
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
40
2k
The Cost Of JavaScript in 2023
addyosmani
53
8.8k
Building Adaptive Systems
keathley
43
2.7k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.4k
Thoughts on Productivity
jonyablonski
69
4.8k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
890
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
30
9.6k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
1k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Fireside Chat
paigeccino
39
3.6k
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
ПОТРАЧЕНО