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
オブジェクトで会話できてる?with DDD
Search
uzzu
April 30, 2014
Programming
310
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
オブジェクトで会話できてる?with DDD
I talked in "Object design rough talks"
http://www.zusaar.com/event/5037004
uzzu
April 30, 2014
More Decks by uzzu
See All by uzzu
あなたは 何をして 何をもたらすのか? / reskilling-at-tokyo-2026
uzzu
0
42
Context Receiversに思いを馳せる / Context Receivers
uzzu
0
790
StoreKitのこれまでとこれから / StoreKit 2 from 1
uzzu
5
22k
Autofill Framework
uzzu
0
160
アプリ内課金の最新事情 クライアントサイド編 / In-app Purchase in Cookpad 2019
uzzu
3
4.7k
Billing Client 2.0 acknowledgement
uzzu
0
17k
Promoting IAP対応から学ぶ外部アプリ内課金実装 / Promoting IAP and others
uzzu
2
1.6k
ブログ作り直した / My blog @ Othlo Tech
uzzu
0
230
新規アプリ開発を支えるユーザ・決済基盤
uzzu
2
3k
Other Decks in Programming
See All in Programming
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
330
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
4.8k
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
140
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
230
Workers Cache を知る
syumai
0
320
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
150
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
330
Verilogで学ぶCPU自作入門.pdf
uyuki234
7
3.9k
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
520
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
600
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
260
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
470
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
540
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Documentation Writing (for coders)
carmenintech
77
5.6k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5k
How STYLIGHT went responsive
nonsquared
100
6.3k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Side Projects
sachag
456
43k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
550
From π to Pie charts
rasagy
1
380
Transcript
オブジェクトで 会話できてる? @uzzu
Objectives 会話によって ドメインモデルを育てる ドメイン層を 全力で守る
Topics ユビキタス言語 Ubiquitous Language from DDD 境界コンテキスト Bounded Context from
DDD 隔離されたコア Segrated Core from DDD 他ちょいちょい
Do It モデル
Do It モデル
「モデル」って何?
「モデル」って何?
モデルの解釈はコンテキスト次第
コンテキスト境界を意識する
同じ単語でもコンテキスト境界を超えると不適切に なる事が多々 ユビキタス言語の方言 オブジェクトの概念的寿命 (≠ライフサイクル) を意識する 会話によってオブジェクトを育てる
Objectives 会話によって ドメインモデルを育てる ドメイン層を 全力で守る
オブジェクトで会話をする with DDD なんかモンスターとか連れて旅にでるゲームにおけるモンスターの管理ドメイン
オブジェクトで会話をする with DDD なんかモンスターとか連れて旅にでるゲームにおけるモンスターの管理ドメイン MonsterはEntityだよねー。HPはValueObjectだよねー。みたいな会話
オブジェクトで会話をする with DDD Monsterというドメインモデルを実装していく class Monster : ActiveRecord.Base {}
オブジェクトで会話をする with DDD Monsterというドメインモデルを実装していく class Monster : ActiveRecord.Base {}
オブジェクトで会話をする with DDD Monsterというドメインモデルを実装していく ちょっとまってください ActiveRecord.Base ってなんですか。さっきまで MonsterはMonsterIdを識別 子(Identity)とするEntityだって話してたじゃないですか。なのに今の Monsterの実装に反映されて
いないというのはどういうことなんでしょう。その上 ActiveRecordというPoEAAという書籍に記載されている データベースアクセスをカプセル化する設計パターンのベースクラスなのか知りませんけどそれは Monster オブジェクトの責務ではないですよね。 ◦◦言語ではクラスはオブジェク トだしActiveRecord.Base では提供されるAPIについてクラスオブ ジェクトのメソッドとして実装されているし単一責務だとかオブジェクトで 会話できてるとか言えるかもしれませんけど、それが伝わるのはあくま でも◦◦言語の中の話であるし、何よりも解決すべきシナリオとは直接 関係のない「オブジェクトのライフサイクル」に関する実装がドメインモ デルの実装に混ざってしまうというのは ISO9126ソフトウェア品質特性 モデルにおける使用性 (理解性、習得性)及び移植性を低下させてし まうので、よくないんじゃないですか。たとえば Monsterのライフサイク ルがDBではないものになったらそれに合わせて Monsterオブジェクト を修正しないといけないですよねシナリオは何も変わっていないという のに。さっきまでの会話はなんだったんですか
オブジェクトで会話をする with DDD Monsterというドメインモデルを実装していく class Monster : ActiveRecord.Base {} class
Monster : Entity<MonsterId> {} class MonsterId : Identity {}
オブジェクトで会話をする with DDD Monsterというドメインモデルを実装していく class Monster : ActiveRecord.Base {} class
Monster : Entity<MonsterId> {} class MonsterId : Identity {}
全力でドメイン層を守る 解決すべきドメインのシナリオ以外の責務を ドメインモデルに与えてはいけない。 SRP違反。会話ができなくなる。
解決すべきドメインのシナリオ以外? ・ライフサイクル DB,◦◦キャッシュ, Remote, BuildInAsset, Application, Scene, Memory, DeviceStorage ・コンテキスト境界外
None
コアドメイン
Objectives 会話によって ドメインモデルを育てる ドメイン層を 全力で守る
None
オブジェクトで 会話できてる? ~終~