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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
38
Context Receiversに思いを馳せる / Context Receivers
uzzu
0
780
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
What We Talk About When We Talk About XP
m_seki
2
460
From 6 People Classroom Meetup to 100 People Regional Conference / FOSS4G Hiroshima 2026
furukawayasuto
0
130
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
4
1.1k
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.7k
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
220
個人開発基盤をまるごとCloudflareに引っ越して爆速で総合的体験を向上させた話
tinykitten
0
140
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
1
430
不幸な GC
chencmd
0
900
20260828_品質と開発生産性を両立させる、AI時代のE2Eテストの考え方
magicpod
0
180
自分的「カンファレンスの楽しみ方」
syumai
0
200
AI時代に学ぶ 好きなルール 嫌いなルール Linter編
shorty5121
0
910
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
180
Featured
See All Featured
Navigating Weather and Climate Data
rabernat
0
510
Designing for Performance
lara
611
70k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
520
Git: the NoSQL Database
bkeepers
PRO
432
67k
Crafting Experiences
bethany
1
310
Building AI with AI
inesmontani
PRO
1
1.2k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
570
Thoughts on Productivity
jonyablonski
76
5.4k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
820
How to make the Groovebox
asonas
2
2.4k
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
オブジェクトで 会話できてる? ~終~