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
RailsでDDDは使えるのか?
Search
ikechi
February 04, 2026
Programming
120
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
1k
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
4.9k
VibeCodingで決済機能を改修〜失敗から学んだこと〜
penpeen
0
140
議事録の要点整理を自動化! サーバレス Bot 構築術
penpeen
3
2.8k
NotebookLMを使ってインプット効率を爆上げしよう
penpeen
1
160
Other Decks in Programming
See All in Programming
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
140
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.7k
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
550
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
370
wkhtmltopdfの次どうするか問題2026
willnet
2
1.9k
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
34
16k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
200
The Rails Doctrine Decade
koic
2
560
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
SREの越境 / SRE Collaboration
y0hgi
2
300
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
960
Featured
See All Featured
Chasing Engaging Ingredients in Design
codingconduct
0
350
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Done Done
chrislema
187
17k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
260
BBQ
matthewcrist
90
10k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
790
Building Adaptive Systems
keathley
44
3.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Side Projects
sachag
456
43k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
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 まとめ
ご静聴ありがとうございました!