domain-driven design 훑어보기 part 1

19
Domain-Driven Design 대충 훑어보기 #1 DDD Reference Ko sang won

Upload: sangwon-ko

Post on 20-Jul-2015

59 views

Category:

Software


2 download

TRANSCRIPT

Domain-Driven Design 대충 훑어보기 #1

DDD Reference

Ko sang won

왜 대충 훑어보는거지!?

얘기할게 너무 너무 많다.

Eric Evans가 PLoP 을 통해서 패턴 정리해서 발표

The Big Blue Book 읽다가 낙오하기 좋은 책

Books

이 책으로 대충 훑어봅시다.

참고, 이 책의 lastest draft version은 여기에.. http://domainlanguage.com/ddd/reference/

I. Putting the Model to Work

II. Building Blocks of a Model-Driven Design

III. Supple Design

IV. Context Mapping for Strategic Design

V. Distillation for Strategic Design

VI. Large-scale Structure for Strategic Design

목차만 보자면, 음…

기본 정의부터 확실히 하고 갑시다.

domain 도메인A sphere of knowledge, influence, or activity. The subject area to which the user applies a program is the domain of the software.

model 모델A system of abstractions that describes selected aspects of a domain and can be used to solve problems related to that domain.

ubiquitous language 유비쿼터스 언어A language structured around the domain model and used by all team members within a bounded context to connect all the activities of the team with the software.

context 컨텍스트The setting in which a word or statement appears that determines its meaning. Statements about a model can only be understood in a context.

bounded context 바운디드 컨텍스트A description of a boundary (typically a subsystem or the work of particular team) within which a particular model is defined and applicable.

Pattern LanguageOverview

Part I. Putting the Model to Work

Bounded Context

Ubiquitous Language

Continuous Integration

Model-Driven Design

Hands-on Modelers

Refactoring Toward Deeper Insight

Part I. Putting the Model to Work

DDD의 3가지 포인트

• Core domain 에 집중

• 도메인, 소프트웨어 전문가의 창조적인 협업으로 Models 을 탐색

• 명확한 Bounded Context 안에서 Ubiquitous Language로 대화

Bounded Context

1. 모델이 적용되는 컨텍스트를 명확히 정의 2. 조직부터 코드 수준까지 바운더리를 명확히 정해야 함 3. CI를 통해 모델 등이 잘 유지되는지 확인 4. 다른데서 사용되지 않는 컨텍스트에 대한 Single development process 표준화

http://martinfowler.com/bliki/BoundedContext.html

Ubiquitous Language

http://userinexperience.com/?p=308

1. 언어의 중심으로 모델을 사용할 것 2. 모든 커뮤니케이션, 코드를 유비쿼터스 언어 중심으로 바로 사용 3. 바운디드 컨텍스트에서도 유비쿼터스 언어로 다이어그램, 문서 작성, 대화를 통일 4. 대체 언어를 제시하고 모델에 반영해서 장애물을 제거

언어가 바뀌면,모델이 바뀐다.

Continuous Integration

http://electric-cloud.com/blog/2014/09/continuous-discussion-online-panel/

1. CI 도입! 파편화를 자동화 테스트로 빨리 발견 2. 유비쿼터스 언어로 모델에 대한 공통된 뷰를 해결하고 참여자들의 생각을 일치화

Model-Driven Design

http://mdegroup.disim.univaq.it/

1. 도메인 모델을 그대로 반영해서 소프트웨어 시스템의 부분을 설계 2. 도메인의 심도있는 부분까지 반영되어 자연스럽게 구현되도록 모델을 수정 3. 단일 모델이 여러 목적에 잘 부합되도록! (유비쿼터스 언어로도 잘 표현되고!)

모델이 바뀌면,코드가 바뀐다.

한번 더,

언어가 바뀌면,모델이 바뀐다.

Hands-on Modelers

1. 모델에 기여한 모든 사람들은 코드에 대해서도 시간적으로 투자를 해야 함 2. 코드 변경에 책임이 있는 사람은 모델을 코드에 어떻게 표현하는지 배워야 함 3. 모든 개발자는 도메인 전문가, 모델에 대한 토론 등에 어느 정도 관여되어 있어야 함

Refactoring Toward Deeper Insight

1. 도메인 전문가의 생각, 사용자의 요구사항에 점점 맞아가는 과정 2. 반복된 리팩토링 과정이 없이, 정말 세련된 도메인 모델이 나오긴 쉽지 않음

To be continued…