Conversation
2 tasks
joona95
approved these changes
Feb 14, 2026
|
|
||
| ## 질문 | ||
|
|
||
| - 앞서 진행한 메소드를 추출하는 방식으로의 개선에 어떤 문제가 있고 어떻게 개선할 수 있나요? |
Contributor
There was a problem hiding this comment.
Q. 앞서 진행한 메소드를 추출하는 방식으로의 개선에 어떤 문제가 있고 어떻게 개선할 수 있나요?
- 메서드 추출은 코드 중복을 줄이는데 도움이 되지만, SQL이 바뀌면 해당 메서드를 수정해야 하고 클래스 내부에 고정되어 있습니다. 전략 패턴을 사용하면 소스 변경 없이 조합만으로 확장할 수 있습니다.
| ## 질문 | ||
|
|
||
| - 앞서 진행한 메소드를 추출하는 방식으로의 개선에 어떤 문제가 있고 어떻게 개선할 수 있나요? | ||
| - '변하지 않는 부분'과 '변하는 부분'을 구별하여 전략 패턴을 적용해 '변하는 부분'을 분리해내는 작업의 장점은 무엇인가요? |
Contributor
There was a problem hiding this comment.
Q. '변하지 않는 부분'과 '변하는 부분'을 구별하여 전략 패턴을 적용해 '변하는 부분'을 분리해내는 작업의 장점은 무엇인가요?
- 변하는 부분을 분리해내면 전략을 선택하는 책임과 실행 책임이 분리되며, 소스코드 변경 없이 조합만으로 확장이 용이해집니다.
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.
closed #이슈
🙆🏻 내용을 이해하기 쉽고 정확하게 작성하였는가?
📚 글 하단에 예상질문, 참고자료를 포함시켰는가?
🔖 라벨은 등록했는가?
✅ 이슈는 닫았는가?