SlideShare a Scribd company logo
1 of 64
Download to read offline
Tackling Complexity in the Heart of Software
Domain-Driven Design
카페서비스개발팀
조영호
2. What is Domain-Driven Design?
3. Patterns of Domain-Driven Design
목차
4. Conclusion
1. Domain & Software
1. Domain & Software
4 / 문서의 제목
Domain-Driven Design - Book
By Eric Evans
Addison-Wesley, 2003
5 / 문서의 제목
Domain & Software
The subject area to which the user
applies a program is the domain of
the software.
The critical complexity of most
software projects is in
understanding the domain itself.
6 / 문서의 제목
Domain & Software
Software has to
Model the Domain
7 / 문서의 제목
But...
Spring
ORM
Dependency Injection
Database
J2EE
Ajax
Continuous Integration
Hadoop
Coarse Grained Lock
Strategy
Hibernate
Mockito
ActiveMQ
RoRGrailsAOP
Naked Object
8 / 문서의 제목
Cargo
cargoid
originid
destination
customers clearance(opt)
weight
Haz Mat Code
Routing Service
Database table : cargo_bookings
Cargo_id Transport Load Unload
origin
destination
customers clearance (opt)
populate cargo_bookings
table
"If we give the Routing Service an origin, destination, and arrival time, it
can look up the stops the cargo will have to make and, well . . . stick them
in the database."
Conversation Based on Technology
2. What is Domain-Driven Design?
10 / 문서의 제목
Representation[Semantic] Gap
The gap between our mental model of the domain and
its representation in software
Low Representation Gap
Name from domain vocabulary
Responsibility derived from
domain concept
LionCat
11 / 문서의 제목
Ice Age of EJB
Cat
High
Representation Gap
<<interface>>
CatHome
<<interface>>
Cat
CatEJB
<<interface>>
EJBHome
<<interface>>
EJBObject
<<interface>>
EntityBean
Domain Concept
Design
12 / 문서의 제목
Technology Exodus
OO design is more important
than any particular
implementation technology
(such as J2EE, or even Java).
And now important than
even Spring or Hibernate
13 / 문서의 제목
DOMAIN MODEL Pattern
An object model of the domain that
incorporates both behavior and data.
Sale
getTotalPrice() : long
setTotalPrice(long)
getLineItems() : Collection
setLineImtes(Collection)
LineItem
getPrice() : long
setPrice(long)
getPrioduct() : Product
setProduct(Product)
Sale
calclulatePrice() : Money
addLineItem(LineItem)
LineItem
calculatePrice() : long
*
TRANSACTION SCRIPT &
ANEMIC DOMAIN MODEL RICH DOMAIN MODEL
Back to the Origin of the OO
14 / 문서의 제목
Continuous Design in Agile
Specification
Test
Design
Code
Big Up-front
Design
Incremental
Design
Refactoring
15 / 문서의 제목
Analysis = Design = Implementation
Analysis Model
seatId
ReservationSeat
Showing
time
Design Model
seatId
ReservationSeat
Showing
time : TimeOfDay
1
Implementation Model
Showing showing =
showingRepository.getShowingWithLock(showingId);
Reservation reservation =
showing.reserveSeats(seatIds,
adultSeatCount, teenagerSeatCount);
reservationRepository.saveReservation(reservation);
16 / 문서의 제목
And Finally
Focus on Domain Complexity,
not Technology Complexity
Everything is Driven By Domain
17 / 문서의 제목
And Finally
Tackling Complexity
in the Heart of Software
18 / 문서의 제목
And Finally
UBIQUITOUS LANGUAGE
MODEL-DRIVEN DESIGN
19 / 문서의 제목
Model
20 / 문서의 제목
Model
A system of abstractions that describes
selected aspects of a domain and
can be used to solve problems related
to that domain
A model is not right or wrong, only more or
less useful
21 / 문서의 제목
Domain Modeling
Documentary Film
A domain modeler chooses particular model for usability
22 / 문서의 제목
Model & Diagram
A Domain Model is not a particular diagram.
It is the knowledge that the diagram is
intended to convey.
The Diagram is a representation of Model
Not a Model
23 / 문서의 제목
Model-Driven Design
24 / 문서의 제목
The MODEL and the heart of the DESIGN
shape each other
Model-Driven Design
DOMAIN
MODEL
seatId
ReservationSeat
Showing
time
DESIGN
seatId
ReservationSeat
Showing
time : TimeOfDay
1
CODE
Showing showing =
showingRepository.getShowingWithLock(showingId);
Reservation reservation =
showing.reserveSeats(seatIds,
adultSeatCount, teenagerSeatCount);
reservationRepository.saveReservation(reservation);
25 / 문서의 제목
Find the Model that works for Analysis, Design
and Implementation
Model-Driven Design
Lower Representation Gap
Object-Oriented Paradigm is the most Powerful
The Code is an expression of Model
26 / 문서의 제목
A Programmer is a Modeler.
Hands-On Modelers
27 / 문서의 제목
UBIQUITOUS LANGUAGE
28 / 문서의 제목
UBIQUITOUS LANGUAGE
Conversations among
Developers
Discussions among
Domain Experts
Expressions
in the Code
Discussion between
Developers and
Domain Experts
All based on the same language,
derived from a shared Domain Model
29 / 문서의 제목
UBIQUITOUS LANGUAGE
technical
aspects of
design
technical terms
technical design
patterns
business terms
developers don’t
understand
business terms
everyone uses that
don’t appear in design
domain model terms
names of
BOUNDED CONTEXT
terminology of large-scale
structure
many patterns from
Domain-Driven Design book
30 / 문서의 제목
Use the Domain Model as the backbone of a Language
UBIQUITOUS LANGUAGE
Use the same language in diagrams, writing, and especially
speech
Use the UBIQUITOUS LANGES in all communication within
team and in the code
One Team, One Language
31 / 문서의 제목
And Domain-Driven Design
DOMAIN
MODEL
seatId
ReservationSeat
Showing
time
UBIQUITOUS
LANGUAGE
Showing
Reservation
Reservation Seat
CODE
Showing showing =
showingRepository.getShowingWithLock(showingId);
Reservation reservation =
showing.reserveSeats(seatIds,
adultSeatCount, teenagerSeatCount);
reservationRepository.saveReservation(reservation);
32 / 문서의 제목
And Domain-Driven Design
DOMAIN
MODEL
seatId
ReservationSeat
Showing
time
UBIQUITOUS
LANGUAGE
Showing
Reservation
Reservation Seat
CODE
Showing showing =
showingRepository.getShowingWithLock(showingId);
Reservation reservation =
showing.reserveSeats(seatIds,
adultSeatCount, teenagerSeatCount);
reservationRepository.saveReservation(reservation);
33 / 문서의 제목
And Domain-Driven Design
DOMAIN
MODEL
seatId
ReservationSeat
Showing
time
UBIQUITOUS
LANGUAGE
Performance
Reservation
Reservation Seat
CODE
Showing showing =
showingRepository.getShowingWithLock(showingId);
Reservation reservation =
showing.reserveSeats(seatIds,
adultSeatCount, teenagerSeatCount);
reservationRepository.saveReservation(reservation);
34 / 문서의 제목
And Domain-Driven Design
DOMAIN
MODEL
seatId
ReservationSeat
Performance
time
UBIQUITOUS
LANGUAGE
Performance
Reservation
Reservation Seat
CODE
Showing showing =
showingRepository.getShowingWithLock(showingId);
Reservation reservation =
showing.reserveSeats(seatIds,
adultSeatCount, teenagerSeatCount);
reservationRepository.saveReservation(reservation);
35 / 문서의 제목
And Domain-Driven Design
DOMAIN
MODEL
seatId
ReservationSeat
Performance
time
UBIQUITOUS
LANGUAGE
Performance
Reservation
Reservation Seat
CODE
Performance performance =
performanceRepository.getPerformanceWithLock(
performanceId);
Reservation reservation =
showing.reserveSeats(seatIds,
adultSeatCount, teenagerSeatCount);
reservationRepository.saveReservation(reservation);
36 / 문서의 제목
And Domain-Driven Design
A Showing is...
37 / 문서의 제목
And Domain-Driven Design
A Performance is...
38 / 문서의 제목
Cargo
cargoid
originid
destination
customers clearance(opt)
weight
Haz Mat Code
Routing Service
Database table : cargo_bookings
Cargo_id Transport Load Unload
origin
destination
customers clearance (opt)
populate cargo_bookings
table
"If we give the Routing Service an origin, destination, and arrival time, it
can look up the stops the cargo will have to make and, well . . . stick them
in the database."
Conversation Based on Technology
39 / 문서의 제목
Cargo
cargoid
weight
Haz Mat Code
Routing Service
Route Specification
origin
destination
customers clearance (opt)
Itinerary
Leg
0..1
{Itinerary must satisfy specification}
a Route Specification
an Itinerary satisfying
the Route Specification
"A Routing Service finds an Itinerary that satisfies a Route Specification.”
Conversation Based on Model
3. Patterns of Domain-Driven Design
41 / 문서의 제목
Domain-Driven Design & Patterns
DDD is not about patterns such as ENTITY, VALUE OBJECT,
AGGREGATE, REPOSITORY, SERVICE, FACTORY
DDD is a better way of thinking about software design
Patterns may take your software more stable or more maintainable,
but it is the methodology that guides you to deliver something fit
for purpose
42 / 문서의 제목
DOMAIN MODEL is a King
43 / 문서의 제목
A King, DOMAN MODEL is RICH, Not ANEMIC
<<interface>>
ShowingRepository
getShowingWithLock(showingId) :Showing
seatId
<<interface>>
SeatState
AbstractSeatState
Reserved
1
0..1
1
0..*
1
0..1
leftSeat
0..1
rightSeat
0..1
nextSeatState
0..1
previousSeatState
<<interface>>
ScheduleService
reserve(showingId, seats,adultSeatCount, teenagerSeatCount) : Reservation
ReservationSeat
-showingRepository -reservationRepository
ScheduleServiceImpl
Occupied Sold
<<interface>>
ReservationRepository
saveReservation(reservation)
ShowingFactory
create(dayOfYear, showingSpecification) : Showing
Showing
time:TimeOfYear
Reservation
amount:Money
44 / 문서의 제목
<<interface>>
ShowingRepository
getShowingWithLock(showingId) :Showing
seatId
<<interface>>
SeatState
AbstractSeatState
Reserved
1
0..1
1
0..*
1
0..1
leftSeat
0..1
rightSeat
0..1
nextSeatState
0..1
previousSeatState
<<interface>>
ScheduleService
reserve(showingId, seats,adultSeatCount, teenagerSeatCount) : Reservation
ReservationSeat
-showingRepository -reservationRepository
ScheduleServiceImpl
Occupied Sold
<<interface>>
ReservationRepository
saveReservation(reservation)
ShowingFactory
create(dayOfYear, showingSpecification) : Showing
Showing
time:TimeOfYear
Reservation
amount:Money
A King, DOMAN MODEL is RICH, Not ANEMIC
SERVICE
ENTITY
AGGREGATE
VALUE
OBJECT
REPOSITORY
FACTORY
45 / 문서의 제목
A King should be Protected
46 / 문서의 제목
Layered Architecture
User Interface
Application
Domain
Infrastructure
47 / 문서의 제목
CONTEXT is a King’s Domain
48 / 문서의 제목
BOUNDED CONTEXT
49 / 문서의 제목
BOUNDED CONTEXT
Model
Model
CONTEXT
CONTEXT
50 / 문서의 제목
Translate two UBIQUATIOUS LABUAGES
51 / 문서의 제목
CONTEXT MAP
Model
Model
CONTEXT
CONTEXT
TRNSLATION MAP
52 / 문서의 제목
CONTINUOUS INTEGRATION
Model
Model
CONTEXT
CONTEXT
CONTINUOUS INTEGRATION per each CONTEXT
53 / 문서의 제목
A king should learn continuously
54 / 문서의 제목
DISTILLATION
User Interface
Application
Infrastructure
Domain
CORE
DOMAIN
GENERIC
SUBDOMAIIN
COHESIVE
MECHANISM
SEGREGATED
CORE
ABSTRACT
CORE
Refactoring
55 / 문서의 제목
CONTEXT & MODEL
No duplication...within a context!
Model
Model
CONTEXT
CONTEXT
Single, Unified Model within Any One Context
Duplication between...AOK!
4. Conclusion
57 / 문서의 제목
No Silver Bullet
58 / 문서의 제목
Essence of Software
Complexity Conformity
Changeability Invisibility
59 / 문서의 제목
Essence of Software
Complexity Conformity
Changeability Invisibility
Related to
Domain & Domain Model
60 / 문서의 제목
Domain-Drive Design
Back to the Basics
Software should model the Domain
Software & Project should be based on the Domain Model
Software that provides rich functionality based on a
fundamental understanding of the core domain
Tackling Essence
in the Heart of Software
61 / 문서의 제목
But Remember... No Silver Bullet
62 / 문서의 제목
Resources
- Domain-Driven Design, Eric Evans, Addison-Wesley, 2003
- Patterns of Enterprise Application Architecture, Martin Fowler, Addison-Wesley,
2002
- Applying Domain-Driven Design and Patterns, Jimmy Nilson, Addison-Wesley,
2006
- Domain Driven Design Quickly, http://www.infoq.com/minibooks/domain-driven-
design-quickly
- Domain-Driven Design Step-By-Step, http://dddstepbystep.com/cfs-
filesystemfile.ashx/__key/CommunityServer.Components.SiteFiles/Domain-Driven-
Design-_2D00_-Step-by-Step.pdf
- Domain-Driven Design Community, http://domaindrivendesign.org/
- Eternity’s Chit-Chat, http://aeternum.egloos.com/
Thank you.
Question.

