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
ikechi
February 04, 2026
Programming
100
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
RailsでDDDは使えるのか?
~ 2026年02月05日 Omotesando.rb~ 登壇資料
ikechi
February 04, 2026
More Decks by ikechi
See All by ikechi
非エンジニア職からZOZOへ 〜登壇がキャリアに与えた影響〜
penpeen
0
960
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
4.8k
VibeCodingで決済機能を改修〜失敗から学んだこと〜
penpeen
0
130
議事録の要点整理を自動化! サーバレス Bot 構築術
penpeen
3
2.7k
NotebookLMを使ってインプット効率を爆上げしよう
penpeen
1
150
Other Decks in Programming
See All in Programming
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
270
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
150
My Marp Sample
sinoue0108
0
140
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
640
Oxlintはいいぞ(続)
yug1224
1
510
LLMは4年分のCompose移行を再現できるのか?実プロダクト279件のXMLで探る自動化の境界線
makun
0
240
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.8k
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
360
初めての模倣学習とVLA
natsutan
0
390
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
130
信頼性の目標を誰も求めてない
shubox
0
460
T3DD26: From RAGs to Riches
martinhelmich
0
130
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
520
Product Roadmaps are Hard
iamctodd
55
12k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.5k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
How to build a perfect <img>
jonoalderson
1
5.9k
Fireside Chat
paigeccino
42
4k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
550
Into the Great Unknown - MozCon
thekraken
41
2.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Designing for humans not robots
tammielis
254
26k
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 まとめ
ご静聴ありがとうございました!