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
社内勉強会_20180418_DDD_1章
Search
RyoWATANABE
April 18, 2018
0
41
社内勉強会_20180418_DDD_1章
RyoWATANABE
April 18, 2018
Tweet
Share
More Decks by RyoWATANABE
See All by RyoWATANABE
あるあるLT_Android採用編_20191224.pdf
nabetaro_jp
0
530
developers_boost_組織とのパーフェクトマッチを目指して_201911.pdf
nabetaro_jp
0
260
あるあるLT_Android
nabetaro_jp
1
400
AndroidあるあるLT_20190122.pdf
nabetaro_jp
0
210
社内Android共有定例会資料
nabetaro_jp
0
45
社内勉強会資料_Flux
nabetaro_jp
0
89
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
263
13k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
109
6.9k
The Invisible Customer
myddelton
119
13k
Making the Leap to Tech Lead
cromwellryan
128
8.8k
Building a Scalable Design System with Sketch
lauravandoore
459
32k
YesSQL, Process and Tooling at Scale
rocio
167
14k
Bash Introduction
62gerente
608
210k
Unsuck your backbone
ammeep
667
57k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
28
1.6k
How to Ace a Technical Interview
jacobian
274
23k
Into the Great Unknown - MozCon
thekraken
29
1.4k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
326
21k
Transcript
ΤϦοΫɾΤϰΝϯζͷ υϝΠϯۦಈઃܭ ιϑτΣΞͷ֩৺ʹ͋Δෳࡶ͞ʹཱ͔ͪ͏
“͜ͷຊɺࢥྀਂ͍ιϑτΣΞ։ൃऀશһͷඞܞॻͰ͋Δɻ” Kent Beck
DDD = Domain-Driven Design (υϝΠϯۦಈઃܭʣ
DDDͱ • υϝΠϯࣝͱIT։ൃΛεϜʔζʹͭͳ͙࣮ફతࣝͷๅݿ • ݱͷͱ։ൃνʔϜͱιϑτΣΞΛͭͳ͙ڞ௨ݴޠΛ ͬ͘͡Γͱ࡞Γͳ͕Β։ൃΛਐΊ͍ͯ͘ํ๏
ίʔϯΣΠͷ๏ଇ • ιϑτΣΞͷΞʔΩςΫνϟνʔϜͷߏͱ૬ࣅܗͰ͋ Δ • ιϑτΣΞͷσβΠϯ = νʔϜͷσβΠϯ
DDDͷݪଇ • ίΞυϝΠϯʹूத͢Δࣄ • υϝΠϯͷ࣮ફऀͱιϑτΣΞͷ࣮ફऀʹΑΔతͳڞ ಉ࡞ۀΛ௨ͯ͡ɺϞσϧΛ୳ٻ͢Δࣄ • ໌ࣔతͳڥք͚ͮΒΕͨίϯςΩετͷ෦ͰɺϢϏΩλε ݴޠΛޠΔࣄ
ઃܭΛޭͤ͞Δલఏ݅ • ιϑτΣΞϓϩδΣΫτʹ͓͍ͯɺҰ൪ͷযɺυϝΠϯͱ υϝΠϯϩδοΫʹ߹Θͤͳ͚ΕͳΒͳ͍ • ෳࡶͳυϝΠϯͷઃܭɺϞσϧʹج͔ͮͳ͚ΕͳΒͳ͍ • ෳࡶͳͷυϝΠϯͦͷͷɺ͢ͳΘͪϢʔβʔͷ׆ಈϏδω εͳͷͰ͋Δ
ୈ̍෦ υϝΠϯϞσϧΛػೳͤ͞Δ
Ϟσϧͱʁ • બͼൈ͔Εͯγϯϓϧʹ͞ΕɺҙਤతʹΈཱͯΒΕͨࣝ ͷදݱํ๏
υϝΠϯϞσϧͱʁ • υϝΠϯΤΩεύʔτͷ಄ͷதʹ͋Δ୯ͳΔ͚ࣝͩͰͳ͘ɺ ͦͷ͕ࣝݫີʹߏ͞Εɺબͼൈ͔ΕͯநԽ͞Εͨ ͷ data class Servant( var id:
Long, var imageUrl: String?, var mClass: String, var rare: String, var name: String, var attr1: String, var attr2: String, var attr3: String, var targetUrl: String, var characteristic: String? )
Ϟσϧͷ༗༻ੑ • Ϟσϧͱઃܭͷ֩৺͕૬ޓʹܗ͠߹͏ • ϞσϧνʔϜϝϯόશһ͕༻͢Δݴޠͷج൫Ͱ͋Δ • Ϟσϧͱৠཹ͞ΕͨࣝͰ͋Δ
ιϑτΣΞͷ֩৺ • υϝΠϯʹؔͨ͠ΛϢʔβͷͨΊʹղܾ͢Δೳྗ • ։ൃऀυϝΠϯʹ಄͠ͳ͚ΕͳΒͳ͍ • ϞσϦϯάεΩϧΛݚ͗·͠ɺυϝΠϯઃܭʹਫ਼௨͢Δ͜ ͱ͕ཁٻ͞ΕΔ • ෳࡶ͞ʹਅਖ਼໘͔Βཱ͔ͪΘͳͯ͘ͳΒͳ͍
ͦ͏͠ͳ͚Εɺ త֎ΕͳιϑτΣΞΛ࡞ͬͯ͠·͏ةݥ͕͋Δ͔Βͩ
ୈ̍ষ ࣝΛטΈࡅ͘
ࣝͷטΈࡅ͖ • ಠΓͰߦ͏࡞ۀͰͳ͍ • ։ൃऀͱυϝΠϯΤΩεύʔτ͕ڞಉͯ͠ߦ͏
Ϟσϧͷࡐྉ • υϝΠϯΤΩεύʔτͷ಄ͷத • طଘγεςϜͷϢʔβ • ؔ࿈͢ΔϨΨγʔγεςϜ • ಉҰυϝΠϯͷผϓϩδΣΫτʹ͓͚Δٕज़νʔϜͷաڈͷ ܦݧ
ཹҙ • ࣮Λ௨ͨ͡ϑΟʔυόοΫϧʔϓʹΑͬͯϞσϧ͑Β Ε͍ͯ͘
ΥʔλʔϑΥʔϧख๏ • ϑΟʔυόοΫ͕ͳ͍ͨΊৠཹ͞Εͳ͍ • ࣝҰํʹྲྀΕΔ͚ͩͰɺੵ͞Εͳ͍
ϓϩάϥϚ͕υϝΠϯʹڵຯ͕ͳ͍ • ΞϓϦ͕ԿΛ͖͔͚ͩ͢Λௐɺͦͷഎޙʹ͋Δݪཧʹ ҙΛΘͳ͍ • ʹʼڧྗͳ৽ػೳ͕ݱΕΔͱ͍͏ஈ֊ʹɺܾͯ͠౸ୡ͢ Δ͜ͱ͕ͳ͍
υϝΠϯϞσϧΛઈ͑ͣվྑ͢Δ • ։ൃऀɺ͕ࣗྗΛି͍ͯ͠ΔϏδωεʹ͓͚Δॏཁͳݪཧ Λशಘ͢Δ͜ͱΛڧ͍ΒΕɺػցతʹػೳΛͭ͘Γͩ͢͜ͱ͕ ͳ͘ͳΔ • υϝΠϯΤΩεύʔτɺࣗͷ͍ͬͯΔ͜ͱΛৠཹͯ͠ຊ ࣭Λநग़͢ΔΑ͏ʹڧ͍ΒΕΔ͜ͱͰɺࣗͷཧղΛਫ਼៛ʢਫ਼ ີʣʹ͠ɺιϑτΣΞ͕ඞཁͳ֓೦ͷਖ਼֬͞Λཧղ͢ΔΑ͏ ʹͳΔ
• υϝΠϯΤΩεύʔτ͕Ϟσϧʹରͯ͠ใΛఏڙ͍ͯ͠Δ ͔ΒɺϞσϧʹϏδωεʹؔ͢Δਂ͍͕ࣝө͞Ε͍ͯ Δ • ʹʼͦͷந͕Ϗδωεͷਅͷݪཧͳͷͩ
Ϟσϧ͕ͨΒ͢Ըܙ • ϓϩδΣΫτΛྲྀΕଓ͚ΔใΛମܥԽ͢Δ • ཁੳͷ෭࡞༻ͱͯ͠ϓϩάϥϛϯάઃܭʹਂ͘૬ޓ࡞༻ ͢Δ • ঢ়گ͕ΑΓ໌֬ʹཧղͰ͖ΔΑ͏ʹͳΓϞσϧ͕ਫ਼៛Խ͞ΕΔ • =>ϞσϧݫີͰͳ͚ΕͳΒͳ͍
ϓϩδΣΫτʹؔ͢Δࣝʹ͍ͭͯ • ιϑτΣΞΛॻ͖࢝ΊΔͱ͖ɺզʑରΛेʹཧղ ͍ͯ͠ΔΘ͚Ͱͳ͍ • యܕతͳઃܭΞϓϩʔνͷ߹ɺίʔυͱυΩϡϝϯτ ۤ࿑ͯ͠खʹೖΕͨࣝΛՁͷܗͰදݱ͠ͳ͍ʢϞσϧͰ ͳ͍ʣ͔Βޱ಄Ͱͷঝ్͕Εͨ߹ɺࣦࣝΘΕΔ
ܧଓతֶश • ࣗͨͪͷࣝΛҙࣝతʹҭͯΔ • ։ൃऀʹͱͬͯͲΏ͜ͱ • ٕज़తͳࣝΛ্ͤ͞Δ͜ͱ • υϝΠϯʹ͍ͭͯਅʹֶश͢Δ͜ͱ
ਂ͍Ϟσϧ • ཱͭϞσϧ͕͙͢ʹݟ͔ͭΔදʹ͋Δ͜ͱΊͬͨʹ ͳ͍ • ͍͍ͨͯͷ߹ཁૉΛഇغ͢ΔɺҧͬͯࢹͰݟΔ͜ͱʹͳ Δ • ʹʼͷ֩৺Λͭ͘Α͏ͳ͏·͍ந͕ݱΕΔ
ͭͮ͘