More Related Content

What's hot

Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignNader Albert
 
Domain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) DistilledDomain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) DistilledNicola Costantino
 
Domain driven design and model driven development
Domain driven design and model driven developmentDomain driven design and model driven development
Domain driven design and model driven developmentDmitry Geyzersky
 
Applying Domain-Driven Design to craft Rich Domain Models
Applying Domain-Driven Design to craft Rich Domain ModelsApplying Domain-Driven Design to craft Rich Domain Models
Applying Domain-Driven Design to craft Rich Domain ModelsAlexander van Trijffel
 
Domain Driven Design Demonstrated
Domain Driven Design Demonstrated Domain Driven Design Demonstrated
Domain Driven Design Demonstrated Alan Christensen
 
How to Implement Domain Driven Design in Real Life SDLC
How to Implement Domain Driven Design  in Real Life SDLCHow to Implement Domain Driven Design  in Real Life SDLC
How to Implement Domain Driven Design in Real Life SDLCAbdul Karim
 
객체지향적인 도메인 레이어 구축하기
객체지향적인 도메인 레이어 구축하기객체지향적인 도메인 레이어 구축하기
객체지향적인 도메인 레이어 구축하기Young-Ho Cho
 
Refactoring for Domain Driven Design
Refactoring for Domain Driven DesignRefactoring for Domain Driven Design
Refactoring for Domain Driven DesignDavid Berliner
 
