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
【2018/09/18 Otemachi.rb#9】君(退会したユーザ)の名は。
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Shu OGAWARA
September 18, 2018
Technology
0
530
【2018/09/18 Otemachi.rb#9】君(退会したユーザ)の名は。
2018/09/18のOtemachi.rb#9での発表資料です。久しぶりのRailsネタです。
Shu OGAWARA
September 18, 2018
Tweet
Share
More Decks by Shu OGAWARA
See All by Shu OGAWARA
あなたの知らないDateのひみつ / The Secret of "Date" You Haven't known #tqrk16
expajp
0
140
入門 FormObject / An Introduction to FormObject #kaigionrails
expajp
2
6.3k
あなたの「仮説検証」、ゆがんでいませんか? / Isn't Your "Hypothesis Verification" Distorted? #emoasis
expajp
2
530
Rubyはなぜ「たのしい」のか? / Why is Ruby a programmers' best friend? #tqrk15
expajp
5
2.1k
エンジニアリングマネージャーはどう学んでいくのか #devsumi / How Do Engineering Managers Continue to Learn and Grow?
expajp
9
5.7k
RubyKaigi参加歴をふりかえる / Looking Back on My RubyKaigi Participation History #kaigieffectLT
expajp
3
600
わたしのメタ学習 / My Own Meta Learning #shinjukurb
expajp
0
510
ActiveSupport::Concernで開くメタプログラミングの扉 #heiseirubykaigi / The door of meta-programing is opened by ActiveSupport::Concern
expajp
1
2.4k
実践Railsアプリケーション設計 #meetup_rails / Practical Rails Application Design
expajp
4
41k
Other Decks in Technology
See All in Technology
僕、S3 シンプルって名前だけど全然シンプルじゃありません よろしくお願いします
yama3133
1
190
Claude Codeが爆速進化してプラグイン追従がつらいので半自動化した話 ver.2
rfdnxbro
0
500
[JAWSDAYS2026][D8]その起票、愛が足りてますか?AWSサポートを味方につける、技術的「ラブレター」の書き方
hirosys_
3
120
AI時代のSaaSとETL
shoe116
1
110
脳内メモリ、思ったより揮発性だった
koutorino
0
130
オレ達はAWS管理をやりたいんじゃない!開発の生産性を爆アゲしたいんだ!!
wkm2
4
500
OpenClawで回す組織運営
jacopen
3
690
スクリプトの先へ!AIエージェントと組み合わせる モバイルE2Eテスト
error96num
0
150
決済サービスを支えるElastic Cloud - Elastic Cloudの導入と推進、決済サービスのObservability
suzukij
2
600
AIエージェント時代に備える AWS Organizations とアカウント設計
kossykinto
3
760
ナレッジワークのご紹介(第88回情報処理学会 )
kworkdev
PRO
0
180
JAWS DAYS 2026 楽しく学ぼう!ストレージ 入門
yoshiki0705
2
150
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
130
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Done Done
chrislema
186
16k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
940
Test your architecture with Archunit
thirion
1
2.2k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Ethics towards AI in product and experience design
skipperchong
2
220
Amusing Abliteration
ianozsvald
0
130
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
51k
Designing Experiences People Love
moore
143
24k
Transcript
܅ ͷ ໊ ɻ ୀձͨ͠Ϣʔβ 0UFNBDIJSC 4IV0("8"3" !FYQBKQ 1IPUPCZ/FJM3PTFOTUFDI
PO6OTQMBTI
1 !
Rails
n & %(@expajp) – ! – 3
– Ruby/Rails(1 • Project Euler 100 • Vue.js+ – # ' " – *$ )
CM
View
n post creatornil
n post
n DB posts ! user_id NULL " 0 #
n post
n DB posts ! user_id NULL " 0 #
,
n B83+,.02@A' " % – ,.020 ;E(15*,47<: $#D=
n View6-/)'C9 ? " % &" – View!6-/)'? – DRY>%
n & #$ n
'!" %
N+1
N+1 Q . L S 0 N Q . 11
N+1 / Eager Loading - Rails Webook https://ruby-rails.hatenadiary.com/entry/20141108/1415418367 ’’
N+1 n DB
→
٫Լʂ
CTO
n Active Record/. creator_id0 - * n Decorator,#4(
*&!)$+ " → post'%*&!)30$+ → DRY21
Active Record
Decorator
View
ҟٞ͋Γʂ
CH*-&0c$a2&16$ >TO@L&Kg\N MB/&K$ ;5&F Z$ [Ra2 VI% 43$QWU *-&P
D$a2Gb# $ $ SY9X`d$=^!A]?(.+'),JE" $a2&<7:f_<$ The WyCash Portfolio Management System http://c2.com/doc/oopsla92.html heSY8TO - Wikipedia ’’
n 06:?)<5DE n Decorator7*F2(> +' -4@1% –
"#! . n gem9(,38C – B/) & ;A3 $/=
NullUser, SystemUser
n Decorator Post creator n User
full_name n Post NullUser, SystemUser – full_name ! n creator User, NullUser, SystemUser
User
NullUser, SystemUser
Post
!
n DB5-6 & %!* #($). –
View,1 '! n 70+4 "*/ 32
n )$ " !'( n
View#*%&
1. 2.
3. NullUser, SystemUser
!
n ;&B5$ – ?< 12$'*/+-@ – full_nameA03 %
n ;D …… – 89" FE – DRY" n ;&,(-.4=6,). C :$# >7 !
n (#&')!% #@ n Rails0-= – *"$!,E?28DRYF<251A
– I74C>6 n +3D 9:HJ;B – /.G+3D