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
RailsでDDDは使えるのか?
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ikechi
February 04, 2026
Programming
56
0
Share
RailsでDDDは使えるのか?
~ 2026年02月05日 Omotesando.rb~ 登壇資料
ikechi
February 04, 2026
More Decks by ikechi
See All by ikechi
非エンジニア職からZOZOへ 〜登壇がキャリアに与えた影響〜
penpeen
0
570
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
4.4k
VibeCodingで決済機能を改修〜失敗から学んだこと〜
penpeen
0
120
議事録の要点整理を自動化! サーバレス Bot 構築術
penpeen
3
2.5k
NotebookLMを使ってインプット効率を爆上げしよう
penpeen
1
140
Other Decks in Programming
See All in Programming
実践CRDT
tamadeveloper
0
590
의존성 주입과 모듈화
fornewid
0
150
Swift Concurrency Type System
inamiy
1
540
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
630
Angular Signal Forms
debug_mode
0
120
Road to RubyKaigi: Play Hard(ware)
makicamel
1
450
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
290
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
190
事業会社でのセキュリティ長期インターンについて
masachikaura
0
270
Don't Prompt Harder, Structure Better
kitasuke
0
780
セグメントとターゲットを意識するプロポーザルの書き方 〜採択の鍵は、誰に刺すかを見極めるマーケティング戦略にある〜
m3m0r7
PRO
0
580
GitHubCopilotCLIをはじめよう.pdf
htkym
0
270
Featured
See All Featured
Writing Fast Ruby
sferik
630
63k
How to make the Groovebox
asonas
2
2.1k
Navigating Team Friction
lara
192
16k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
130
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.4k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
170
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
380
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
290
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
170
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Transcript
1 RailsでDDDは使えるのか? ~ 2026年02月05日 Omotesando.rb~
池上 寛登(ikechi) ⾃⼰紹介 SUZURI‧minne事業部 Web Engineer X: penpeenpen
• 国内最大級のハンドメイドマーケット • Railsで開発、リリースから 14年 • 技術的負債と向き合いながら日々開発中 3 minne について
Rails × DDDはあり? 4
ソフトウェア開発の複雑さについて 5
コアドメインは複雑である。 • 競争優位性の源泉となる独自領域 • ビジネスロジックが最も複雑になる部分 (複雑でなければ差別化要因にならない) • minneのコアドメイン: ◦ 作品と購入者のマッチング
◦ ショップ運営 /ブランディング 6 本質的な複雑さ(Essential Complexity) 引用元:https://medium.com/nick-tune-tech-strategy-blog/core-domain-patterns-941f89446af5
偶発的な複雑さ(Accidental Complexity) 7 Railsで複雑性が増す要因 • ActiveRecordでドメイン層とインフラ層が密結合 • 規模が大きくなるにつれて、モデルクラスに責務が集中しや すい(Fat Model)
引用元:https://www.taazaa.com/mvc-architecture-benefits-and-challenges/
課題: 偶発的な複雑さをどう減らすか 8
9 What is DDD • ドメイン駆動設計(Domain-Driven Design)の略称 • ドメインを中心に据えたソフトウェア設計手法 •
ビジネスロジックを純粋に保つ DDDという選択肢 引用元:https://sixphere.com/en/blog/clean-architectures-and-ddd-a-practical-journey-part-1/
私の考え: 部分的な採⽤はアリ。 10
クラウドワークス社 • 30万行超のRailsアプリケーション • Rails × DDDでリファクタリングを実施中 • 「新規開発では避けるが、レガシー改善には有効」 11
導⼊事例 出典: 変化に適応するソフトウェアアーキテクチャと組織構造への道程 ドメイン駆動設計の比類なきパワーでRailsレガシーコードなど大爆殺したるわあああ!!!
12 • コアドメインのみにDDDを適用 • Generic、SupportingドメインはRails Way採用 コアドメインに集中する
• Step1: PORO、Form Objectなど小さく始める • Step2: 必要に応じてService、Repositoryを導入 13 段階的な導⼊
14 Fat Modelの解消例
まとめ 15
• Rails × DDDは部分的にはアリ • Rails × DDD 導入のポイント ◦
Core Domainに集中 ◦ 段階的に導入 ◦ Rails Wayを壊さない 16 まとめ
ご静聴ありがとうございました!