Modelling a complex domain with Domain-Driven Design
Modelling a complex domain with Domain-Driven DesignModelling a complex domain with Domain-Driven Design
Modelling a complex domain with Domain-Driven DesignNaeem Sarfraz
 
Domain Driven Design Quickly
Domain Driven Design QuicklyDomain Driven Design Quickly
Domain Driven Design QuicklyMariam Hakobyan
 
Implementing DDD Concepts in PHP
Implementing DDD Concepts in PHPImplementing DDD Concepts in PHP
Implementing DDD Concepts in PHPSteve Rhoades
 
Agile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven DesignAgile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven DesignAraf Karsh Hamid
 

What's hot (20)

Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain driven design
Domain driven designDomain driven design
Domain driven design
 
Rich domain model
Rich domain modelRich domain model
Rich domain model
 
Domain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) DistilledDomain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) Distilled
 
Domain driven design and model driven development
Domain driven design and model driven developmentDomain driven design and model driven development
Domain driven design and model driven development
 
Applying Domain-Driven Design to craft Rich Domain Models
Applying Domain-Driven Design to craft Rich Domain ModelsApplying Domain-Driven Design to craft Rich Domain Models
Applying Domain-Driven Design to craft Rich Domain Models
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design Demonstrated
Domain Driven Design Demonstrated Domain Driven Design Demonstrated
Domain Driven Design Demonstrated
 
How to Implement Domain Driven Design in Real Life SDLC
How to Implement Domain Driven Design  in Real Life SDLCHow to Implement Domain Driven Design  in Real Life SDLC
How to Implement Domain Driven Design in Real Life SDLC
 
Introduction to DDD
Introduction to DDDIntroduction to DDD
Introduction to DDD
 
객체지향적인 도메인 레이어 구축하기
객체지향적인 도메인 레이어 구축하기객체지향적인 도메인 레이어 구축하기
객체지향적인 도메인 레이어 구축하기
 
Refactoring for Domain Driven Design
Refactoring for Domain Driven DesignRefactoring for Domain Driven Design
Refactoring for Domain Driven Design
 
Modelling a complex domain with Domain-Driven Design
Modelling a complex domain with Domain-Driven DesignModelling a complex domain with Domain-Driven Design
Modelling a complex domain with Domain-Driven Design
 
Domain Driven Design Quickly
Domain Driven Design QuicklyDomain Driven Design Quickly
Domain Driven Design Quickly
 
Domain Driven Design
Domain Driven Design Domain Driven Design
Domain Driven Design
 
Implementing DDD Concepts in PHP
Implementing DDD Concepts in PHPImplementing DDD Concepts in PHP
Implementing DDD Concepts in PHP
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Agile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven DesignAgile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven Design
 

Viewers also liked

도메인 주도 설계의 본질
도메인 주도 설계의 본질도메인 주도 설계의 본질
도메인 주도 설계의 본질Young-Ho Cho
 
도메인구현 KSUG 20151128
도메인구현 KSUG 20151128도메인구현 KSUG 20151128
도메인구현 KSUG 20151128beom kyun choi
 
DDD 구현기초 (거의 Final 버전)
DDD 구현기초 (거의 Final 버전)DDD 구현기초 (거의 Final 버전)
DDD 구현기초 (거의 Final 버전)beom kyun choi
 
Domain driven design 8장
Domain driven design 8장Domain driven design 8장
Domain driven design 8장kukuman
 
도메인 주도 설계 (Domain Driven Design)
도메인 주도 설계 (Domain Driven Design)도메인 주도 설계 (Domain Driven Design)
도메인 주도 설계 (Domain Driven Design)Ashal aka JOKER
 
아꿈사 DDD(Domain-Driven Design) 5장 소프트웨어에서 표현되는 모델
아꿈사 DDD(Domain-Driven Design) 5장 소프트웨어에서 표현되는 모델아꿈사 DDD(Domain-Driven Design) 5장 소프트웨어에서 표현되는 모델
아꿈사 DDD(Domain-Driven Design) 5장 소프트웨어에서 표현되는 모델명환 안
 

Viewers also liked (7)

DDD 산책
DDD 산책DDD 산책
DDD 산책
 
도메인 주도 설계의 본질
도메인 주도 설계의 본질도메인 주도 설계의 본질
도메인 주도 설계의 본질
 
도메인구현 KSUG 20151128
도메인구현 KSUG 20151128도메인구현 KSUG 20151128
도메인구현 KSUG 20151128
 
DDD 구현기초 (거의 Final 버전)
DDD 구현기초 (거의 Final 버전)DDD 구현기초 (거의 Final 버전)
DDD 구현기초 (거의 Final 버전)
 
Domain driven design 8장
Domain driven design 8장Domain driven design 8장
Domain driven design 8장
 
도메인 주도 설계 (Domain Driven Design)
도메인 주도 설계 (Domain Driven Design)도메인 주도 설계 (Domain Driven Design)
도메인 주도 설계 (Domain Driven Design)
 
아꿈사 DDD(Domain-Driven Design) 5장 소프트웨어에서 표현되는 모델
아꿈사 DDD(Domain-Driven Design) 5장 소프트웨어에서 표현되는 모델아꿈사 DDD(Domain-Driven Design) 5장 소프트웨어에서 표현되는 모델
아꿈사 DDD(Domain-Driven Design) 5장 소프트웨어에서 표현되는 모델
 

Similar to Domain Driven Design

MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...Amit Sheth
 
Usability awareness brown bag
Usability awareness brown bagUsability awareness brown bag
Usability awareness brown bagLawrenceNajjar
 
IPC07 Talk - Beautiful Code with AOP and DI
IPC07 Talk - Beautiful Code with AOP and DIIPC07 Talk - Beautiful Code with AOP and DI
IPC07 Talk - Beautiful Code with AOP and DIRobert Lemke
 
Simplifying & accelerating application development with MongoDB's intelligent...
Simplifying & accelerating application development with MongoDB's intelligent...Simplifying & accelerating application development with MongoDB's intelligent...
Simplifying & accelerating application development with MongoDB's intelligent...Maxime Beugnet
 
Pragmatic Model Driven Development using openArchitectureWare
Pragmatic Model Driven Development using openArchitectureWarePragmatic Model Driven Development using openArchitectureWare
Pragmatic Model Driven Development using openArchitectureWareMichael Vorburger
 
Using LLVM to accelerate processing of data in Apache Arrow
Using LLVM to accelerate processing of data in Apache ArrowUsing LLVM to accelerate processing of data in Apache Arrow
Using LLVM to accelerate processing of data in Apache ArrowDataWorks Summit
 
An insight to microsoft platform
An insight to microsoft platformAn insight to microsoft platform
An insight to microsoft platformConfiz
 
ModelWriter Presentation International 01-07-2015
ModelWriter Presentation International 01-07-2015ModelWriter Presentation International 01-07-2015
ModelWriter Presentation International 01-07-2015Ferhat Erata
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arpGary Pedretti
 
2011 iska - tim m - domain driven design
2011   iska - tim m - domain driven design2011   iska - tim m - domain driven design
2011 iska - tim m - domain driven designTim Mahy
 

Similar to Domain Driven Design (20)

MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...
 
Patterns for distributed systems
Patterns for distributed systemsPatterns for distributed systems
Patterns for distributed systems
 
Usability awareness brown bag
Usability awareness brown bagUsability awareness brown bag
Usability awareness brown bag
 
