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
130
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
Transcript
17 slides
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 まとめ
ご静聴ありがとうございました!
More Decks by ikechi
See All by ikechi
非エンジニア職からZOZOへ 〜登壇がキャリアに与えた影響〜
penpeen
0
1.1k
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
5k
VibeCodingで決済機能を改修〜失敗から学んだこと〜
penpeen
0
140
議事録の要点整理を自動化! サーバレス Bot 構築術
penpeen
3
2.8k
NotebookLMを使ってインプット効率を爆上げしよう
penpeen
1
170
Other Decks in Programming
See All in Programming
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
210
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
600
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
310
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
260
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
1k
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
130
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
170
SONY CISC-NEWS NWS-1750 + NWB-225 ハードウェアメンテとフレームバッファカラー対応 / KOF2026
tsutsui
0
120
疎結合とは何か?ソフトウェア設計における結合バランスについて考える #phpcon_niigata
kajitack
2
380
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
230
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
360
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
200
Featured
See All Featured
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
380
Skip the Path - Find Your Career Trail
mkilby
1
290
A designer walks into a library…
pauljervisheath
211
25k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
290
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
310
Designing for Timeless Needs
cassininazir
1
570
The Cult of Friendly URLs
andyhume
79
7.1k
SEO for Brand Visibility & Recognition
aleyda
0
4.9k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
630
The Cost Of JavaScript in 2023
addyosmani
56
10k
How Software Deployment tools have changed in the past 20 years
geshan
3
35k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k