-
Notifications
You must be signed in to change notification settings - Fork 22
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
6주차 미션/ 서버 4조 조동현 (SOLID ISP원칙 적용하여 살짝 다르게 작성) #41
Open
mr8356
wants to merge
30
commits into
Konkuk-KUIT:main
Choose a base branch
from
mr8356:mr83563
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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.
(일요일 밤에 강의 보고 바로 제출 낭만 있네요)
메서드 체이닝 부분 많이 얻어갑니다!!
AbstractController를 이용해서 구현하는것이 요구사항이었는데요.
Controller 마다 json, jsp 둘중 하나만 반환하는데 jsonView, jspView메서드 둘다 있는 인터페이스를 상속받으면
둘중 하나는 구현을 안하게 되고, 객체 지향 SOLID의 ISP(Interface Segregation Principle) 인터페이스 분리 원칙에 어긋난다고 생각했습니다.
이용하지 않는 메서드가 있으면 그 메서드 기준으로 분리하는것이 ISP 원칙이기 때문에
소신있게 AbstractController 인터페이스를 Jsp, Json Controller 인터페이스로 더 쪼개서 작성했습니다.
(물론 기존 요구사항대로도 할줄도 압니다!)
아래와 같이 분리한 후에
일단 형식 상으로 AbstractController를 두 인터페이스의 상속체로 형식상으로 두었습니다.
jwp-controller 패키지 들어가시면 제가 어떻게 했는지 나옵니다!
리뷰, 의견 받습니다
맘껏 비판해주세요!