IPC07 Talk - Beautiful Code with AOP and DI
IPC07 Talk - Beautiful Code with AOP and DIIPC07 Talk - Beautiful Code with AOP and DI
IPC07 Talk - Beautiful Code with AOP and DI
 
Wipro-Projects
Wipro-ProjectsWipro-Projects
Wipro-Projects
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Simplifying & accelerating application development with MongoDB's intelligent...
Simplifying & accelerating application development with MongoDB's intelligent...Simplifying & accelerating application development with MongoDB's intelligent...
Simplifying & accelerating application development with MongoDB's intelligent...
 
Pragmatic Model Driven Development using openArchitectureWare
Pragmatic Model Driven Development using openArchitectureWarePragmatic Model Driven Development using openArchitectureWare
Pragmatic Model Driven Development using openArchitectureWare
 
Ruby On Rails Introduction
Ruby On Rails IntroductionRuby On Rails Introduction
Ruby On Rails Introduction
 
EENA 2021 - User Experience and User Interface (UX/UI) design (1/3)
EENA 2021 - User Experience and User Interface (UX/UI) design (1/3)EENA 2021 - User Experience and User Interface (UX/UI) design (1/3)
EENA 2021 - User Experience and User Interface (UX/UI) design (1/3)
 
Using LLVM to accelerate processing of data in Apache Arrow
Using LLVM to accelerate processing of data in Apache ArrowUsing LLVM to accelerate processing of data in Apache Arrow
Using LLVM to accelerate processing of data in Apache Arrow
 
An insight to microsoft platform
An insight to microsoft platformAn insight to microsoft platform
An insight to microsoft platform
 
Prakash_Ganapathy
Prakash_GanapathyPrakash_Ganapathy
Prakash_Ganapathy
 
Prasad_CTP
Prasad_CTPPrasad_CTP
Prasad_CTP
 
ModelWriter Presentation International 01-07-2015
ModelWriter Presentation International 01-07-2015ModelWriter Presentation International 01-07-2015
ModelWriter Presentation International 01-07-2015
 
Final ppt
Final pptFinal ppt
Final ppt
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
 
KIRANKUMAR_MV
KIRANKUMAR_MVKIRANKUMAR_MV
KIRANKUMAR_MV
 
2011 iska - tim m - domain driven design
2011   iska - tim m - domain driven design2011   iska - tim m - domain driven design
2011 iska - tim m - domain driven design
 
Ankur_Srivastava
Ankur_SrivastavaAnkur_Srivastava
Ankur_Srivastava
 

More from Young-Ho Cho

[수정본] 우아한 객체지향
[수정본] 우아한 객체지향[수정본] 우아한 객체지향
[수정본] 우아한 객체지향Young-Ho Cho
 
우아한 객체지향
우아한 객체지향우아한 객체지향
우아한 객체지향Young-Ho Cho
 
애플리케이션 아키텍처와 객체지향
애플리케이션 아키텍처와 객체지향 애플리케이션 아키텍처와 객체지향
애플리케이션 아키텍처와 객체지향 Young-Ho Cho
 
[NHN NEXT] Java 강의 - Week4
[NHN NEXT] Java 강의 - Week4[NHN NEXT] Java 강의 - Week4
[NHN NEXT] Java 강의 - Week4Young-Ho Cho
 
[NEXT 프연 Week3] C# Data Type
[NEXT 프연 Week3] C# Data Type[NEXT 프연 Week3] C# Data Type
[NEXT 프연 Week3] C# Data TypeYoung-Ho Cho
 
[NEXT 프연 Week2] UNIX 명령어 간단하게 살펴보기
[NEXT 프연 Week2] UNIX 명령어 간단하게 살펴보기[NEXT 프연 Week2] UNIX 명령어 간단하게 살펴보기
[NEXT 프연 Week2] UNIX 명령어 간단하게 살펴보기Young-Ho Cho
 
[NHN NEXT] Java 강의- Week3
[NHN NEXT] Java 강의- Week3[NHN NEXT] Java 강의- Week3
[NHN NEXT] Java 강의- Week3Young-Ho Cho
 
[NHN NEXT] Java 강의 - Week2
[NHN NEXT] Java 강의 - Week2[NHN NEXT] Java 강의 - Week2
[NHN NEXT] Java 강의 - Week2Young-Ho Cho
 
[NHN NEXT] Java 강의 - Week1
[NHN NEXT] Java 강의 - Week1[NHN NEXT] Java 강의 - Week1
[NHN NEXT] Java 강의 - Week1Young-Ho Cho
 
[JWAP-2] DI & Spring
[JWAP-2] DI & Spring[JWAP-2] DI & Spring
[JWAP-2] DI & SpringYoung-Ho Cho
 
[NEXT 프연 Week1] Git 시작하기
[NEXT 프연 Week1] Git 시작하기[NEXT 프연 Week1] Git 시작하기
[NEXT 프연 Week1] Git 시작하기Young-Ho Cho
 
[JWPA-1]의존성 주입(Dependency injection)
[JWPA-1]의존성 주입(Dependency injection)[JWPA-1]의존성 주입(Dependency injection)
[JWPA-1]의존성 주입(Dependency injection)Young-Ho Cho
 
[NHN NEXT] 2014 NHN NEXT 창의체험
[NHN NEXT] 2014 NHN NEXT 창의체험[NHN NEXT] 2014 NHN NEXT 창의체험
[NHN NEXT] 2014 NHN NEXT 창의체험Young-Ho Cho
 
[PreSchool-1] 프로그래밍 '개념' 맛보기
[PreSchool-1] 프로그래밍 '개념' 맛보기[PreSchool-1] 프로그래밍 '개념' 맛보기
[PreSchool-1] 프로그래밍 '개념' 맛보기Young-Ho Cho
 
