Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
안녕하세요. 시훈님, 거의 만 3년이 지난 시점에 리뷰 요청 승낙해 주셔서 너무나도 감사드립니다.
확실히 미션 한지 오래돼서 기억이 가물가물한 상태네요. 그때 느낀 점과 미션 내용을 보고 메뉴 패키지 리팩토링을 진행하였습니다. 리팩토링 관점은 시간이 지남에 따라 도메인 별로 애플리케이션을 분리하거나, 다시 합치거나 할 때 유연하게 할 수 있을까 고민하면서 리팩토링하였습니다. 그 과정 속에서 clients 패키지와 shared 패키지가 나왔으며, clients는 공통으로 쓰이는 외부 API 구현, shared는 도메인을 넘나드는 이벤트에 대해서 정의하였습니다.
질문은 시훈님은 부패 방지 계층에 대해서 코드로 표현하실 때 어떻게 표현하시는지 궁금합니다. Menu의 MenuAntiCorruptionService에 있습니다. 상품 테이블과 주문 상품에 대한 도메인의 경계에 걸쳐있는 것을 어떻게 표현할지 고민하다가 나중에 애플리케이션이 분리된다면 API 요청으로 될 수도 있고, 이벤트를 통해 내부적으로 적재할 수도 있다고 생각하였습니다. 그래서 일단, 부패방 지 계층를 하나 만들어 Menu와 Product에 겹치는 로직을 Menu 도메인 패키지 내에 넣었습니다. 그 이유는 부패 방지 계층이라 해도, 데이터를 가지고 컨트롤하는 도메인이 가져가는 게 맞다고 생각하였습니다.
다시 한번 감사드리며, 오늘부터 설 연휴인데 가족들과 즐거운 설 연휴 보내시길 바랍니다.