Skip to content

Conversation

@pingu9
Copy link
Contributor

@pingu9 pingu9 commented Oct 4, 2023

swit 링크: https://app.swit.io/share-route?route_type=project&route_variables=23091405520180SZFQIM%2C23091405572194IM56Q6%2C23100104142117E7UMN3%2C

우선 주어진 보일러플레이트 기반으로 댓글, 대댓글을 작성하는 API, 테스트 코드를 간단히 작성해 보았습니다. (조회 API 테스트는 아직 작성중인데 우선 기능 먼저 올립니다.) 구체적인 기획이 나오지 않은 상태라 큰 의미는 없겠지만 이런 스타일로 코딩하고 있다.. 정도만 나누는 의미일 듯 합니다.

Copy link
Contributor

@cheolwon1994 cheolwon1994 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

전반적으로 잘 작성하셨지만 크게 2가지에 대한 수정사항이 있을것 같아요!

  1. 전략적 패턴을 이용한 Command.run() / execute() 처리
  2. xxxCommandExecutor의 경우 REST HTTP Method별 구분이 아닌, xxx를 활용한 처리가 이뤄져야 합니다!
    ex) CommentCommandExecutor{
    // getComment
    // postComment
    }

@pingu9
Copy link
Contributor Author

pingu9 commented Oct 5, 2023

전반적으로 잘 작성하셨지만 크게 2가지에 대한 수정사항이 있을것 같아요!

  1. 전략적 패턴을 이용한 Command.run() / execute() 처리
  2. xxxCommandExecutor의 경우 REST HTTP Method별 구분이 아닌, xxx를 활용한 처리가 이뤄져야 합니다!
    ex) CommentCommandExecutor{
    // getComment
    // postComment
    }
  1. 넵 저도 인영님께서 작성해주신 부분 보면서 한번 수정해보겠습니다!
  2. 이 부분도 사실 HTTP Method 기준으로 나눈건 아니고 return 값을 다르게 활용해야 해서 한거긴 한데... 1번을 해결하면서 다시 한번 보겠습니다.

10/6
개선사항 적용하여 새 PR을 올렸습니다!
#7

댓글 작성 기능 - 커맨드 패턴 처리 개선
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants