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
Queryオブジェクトとは / What is a Query Object in Rails?
Search
KH
September 12, 2024
19
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Queryオブジェクトとは / What is a Query Object in Rails?
KH
September 12, 2024
More Decks by KH
See All by KH
ファシリテーションテクニック / facilitation technic
kh777
0
18
Ruby Silverを取得してみた
kh777
0
47
Ruby と Rails のざっくりとした Cookie の扱い方
kh777
0
20
進数を学ぼう!(Rubyの事例)
kh777
0
60
睡眠テクニックを身につける / sleep-technique
kh777
0
72
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
710
How STYLIGHT went responsive
nonsquared
100
6.3k
Ethics towards AI in product and experience design
skipperchong
2
430
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
560
KATA
mclloyd
PRO
35
16k
sira's awesome portfolio website redesign presentation
elsirapls
0
450
エンジニアに許された特別な時間の終わり
watany
109
250k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
280
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Invisible Side of Design
smashingmag
301
52k
Transcript
Queryオブジェクトとは
・デザインパターンは、再利用可能で効率的なコード設計を行うこと Fat ModelやFat Controller等の問題を回避できる ex) Decoratorオブジェクト、Formオブジェクトなど ・ModelやControllerの検索ロジックをQueryオブジェクトに分離す
ることで、再利用性の向上と責務の分離ができる Queryオブジェクトとは? ・Railsのデザインパターンの1つ
Queryオブジェクトの例
Queryオブジェクトを駆使すれば、gemの依存関係の回避につながる ・某イケてるRailsを使ったSaaS企業では、検索機能でgemを使わず Queryオブジェクトを使っているらしい ・gemはgem同士依存してメモリ使用量などパフォーマンスに影響するし、 バージョン管理が大変 ・shopifyではボトルネックになっていた500前後のgemをできる限り 削除したらしい
他のデザインパターンも学習するぞ