Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
俺のオブジェクト指向/20200626LT
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
kohei.okamoto
June 26, 2020
Programming
1
870
俺のオブジェクト指向/20200626LT
ラクスさんのLT会に参加したときの資料です。
イベントページはこちら。
オブジェクト指向LT会 vol.2
https://rakus.connpass.com/event/178556/
kohei.okamoto
June 26, 2020
Tweet
Share
More Decks by kohei.okamoto
See All by kohei.okamoto
四則演算を理解する/four-arithmetic-operations
koheiokamoto
0
340
空の色を計算してみた/calculate-sky-color
koheiokamoto
0
120
ハムスターの回し車の騒音問題に挑んだ話/hamster-LT
koheiokamoto
0
120
経験者がいない状態で、戦略的DDDを現場でやってみた話/ OOC2020
koheiokamoto
7
3.9k
Other Decks in Programming
See All in Programming
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
160
Fundamentals of Software Engineering In the Age of AI
therealdanvega
2
290
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
300
Claude Code Skill入門
mayahoney
0
430
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
190
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
470
Understanding Apache Lucene - More than just full-text search
spinscale
0
140
AI 開発合宿を通して得た学び
niftycorp
PRO
0
170
Strategy for Finding a Problem for OSS: With Real Examples
kibitan
0
110
モダンOBSプラグイン開発
umireon
0
180
安いハードウェアでVulkan
fadis
1
800
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.4k
Featured
See All Featured
A better future with KSS
kneath
240
18k
Designing Experiences People Love
moore
143
24k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
590
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
280
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
440
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Transcript
俺のオブジェクト指向 @ラクスさんオブジェクト指向LT会 vol.2 #ooltjp 2020.06.26 岡本滉平 @okaponta_ 1
自己紹介 岡本滉平 ・シンプレクス株式会社 ・OOC2020でDDDについて話しました ・最近Qiitaでちょっと話題になりました ・twitter : @koko72_flavor 2
俺のオブジェクト指向との出会い 3
俺のオブジェクト指向との出会い 4
俺のオブジェクト指向との出会い 5
• プログラムド素人 • そもそも頑張って理解したくない 6
7
「わかりません!!」 8
俺のオブジェクト指向との再会(3年後) 9
俺のオブジェクト指向との再会(3年後) 10
「ドメインモデル貧血症」 “Anemic Domain Model” 11
ドメインモデル貧血症 12 Anemic domain model is the use of a
software domain model where the domain objects contain little or no business logic
俺のオブジェクト指向との再会(3年後) 13 Direction beforeDirection = car.getDirection(); int fuelRemain = car.getFuel();
if (fuelRemain != 0){ Direction afterDirection = turnRight(beforeDirection); car.setDirection(afterDirection); } ・・・
俺のオブジェクト指向との再会(3年後) 14 Direction beforeDirection = car.getDirection(); int fuelRemain = car.getFuel();
if (fuelRemain != 0){ Direction afterDirection = turnRight(beforeDirection); car.setDirection(afterDirection); } ・・・
俺のオブジェクト指向との再会(3年後) 15 Direction beforeDirection = car.getDirection(); int fuelRemain = car.getFuel();
if (fuelRemain != 0){ Direction afterDirection = turnRight(beforeDirection); car.setDirection(afterDirection); } ・・・
俺のオブジェクト指向との再会(3年後) 16 Direction beforeDirection = car.getDirection(); int fuelRemain = car.getFuel();
if (fuelRemain != 0){ Direction afterDirection = turnRight(beforeDirection); car.setDirection(afterDirection); } ・・・
俺のオブジェクト指向との再会(3年後) 17 Direction beforeDirection = car.getDirection(); int fuelRemain = car.getFuel();
if (fuelRemain != 0){ Direction afterDirection = turnRight(beforeDirection); car.setDirection(afterDirection); } ・・・
俺のオブジェクト指向との再会(3年後) 18 if (car.canMove()){ car.turnRight(); }
俺のオブジェクト指向との再会(3年後) 19 if (car.hasNoFuel()){ return; } car.turnRight();
俺のオブジェクト指向との再会(3年後) 20 if(car.hasEnoughFuel()){ car.turnRight(); }
改めて、オブジェクト指向って 21 1. すべてはオブジェクトである。 2. オブジェクトはメッセージの受け答えによってコミュニケーションする。 3. オブジェクトは自身のメモリーを持つ。 4. どのオブジェクトもクラスのインスタンスであり、クラスもまたオブ
ジェクトである。 5. クラスはその全インスタンスの為の共有動作を持つ。インスタンスはプ ログラムにおけるオブジェクトの形態である。 6. プログラム実行時は、制御は最初のオブジェクトに渡され、残りはその メッセージとして扱われる。 アラン・ケイ
俺のオブジェクト指向 22
「擬人化」 “Personification” 23
俺のオブジェクト指向 24
俺のオブジェクト指向 25
ご清聴 ありがとうございました 26