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
Beyond Active Record
Search
Masafumi Okura
September 26, 2019
Programming
3
680
Beyond Active Record
Masafumi Okura
September 26, 2019
Tweet
Share
More Decks by Masafumi Okura
See All by Masafumi Okura
Why did my proposals get rejected?
okuramasafumi
1
440
A suggestion for the future of RDoc
okuramasafumi
1
66
15 JSON serializers for Ruby
okuramasafumi
2
110
Tech Events, Should We See Them from the Outside or the Inside?
okuramasafumi
1
39
Creating gems 101
okuramasafumi
1
82
How NOT to make your DSL terrible
okuramasafumi
0
280
オブジェクトしこう
okuramasafumi
2
210
Debugging Alba
okuramasafumi
1
190
Learning Ruby
okuramasafumi
5
560
Other Decks in Programming
See All in Programming
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
現場で役立つモデリング 超入門
masuda220
PRO
15
3.2k
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
330
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.4k
Ethereum_.pdf
nekomatu
0
460
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
100
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
4
640
初めてDefinitelyTypedにPRを出した話
syumai
0
400
Featured
See All Featured
Embracing the Ebb and Flow
colly
84
4.5k
RailsConf 2023
tenderlove
29
900
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Practical Orchestrator
shlominoach
186
10k
A better future with KSS
kneath
238
17k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Scaling GitHub
holman
458
140k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
The Pragmatic Product Professional
lauravandoore
31
6.3k
4 Signs Your Business is Dying
shpigford
180
21k
Speed Design
sergeychernyshev
24
610
Transcript
Active Recordͷ ͜͏ଆ Place: Rails Developers Beer Bash Date: 2019-09-26
Speaker: େխ࢙
ࣗݾհ • ໊લɿେխ࢙ • ৬ۀɿϑϦʔϥϯεͷRubyϓϩάϥϚ • ҰݴɿVimConfͷӡӦͬͯ·͢ɺ11݄3։ ࠵ʂνέοτ·ͩ͋ΔΑʂ • ೋݴɿGrow.rbͱ͍͏ίϛϡχςΟͬͯ·͢
ActiveRecord ͖ͳਓ✋
Ruby Weekly ͍ͬͯΔਓ✋
ࠓͷLTͷ͖͔͚ͬ
https://rubyweekly.com/ issues/467
> Active Record is the worst of all the popular
ORM patterns
None
ຊʹͦ͏ͳͷ͔ʁ
ʮRuby on Railsͷ ਖ਼ମͱ͖߹͍ํʯ https://speakerdeck.com/yasaichi/what-is-ruby-on-rails- and-how-to-deal-with-it
Active RecordͰίʔϧ όοΫͱόϦσʔγϣϯͰ σʔλϞσϧͱϢʔεέʔε ͕ີ݁߹͓ͯ͠ΓɺͦΕ͕ߴ ։ൃΛՄೳʹ͍ͯ͠Δ
ີ݁߹ѱ☠
Active Recordಉ͡σʔλ ϞσϧʹෳͷϢʔεέʔε ͕ద༻͞ΕΔͱਏ͘ͳΔ
͜Ε·ͰʹఏҊ͞Εͨղܾࡦ
ʮRuby (off|with) the Railsʯ https://speakerdeck.com/shinpeim/ruby-off-with-the- rails
Ϣʔεέʔε͕ҟͳΔෳͷ Ϟσϧ͕ಉ͡ςʔϒϧΛࢀর ͢Δ
ʮApplicationModel ͷ͋Δ ෩ܠʯ https://speakerdeck.com/hshimoyama/rails-with- applicationmodel
ςʔϒϧʹඥ͔ͳ͍Ϟσϧ ʢApplicationModelʣΛఆ ٛ͢Δ
ͦͯ͠ɺօ͞Μ͓ͳ͡Έͷ αʔϏεΫϥε
ͲΕΑͦ͞͏☺
͕ͩͲΕެࣜͰͳ͍
ͱ͜ΖͰɺ࠷ۙͷDHHͷൃݴ Λฉ͍͍ͯΔͱɺ ʮ౷߹͞ΕͨγεςϜ ʢintegrated systemsʣʯ ʮݫͳϞϊϦε ʢmajestic monolithsʣʯ ͷݴٴ͕ଟ͍
https://rubyonrails.org/ doctrine/#integrated- systems
໌֬ͳϞϊϦεࢦ
࠷ۙͷRailsActive Storage ϚϧνDBػೳͷΑ͏ʹgem ͷػೳΛऔΓࠐΈͭͭ͋Δ
ཚཱ͢ΔαʔϏεΫϥεϥΠ ϒϥϦ
DHH͞ΜɺActive Recordͷ ্ʹͤΔύλʔϯ ”Omakase”Ͱग़ͯ͘͠Ε· ͤΜ͔Ͷʁ
·ͱΊ • Active Recordύλʔϯ࠷ॳ͍͍ͭɺͩ ͕ͦͷ͏ͪਏ͘ͳΔ • ղܾࡦ͢ͰʹෳఏҊ͞Ε͍ͯΔ͕ɺެࣜ ͷͷͳ͍ • ʮ౷߹͞ΕͨγεςϜʯͷதʹղܾࡦ͕ೖͬͯ
͘Δͱͬͱྑ͘ͳΓ·͢Ͷʂ