Roles, Responsibilities, Collaborations
Roles, Responsibilities, CollaborationsRoles, Responsibilities, Collaborations
Roles, Responsibilities, CollaborationsYoung-Ho Cho
 

More from Young-Ho Cho (15)

[수정본] 우아한 객체지향
[수정본] 우아한 객체지향[수정본] 우아한 객체지향
[수정본] 우아한 객체지향
 
우아한 객체지향
우아한 객체지향우아한 객체지향
우아한 객체지향
 
애플리케이션 아키텍처와 객체지향
애플리케이션 아키텍처와 객체지향 애플리케이션 아키텍처와 객체지향
애플리케이션 아키텍처와 객체지향
 
[NHN NEXT] Java 강의 - Week4
[NHN NEXT] Java 강의 - Week4[NHN NEXT] Java 강의 - Week4
[NHN NEXT] Java 강의 - Week4
 
[NEXT 프연 Week3] C# Data Type
[NEXT 프연 Week3] C# Data Type[NEXT 프연 Week3] C# Data Type
[NEXT 프연 Week3] C# Data Type
 
[NEXT 프연 Week2] UNIX 명령어 간단하게 살펴보기
[NEXT 프연 Week2] UNIX 명령어 간단하게 살펴보기[NEXT 프연 Week2] UNIX 명령어 간단하게 살펴보기
[NEXT 프연 Week2] UNIX 명령어 간단하게 살펴보기
 
[NHN NEXT] Java 강의- Week3
[NHN NEXT] Java 강의- Week3[NHN NEXT] Java 강의- Week3
[NHN NEXT] Java 강의- Week3
 
[NHN NEXT] Java 강의 - Week2
[NHN NEXT] Java 강의 - Week2[NHN NEXT] Java 강의 - Week2
[NHN NEXT] Java 강의 - Week2
 
[NHN NEXT] Java 강의 - Week1
[NHN NEXT] Java 강의 - Week1[NHN NEXT] Java 강의 - Week1
[NHN NEXT] Java 강의 - Week1
 
[JWAP-2] DI & Spring
[JWAP-2] DI & Spring[JWAP-2] DI & Spring
[JWAP-2] DI & Spring
 
[NEXT 프연 Week1] Git 시작하기
[NEXT 프연 Week1] Git 시작하기[NEXT 프연 Week1] Git 시작하기
[NEXT 프연 Week1] Git 시작하기
 
[JWPA-1]의존성 주입(Dependency injection)
[JWPA-1]의존성 주입(Dependency injection)[JWPA-1]의존성 주입(Dependency injection)
[JWPA-1]의존성 주입(Dependency injection)
 
[NHN NEXT] 2014 NHN NEXT 창의체험
[NHN NEXT] 2014 NHN NEXT 창의체험[NHN NEXT] 2014 NHN NEXT 창의체험
[NHN NEXT] 2014 NHN NEXT 창의체험
 
[PreSchool-1] 프로그래밍 '개념' 맛보기
[PreSchool-1] 프로그래밍 '개념' 맛보기[PreSchool-1] 프로그래밍 '개념' 맛보기
[PreSchool-1] 프로그래밍 '개념' 맛보기
 
Roles, Responsibilities, Collaborations
Roles, Responsibilities, CollaborationsRoles, Responsibilities, Collaborations
Roles, Responsibilities, Collaborations
 

Recently uploaded

SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 

Recently uploaded (20)

SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 

