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
普段使いのDDD
Search
haljik
June 24, 2017
Programming
21
8.9k
普段使いのDDD
#KanJavaPartyA2
haljik
June 24, 2017
Tweet
Share
More Decks by haljik
See All by haljik
develop-with-domain-expert
haljik
1
1k
ドメイン駆動設計の紹介
haljik
0
79
Isolating-the-domainの紹介
haljik
3
1.6k
実録Spring MVC
haljik
10
4.7k
ドメイン駆動設計を軽快に実践するための工夫
haljik
22
7.4k
Other Decks in Programming
See All in Programming
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
23k
カスタムしながら理解するGraphQL Connection
yanagii
1
1.2k
From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism- An Example
philipschwarz
PRO
0
170
C#/.NETのこれまでのふりかえり
tomokusaba
1
160
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
210
PagerDuty を軸にした On-Call 構築と運用課題の解決 / PagerDuty Japan Community Meetup 4
horimislime
1
110
CSC509 Lecture 09
javiergs
PRO
0
110
Identifying User Idenity
moro
6
7.8k
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
240
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
150
破壊せよ!データ破壊駆動で考えるドメインモデリング / data-destroy-driven
minodriven
16
4k
Go言語でターミナルフレンドリーなAIコマンド、afaを作った/fukuokago20_afa
monochromegane
2
140
Featured
See All Featured
A better future with KSS
kneath
238
17k
Docker and Python
trallard
40
3.1k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
22k
Ruby is Unlike a Banana
tanoku
96
11k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Fireside Chat
paigeccino
32
3k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Testing 201, or: Great Expectations
jmmastey
38
7k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
680
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Transcript
ීஈ͍ͷ%%% ,"/+"7"1"35: !IBMKJL
ࣗݾհ w 5XJUUFS!IBMKJL w ໊લɿՏ্࢘ʢ͔Θ͔Έ͍ͤ͡ʣ w ϑϦʔϥϯεͷ+BWBϓϩάϥϚ w ؔ%%%KBWBओ࠵
͜ͷࢿྉʹ͍ͭͯ w ࢲ͕ৗࠒ͔ΒυϝΠϯۦಈઃܭʹ͍ͭͯߟ͍͑ͯ ΔࣄΛݴޠԽͨ͠ͷͰɺͦΕҎ্ͷͷͰ͋Γ ·ͤΜ w +BWB͕લఏͰ͋Γ·͕͋͢·Γ+BWBͷ͠· ͤΜ w ΦϒδΣΫτࢦͰ͢
w ϚΠΫϩαʔϏεͱ͔$234ͱ͔ͷ͋Γ·ͤΜ
ࠓ͢ࣄ w υϝΠϯۦಈઃܭ͕ඪͱ͍ͯ͠Δ͜ͱ w υϝΠϯۦಈઃܭ͕લఏͱ͍ͯ͠Δ͜ͱ w ʮυϝΠϯͰۦಈ͢Δʯͱ͍͏͜ͱͷ࣮ࡍ w νʔϜͰڞ༗͓ͯ͘͜͠ͱ w
࣮ࡍʹײͨ͡ޮՌ w ʮීஈ͍ʯͱ͍͏͜ͱ
υϝΠϯۦಈઃܭ͕ඪ ͱ͍ͯ͠Δ͜ͱ
ॊೈͰ֦ுੑʹΜͩ ιϑτΣΞ
मਖ਼֦ு͕ࠔʹͳͬͯ ͠·ͬͨ߹ࣦഊ
Ͳ͏ͳ͍ͬͯΕྑ͍͔ʁ ར༻ऀ͕ʮ͜͜ʯΛʮ͜͏ʯ͍ͨ͠ͱ͍ ͏ཁʹରͯ͠ɺʮ͜͜ʯΛʮ͜͏ʯ͢ Δ͚ͩͰมߋͰ͖ΔΑ͏ʹͳ͍ͬͯΕ ྑͦ͞͏
υϝΠϯۦಈઃܭ͕લఏ ͱ͍ͯ͠Δͷ
։ൃνʔϜ͕ར༻ऀͷ׆ಈʹؔ͢Δ ࣝମܥΛഎෛ͍ࠐΉ͜ͱ w ୯ͳΔࣝͰͳ͘ମܥ CPEZPGLOPXMFEHF˞ w ͨͩΔ͚ͩͰͳ͘എෛࠐΉ CSJOHUPCFBS˞ ˞&SJD&WBOT
%PNBJO%SJWFO%FTJHO "EEJTPO8FTMFZ1SPGFTTJPOBM൛ ୈ̍෦ͷং൫
ۀ͠ͳ͍ w ੳɾઃܭऀͱϓϩάϥϚΛ͚ͳ͍ ༁ͤͣؔ৺ࣄͱϓϩάϥϜͷ୯ҐΛҰகͤ͞Δ w Ϟσϧͷ࡞ऀͱϞσϧͷར༻ऀΛ͚ͳ͍ ϞσϧͱͦΕΛར༻͢ΔଆͷίʔυɺϞσϧʹ৽ ͨͳ͕ࣝΓࠐ·ΕΔʹมߋ͞ΕΔ
ΠςϨʔςΟϒͳϓϩηε w Ϟσϧ։ൃऀͷࣝͱͱʹ͢Δ w ͪΐͬͱ໊ͨ͠લมߋͰ͢ΒϞσϧΛར༻͢Δଆͷ ίʔυʹٴ͢Δ w ϓϩάϥϛϯάͷϓϥοτϑΥʔϜʹΑΔ੍ͷΑ ͏ͳͷવϞσϧʹϑΟʔυόοΫ͕͔͔Δ w
ͦ͏Ͱͳ͍ͱ࣮༻ੑͷͳ͍ϞσϧʹͳΔ
ʮυϝΠϯͰۦಈ͢Δʯ ͱ͍͏͜ͱͷ࣮ࡍ
ར༻ऀͷؔ৺ࣄυϝΠϯ
ར༻ऀͷ͍͏ʮ͜͜ʯΛ͜͏ ͍ͨ͠ͷʮ͜͜ʯ͕ίʔυ ্ͷͲ͜Λࢦ͢ͷ͔ʁ
ར༻ऀͷؔ৺ࣄͱҧ͏୯ҐͰ ϓϩάϥϛϯάͯ͠͠·͏ͱม ߋͷӨڹൣғ༧Ͱ͖ͳ͍
ڞ௨Խͱ͔
աͳநԽͱ͔
ٕज़ۦಈͱ͔
ը໘ۦಈͱ͔
͍Ζ͍Ζ͋Δ͚Ͳ ༧֎ͷӨڹ༧֎ͷί ετʹͳΓൃలΛ્͢Δ
͔ͩΒ
ར༻ऀͷؔ৺ࣄʹϓϩάϥϛϯάͷجຊ ୯ҐΛ͋ΘͤΔ ؔ৺ࣄͷ୯ҐͰஅɺՃϩδοΫΛ࣋ ͪɺͦΕΒͷϩδοΫʹۦಈ͞ΕΔιϑ τΣΞʹ͢Δ
υϝΠϯϞσϧʹۦಈ͞Ε ΔΞϓϦέʔγϣϯΛ࡞Δ
υϝΠϯϞσϧͰۦಈ͞ΕΔ ΞϓϦέʔγϣϯΛ࡞Δʹ υϝΠϯϞσϧ͕࣋ͭஅɺՃϩδοΫʹରͯ͋͠ ΒΏΔͱ͜Ζ͔ΒΞΫηεͰ͖ΔΑ͏ͳΞʔΩςΫνϟ Λ࠾༻͠ɺυϝΠϯϞσϧʹஅɺՃϩδοΫΛू ΊΔඞཁ͕͋Δ
νʔϜͰڞ༗͓ͯ͘͜͠ͱ
w ڥք͚ͮΒΕͨίϯςΩετ w ίϯςΩετͷ֓ཁϞσϦϯά w ϓϩάϥϛϯά্ͷݪଇ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ڥք͚ΒΕͨίϯςΩετ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ڥք͚ͮΒΕͨίϯςΩετ w ίϯςΩετʹࢹ࠲ ݻ༗໊ࢺҎ֎·ͣࢹ࠲Λ֫ಘ͠ͳ͍ͱ໊લ͕ܾ·Βͳ͍ w ࢹ࠲ͱγεςϜར༻ऀͱར༻తͷʮΈ߹Θͤʯ ྫʣస৬αΠτɿʮاۀ͕ࣗࣾʹ͋ͬͨࣾһΛ୳͢ҝʯʮٻ৬ ऀ͕ࣗʹ͋ͬͨస৬ઌاۀΛ୳͢ҝʯͳͲͳͲ w ࢹ࠲͝ͱʹϞσϦϯάͷ໊લۭؒΛ͚ͯɺͦͷࢹ࠲͔ΒΈͨ
Ϟσϧͷಋग़ʹूத͢ΔʹίϯςΩετʹಛԽ͢Δ ྫʣస৬αΠτɿʮاۀʯͱʮٻ৬ऀʯͱ͍͏໊લۭؒʹ͚ Δ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ࢹ࠲ͰࣝΛཧ ࢹ࠲͕ίϯςΩετʹͳΔ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ࢹ࠲ͷݟ͚ͭํ w ࡞Ζ͏ͱ͍ͯ͠ΔαʔϏεγεςϜͷར༻ऀΛચ ͍ग़͢ ਓͷׂͩͬͨΓγεςϜͩͬͨΓ͢Δ w ͦΕͧΕͷར༻ऀ͕ԿΛతʹͦͷγεςϜΛ͏ ͷ͔Λ໌֬ʹ͢Δ w
త͕ҧ͏ͳΒผͷࢹ࠲ w త͕ಉ͡ͳΒಉ͡ࢹ࠲ʢ͔ʣ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ίϯςΩετͷ֓ཁϞσϦϯά νʔϜͰڞ༗͓ͯ͘͜͠ͱ
w ਓɺɺࣄੳ w ࣌ܥྻੳ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ਓɾɾࣄੳ ਓٻ৬ऀɺձһɺاۀͷ୲ऀ ٻਓɺاۀ ࣄݕࡧɺԠืɺεΧτ ྫɿٻਓαΠτͷٻ৬ऀΛࢹ࠲ʹͨ͠߹ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
࣌ܥྻੳ ٻ৬ऀɺاۀ͕ಠཱͯ͠·ͣ͋Δ ٻ৬ऀ͕ձһొΛ͓͜ͳ͍ձһʹͳΔ اۀ͕ٻਓΛొ͢Δ اۀ͕ٻਓΛఴͨ͠εΧτΛձһʹૹΔ
ձһاۀ͔ΒεΧτΛड͚ͱΔ ձһεΧτʹԠื͢Δ ͳͲಠཱͯ͋͠ΔਓΛ·ͣฒͦΕΒ͕ى͜͢ओཁͳΠϕϯτΛ࣌ܥྻʹฒΔ ྫɿٻਓαΠτͷٻ৬ऀΛࢹ࠲ʹͨ͠߹ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ϞσϧԽͨ͠ͷ ਓɺɺࣄੳͰग़ͨཁૉΛ࣌ ܥྻੳͰ͚ؔ͠ɺґଘͷ ํΛܾΊͨঢ়ଶ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ϞσϧΛίʔυͰ ͜ͷϨϕϧͰϞσϧͷτοϓϨϕϧύοέʔδ ͷߏͰදݱ͢Δ EPNBJONPEFM DBOEJEBUF ٻ৬ऀ DPNQBOZ اۀ
P⒎FS ٻਓ NFNCFS ձһ TDPVU εΧτ BQQMJDBUJPO Ԡื ύοέʔδؒͷґଘํͦͷ··෦ͷΦϒδΣ Ϋτ͕ύοέʔδΛލ͙ࡍͷґଘํʹ͢Δ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ϙΠϯτ w ࢹ࠲Λ֫ಘ͢Δ͜ͱͰɺͦͷࢹ࠲͔ΒΈͯෆཁͳ ͷΛ͗མͱ͠ɺॏཁͳͷΛڧௐ͢Δ w ࣌ܥྻͰચ͍ग़͢ґଘͷํॏཁͳͷ ͋ΔλΠϛϯάͰଘࡏ͠ͳ͍ͷࢀরͰ͖ͳ͍ͷ Ͱ͜ΕΛ่͢ͱ࣋ͬͯΔ͔͍࣋ͬͯͳ͍͔ͱ͍͏ঢ় ଶ͕૿͑ͯෳࡶ͕Ճ
νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ϓϩάϥϛϯά্ͷݪଇ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ϓϩάϥϛϯά্ͷݪଇ w ΞʔΩςΫνϟ w ϦϑΝΫλϦϯά w υϝΠϯΦϒδΣΫτͷίʔυ w Ϟσϧͷࣗಈςετ w
+BWBͷجຊతͳ͜ͱ w ΦϒδΣΫτࢦ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ΞʔΩςΫνϟ ̏ʴυϝΠϯϞσϧ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
̏ υϝΠϯϞσϧ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
w υϝΠϯʹଞͷ͕̏ґଘ͍ͯ͠Δҙຯ υϝΠϯ͕શͯΛ੍ޚ͢Δҝ υϝΠϯʹϩδοΫΛूΊΔҝ w ϓϨθϯςʔγϣϯ ը໘ભҠΞϓϦέʔγϣϯͷݺͼग़͠ʹప͢Δ w ΞϓϦέʔγϣϯ υϝΠϯΦϒδΣΫτͷૢ࡞ͱ
ΠϯϑϥετϥΫνϟͷݺͼग़͠ʹప͢Δ w ΠϯϑϥετϥΫνϟ υϝΠϯͰఆٛ͞ΕΔϦϙδτϦΠϯλʔϑΣʔεͷ࣮Λஔ͘ 3%#,74ͷૢ࡞ɺଞ"1*ͷݺͼग़͠ͳͲɺར༻ऀͷؔ৺ࣄΑΓ நͷ͍ͷΛஔ͘ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
w ಉ࢜ͷґଘؔ ্͔ΒԼʹର͢Δݺͼग़͠0, Լ͔Β্ʹର͢Δݺͼग़͠/( w υϝΠϯͷू୯ҐͰϦϙδτϦΛ࡞Δ w ϦϙδτϦΛܦ༝͠ͳ͍ͰଞͷूΛऔಘ͠ͳ͍ w ϦϙδτϦ͔ΒϦϙδτϦͷݺͼग़͠ɺυϝΠ
ϯͷτοϓϨϕϧύοέʔδͷґଘؔΛकΔ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ϦϑΝΫλϦϯά νʔϜͰڞ༗͓ͯ͘͜͠ͱ
w ৗʹϦϑΝΫλϦϯά͢Δ w ϘʔΠεΧτϧʔϧ खΛೖΕΔ࣌ʮདྷͨ࣌ΑΓඒ͘͠ʯ w ʮ͍ࠐΜͩάϩʔϒʯ &SJD&WBOTΤϦοΫɾΤϰΝϯεͷυϝΠϯۦಈઃܭ ୈ෦ਂ͍Ϟσϧ͠ͳ͔ͳઃܭ
ϦϑΝΫλϦϯάʹΑΓྑ͘มߋ͞ΕΔॴ͕ࣗવͱॊೈͳߏʹͳΔ w ӅΕ͍ͯΔ֓೦Λ୳͢ &SJD&WBOTΤϦοΫɾΤϰΝϯεͷυϝΠϯۦಈઃܭ ষ҉తͳ֓೦Λ໌ࣔతʹ͢Δ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
υϝΠϯΦϒδΣΫτͷίʔυ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
HFUUFS w ΦϒδΣΫτʹࣄΛͤ͞ΔͨΊʹɺॻ͔ͳ͍ w ෦ϑΟʔϧυͷ͕ݟͨ͘ͳͬͨΒɺͦͷʮϑΟʔ ϧυΛ͏ϩδοΫΛͦͷΦϒδΣΫτࣗʹ࣋ ͨͤΒΕͳ͍͔ʯΛߟ͑Δ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ίϯετϥΫλ w جຊతʹؔ৺ࣄͷ֎ͳͷͰԼʹ͍Δ w ΦϒδΣΫτͷओϑΟʔϧυͱɺͦΕΛͬͯ ՃɺஅΛߦ͏ϩδοΫΛ࣋ͭϝιου w ҙਤͷද໌ϑΝΫτϦϝιουͰ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ࣗಈςετ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
Ϟσϧͷࣗಈςετ w ࠷ॳʹܕͷੈքͰղܾͰ͖ͳ͍͔Λߟ͑Δ w ࣍ʹߏͰղܾͰ͖ͳ͍͔Λߟ͑Δ w Ͳ͏͠Α͏ͳ͍߹ςετΛॻ͘ جຊతʹॻ͔ͳ͍ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
+BWBͷجຊతͳࣄ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
DDD@F;ͭ͏ͷ+BWBίʔσΟϯάͰݕࡧ JSPG͞ΜͷࢿྉΛݟ͍ͯͩ͘͞ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ΦϒδΣΫτࢦ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
͜Μͳຊ͕݄ʹ ग़·͢ɻ ಡॻձ͍ͨ͠ IUUQHJIZPKQCPPL νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ීஈ͍ͷҙຯ
w গͳ͘ͱࢲීஈ͔Β͍ͬͯͳ͍͜ͱΛෳࡶͳ ͷΛݟ͚ͭͨͱ͖͚ͩʹग़དྷΔͱࢥ͑ͳ͍ w খͯ͘͞୯७ͳ։ൃͰࣝͷ֬ೝɾੳɾϓϩά ϥϛϯάͷαΠΫϧΛීஈ͔ΒԿճ͢ w ͍ͭͰͲΜͳ࣌ͰͰ͖ΔΑ͏ʹجຊΛ܁Γฦ͠ ͯ࠷࣭Λఈ্͓͛ͯ͘͠