Mvitimin / Microservices_study

Study for MSA
0 stars 0 forks source link

Domain Driven Design #3

Open Mvitimin opened 1 year ago

Mvitimin commented 1 year ago

Domain Driven Design

Strategic DDD

도메인에 대한 경계를 도입. 하나의 도메인당 한개의 Bounded Context

도메인이란?

어플리케이션에서의 실행영역 ex) Online Food Ordering

Mvitimin commented 1 year ago

image

image

image
Mvitimin commented 1 year ago

Tactical DDD

A.) Aggregate: Group of entities that are logically related.

B.) Aggregate root: Root entity to keep the aggregate in a consistent state.

C.) Entity: Core domain objects.

D.) Value object: Used to bring context to the value.

E.) Domain Event: Used to decouple the different domains. It will notify the other domains based on result of business logic.

Mvitimin commented 1 year ago

Order Service 도메인 로직 컴포넌트 설계

image

Mvitimin commented 1 year ago
Mvitimin commented 12 months ago

image

Mvitimin commented 12 months ago

Entity Classes

  1. An entity class can act as an aggregate root, and in that case, forcing all business invariants is the responsibility of that entity
  2. An entity class contains the methods to complete critical business rules.
  3. An entity must have a unique identifier.
Mvitimin commented 11 months ago

image

Mvitimin commented 11 months ago

common -> common-domain

image

order-domain -> order-domain-core image

image

image

-> order-application-service image image