Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4주차] 8장. 경계 간 매핑하기- 김광훈 #51

Closed
Wave1994-Hoon opened this issue Mar 13, 2022 · 1 comment
Closed

[4주차] 8장. 경계 간 매핑하기- 김광훈 #51

Wave1994-Hoon opened this issue Mar 13, 2022 · 1 comment

Comments

@Wave1994-Hoon
Copy link
Member

[질문]

  • 책에서 소개하는 매핑 전략은 전통적인 레이어드 아키텍처에서도 적용할 수 있을 것 같습니다.
  • 예를들어 Controller, Service, Repository 에 각각 DTO 혹은 Entity 를 생성하여 매핑할 수 있을 것 같습니다.
  • 현업에서 다들 어떻게 사용하시는지 궁금합니다.
@Wave1994-Hoon
Copy link
Member Author

[답변]

  • 대부분 DTO 를 정의하고 여러 계층에서 사용하는 것 같다.
  • 이 부분이 레어이드 아키텍처의 문제점 중 하나라고 본다.
  • DTO 는 계층 구분 없이 서로 의존성을 가질 수 있기 때문이다.
  • 이런 부분을 해소할 수 있는 방법으로 Controller 전용 DTO 는 postfix 로 Response, Request 등을 붙여서 사용하는 방법이 있을 것 같다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant