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
45
Context Receiversに思いを馳せる / Context Receivers
uzzu
0
800
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
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.9k
sbt 2.0: takeoff
eed3si9n
0
170
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
110
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.4k
Seven New Principles of Software Engineering
yegor256
0
360
Railsバージョンを4倍にした話
optim
0
810
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
120
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
dotNET_vulnclicker_intro.pdf
deka_morita
0
150
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
220
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
180
golang-bob.pdf
iwatsukayura
0
150
Featured
See All Featured
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
The SEO Collaboration Effect
kristinabergwall1
1
600
A Tale of Four Properties
chriscoyier
163
24k
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
Docker and Python
trallard
47
4.2k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
540
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
460
HDC tutorial
michielstock
2
980
Rails Girls Zürich Keynote
gr2m
96
14k
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
オブジェクトで 会話できてる? ~終~