Domain Driven Design

  • 1. Tackling Complexity in the Heart of Software Domain-Driven Design 카페서비스개발팀 조영호
  • 2. 2. What is Domain-Driven Design? 3. Patterns of Domain-Driven Design 목차 4. Conclusion 1. Domain & Software
  • 3. 1. Domain & Software
  • 4. 4 / 문서의 제목 Domain-Driven Design - Book By Eric Evans Addison-Wesley, 2003
  • 5. 5 / 문서의 제목 Domain & Software The subject area to which the user applies a program is the domain of the software. The critical complexity of most software projects is in understanding the domain itself.
  • 6. 6 / 문서의 제목 Domain & Software Software has to Model the Domain
  • 7. 7 / 문서의 제목 But... Spring ORM Dependency Injection Database J2EE Ajax Continuous Integration Hadoop Coarse Grained Lock Strategy Hibernate Mockito ActiveMQ RoRGrailsAOP Naked Object
  • 8. 8 / 문서의 제목 Cargo cargoid originid destination customers clearance(opt) weight Haz Mat Code Routing Service Database table : cargo_bookings Cargo_id Transport Load Unload origin destination customers clearance (opt) populate cargo_bookings table "If we give the Routing Service an origin, destination, and arrival time, it can look up the stops the cargo will have to make and, well . . . stick them in the database." Conversation Based on Technology
  • 9. 2. What is Domain-Driven Design?
  • 10. 10 / 문서의 제목 Representation[Semantic] Gap The gap between our mental model of the domain and its representation in software Low Representation Gap Name from domain vocabulary Responsibility derived from domain concept LionCat
  • 11. 11 / 문서의 제목 Ice Age of EJB Cat High Representation Gap <<interface>> CatHome <<interface>> Cat CatEJB <<interface>> EJBHome <<interface>> EJBObject <<interface>> EntityBean Domain Concept Design
  • 12. 12 / 문서의 제목 Technology Exodus OO design is more important than any particular implementation technology (such as J2EE, or even Java). And now important than even Spring or Hibernate
  • 13. 13 / 문서의 제목 DOMAIN MODEL Pattern An object model of the domain that incorporates both behavior and data. Sale getTotalPrice() : long setTotalPrice(long) getLineItems() : Collection setLineImtes(Collection) LineItem getPrice() : long setPrice(long) getPrioduct() : Product setProduct(Product) Sale calclulatePrice() : Money addLineItem(LineItem) LineItem calculatePrice() : long * TRANSACTION SCRIPT & ANEMIC DOMAIN MODEL RICH DOMAIN MODEL Back to the Origin of the OO
  • 14. 14 / 문서의 제목 Continuous Design in Agile Specification Test Design Code Big Up-front Design Incremental Design Refactoring
  • 15. 15 / 문서의 제목 Analysis = Design = Implementation Analysis Model seatId ReservationSeat Showing time Design Model seatId ReservationSeat Showing time : TimeOfDay 1 Implementation Model Showing showing = showingRepository.getShowingWithLock(showingId); Reservation reservation = showing.reserveSeats(seatIds, adultSeatCount, teenagerSeatCount); reservationRepository.saveReservation(reservation);
  • 16. 16 / 문서의 제목 And Finally Focus on Domain Complexity, not Technology Complexity Everything is Driven By Domain
  • 17. 17 / 문서의 제목 And Finally Tackling Complexity in the Heart of Software
  • 18. 18 / 문서의 제목 And Finally UBIQUITOUS LANGUAGE MODEL-DRIVEN DESIGN
  • 19. 19 / 문서의 제목 Model
  • 20. 20 / 문서의 제목 Model A system of abstractions that describes selected aspects of a domain and can be used to solve problems related to that domain A model is not right or wrong, only more or less useful
  • 21. 21 / 문서의 제목 Domain Modeling Documentary Film A domain modeler chooses particular model for usability
  • 22. 22 / 문서의 제목 Model & Diagram A Domain Model is not a particular diagram. It is the knowledge that the diagram is intended to convey. The Diagram is a representation of Model Not a Model
  • 23. 23 / 문서의 제목 Model-Driven Design
  • 24. 24 / 문서의 제목 The MODEL and the heart of the DESIGN shape each other Model-Driven Design DOMAIN MODEL seatId ReservationSeat Showing time DESIGN seatId ReservationSeat Showing time : TimeOfDay 1 CODE Showing showing = showingRepository.getShowingWithLock(showingId); Reservation reservation = showing.reserveSeats(seatIds, adultSeatCount, teenagerSeatCount); reservationRepository.saveReservation(reservation);
  • 25. 25 / 문서의 제목 Find the Model that works for Analysis, Design and Implementation Model-Driven Design Lower Representation Gap Object-Oriented Paradigm is the most Powerful The Code is an expression of Model
  • 26. 26 / 문서의 제목 A Programmer is a Modeler. Hands-On Modelers
  • 27. 27 / 문서의 제목 UBIQUITOUS LANGUAGE
  • 28. 28 / 문서의 제목 UBIQUITOUS LANGUAGE Conversations among Developers Discussions among Domain Experts Expressions in the Code Discussion between Developers and Domain Experts All based on the same language, derived from a shared Domain Model
  • 29. 29 / 문서의 제목 UBIQUITOUS LANGUAGE technical aspects of design technical terms technical design patterns business terms developers don’t understand business terms everyone uses that don’t appear in design domain model terms names of BOUNDED CONTEXT terminology of large-scale structure many patterns from Domain-Driven Design book
  • 30. 30 / 문서의 제목 Use the Domain Model as the backbone of a Language UBIQUITOUS LANGUAGE Use the same language in diagrams, writing, and especially speech Use the UBIQUITOUS LANGES in all communication within team and in the code One Team, One Language
  • 31. 31 / 문서의 제목 And Domain-Driven Design DOMAIN MODEL seatId ReservationSeat Showing time UBIQUITOUS LANGUAGE Showing Reservation Reservation Seat CODE Showing showing = showingRepository.getShowingWithLock(showingId); Reservation reservation = showing.reserveSeats(seatIds, adultSeatCount, teenagerSeatCount); reservationRepository.saveReservation(reservation);
  • 32. 32 / 문서의 제목 And Domain-Driven Design DOMAIN MODEL seatId ReservationSeat Showing time UBIQUITOUS LANGUAGE Showing Reservation Reservation Seat CODE Showing showing = showingRepository.getShowingWithLock(showingId); Reservation reservation = showing.reserveSeats(seatIds, adultSeatCount, teenagerSeatCount); reservationRepository.saveReservation(reservation);
  • 33. 33 / 문서의 제목 And Domain-Driven Design DOMAIN MODEL seatId ReservationSeat Showing time UBIQUITOUS LANGUAGE Performance Reservation Reservation Seat CODE Showing showing = showingRepository.getShowingWithLock(showingId); Reservation reservation = showing.reserveSeats(seatIds, adultSeatCount, teenagerSeatCount); reservationRepository.saveReservation(reservation);
  • 34. 34 / 문서의 제목 And Domain-Driven Design DOMAIN MODEL seatId ReservationSeat Performance time UBIQUITOUS LANGUAGE Performance Reservation Reservation Seat CODE Showing showing = showingRepository.getShowingWithLock(showingId); Reservation reservation = showing.reserveSeats(seatIds, adultSeatCount, teenagerSeatCount); reservationRepository.saveReservation(reservation);
  • 35. 35 / 문서의 제목 And Domain-Driven Design DOMAIN MODEL seatId ReservationSeat Performance time UBIQUITOUS LANGUAGE Performance Reservation Reservation Seat CODE Performance performance = performanceRepository.getPerformanceWithLock( performanceId); Reservation reservation = showing.reserveSeats(seatIds, adultSeatCount, teenagerSeatCount); reservationRepository.saveReservation(reservation);
  • 36. 36 / 문서의 제목 And Domain-Driven Design A Showing is...
  • 37. 37 / 문서의 제목 And Domain-Driven Design A Performance is...
  • 38. 38 / 문서의 제목 Cargo cargoid originid destination customers clearance(opt) weight Haz Mat Code Routing Service Database table : cargo_bookings Cargo_id Transport Load Unload origin destination customers clearance (opt) populate cargo_bookings table "If we give the Routing Service an origin, destination, and arrival time, it can look up the stops the cargo will have to make and, well . . . stick them in the database." Conversation Based on Technology
  • 39. 39 / 문서의 제목 Cargo cargoid weight Haz Mat Code Routing Service Route Specification origin destination customers clearance (opt) Itinerary Leg 0..1 {Itinerary must satisfy specification} a Route Specification an Itinerary satisfying the Route Specification "A Routing Service finds an Itinerary that satisfies a Route Specification.” Conversation Based on Model
  • 40. 3. Patterns of Domain-Driven Design
  • 41. 41 / 문서의 제목 Domain-Driven Design & Patterns DDD is not about patterns such as ENTITY, VALUE OBJECT, AGGREGATE, REPOSITORY, SERVICE, FACTORY DDD is a better way of thinking about software design Patterns may take your software more stable or more maintainable, but it is the methodology that guides you to deliver something fit for purpose
  • 42. 42 / 문서의 제목 DOMAIN MODEL is a King
  • 43. 43 / 문서의 제목 A King, DOMAN MODEL is RICH, Not ANEMIC <<interface>> ShowingRepository getShowingWithLock(showingId) :Showing seatId <<interface>> SeatState AbstractSeatState Reserved 1 0..1 1 0..* 1 0..1 leftSeat 0..1 rightSeat 0..1 nextSeatState 0..1 previousSeatState <<interface>> ScheduleService reserve(showingId, seats,adultSeatCount, teenagerSeatCount) : Reservation ReservationSeat -showingRepository -reservationRepository ScheduleServiceImpl Occupied Sold <<interface>> ReservationRepository saveReservation(reservation) ShowingFactory create(dayOfYear, showingSpecification) : Showing Showing time:TimeOfYear Reservation amount:Money
  • 44. 44 / 문서의 제목 <<interface>> ShowingRepository getShowingWithLock(showingId) :Showing seatId <<interface>> SeatState AbstractSeatState Reserved 1 0..1 1 0..* 1 0..1 leftSeat 0..1 rightSeat 0..1 nextSeatState 0..1 previousSeatState <<interface>> ScheduleService reserve(showingId, seats,adultSeatCount, teenagerSeatCount) : Reservation ReservationSeat -showingRepository -reservationRepository ScheduleServiceImpl Occupied Sold <<interface>> ReservationRepository saveReservation(reservation) ShowingFactory create(dayOfYear, showingSpecification) : Showing Showing time:TimeOfYear Reservation amount:Money A King, DOMAN MODEL is RICH, Not ANEMIC SERVICE ENTITY AGGREGATE VALUE OBJECT REPOSITORY FACTORY
  • 45. 45 / 문서의 제목 A King should be Protected
  • 46. 46 / 문서의 제목 Layered Architecture User Interface Application Domain Infrastructure
  • 47. 47 / 문서의 제목 CONTEXT is a King’s Domain
  • 48. 48 / 문서의 제목 BOUNDED CONTEXT
  • 49. 49 / 문서의 제목 BOUNDED CONTEXT Model Model CONTEXT CONTEXT
  • 50. 50 / 문서의 제목 Translate two UBIQUATIOUS LABUAGES
  • 51. 51 / 문서의 제목 CONTEXT MAP Model Model CONTEXT CONTEXT TRNSLATION MAP
  • 52. 52 / 문서의 제목 CONTINUOUS INTEGRATION Model Model CONTEXT CONTEXT CONTINUOUS INTEGRATION per each CONTEXT
  • 53. 53 / 문서의 제목 A king should learn continuously
  • 54. 54 / 문서의 제목 DISTILLATION User Interface Application Infrastructure Domain CORE DOMAIN GENERIC SUBDOMAIIN COHESIVE MECHANISM SEGREGATED CORE ABSTRACT CORE Refactoring
  • 55. 55 / 문서의 제목 CONTEXT & MODEL No duplication...within a context! Model Model CONTEXT CONTEXT Single, Unified Model within Any One Context Duplication between...AOK!
  • 57. 57 / 문서의 제목 No Silver Bullet
  • 58. 58 / 문서의 제목 Essence of Software Complexity Conformity Changeability Invisibility
  • 59. 59 / 문서의 제목 Essence of Software Complexity Conformity Changeability Invisibility Related to Domain & Domain Model
  • 60. 60 / 문서의 제목 Domain-Drive Design Back to the Basics Software should model the Domain Software & Project should be based on the Domain Model Software that provides rich functionality based on a fundamental understanding of the core domain Tackling Essence in the Heart of Software
  • 61. 61 / 문서의 제목 But Remember... No Silver Bullet
  • 62. 62 / 문서의 제목 Resources - Domain-Driven Design, Eric Evans, Addison-Wesley, 2003 - Patterns of Enterprise Application Architecture, Martin Fowler, Addison-Wesley, 2002 - Applying Domain-Driven Design and Patterns, Jimmy Nilson, Addison-Wesley, 2006 - Domain Driven Design Quickly, http://www.infoq.com/minibooks/domain-driven- design-quickly - Domain-Driven Design Step-By-Step, http://dddstepbystep.com/cfs- filesystemfile.ashx/__key/CommunityServer.Components.SiteFiles/Domain-Driven- Design-_2D00_-Step-by-Step.pdf - Domain-Driven Design Community, http://domaindrivendesign.org/ - Eternity’s Chit-Chat, http://aeternum.egloos.com/