-
Notifications
You must be signed in to change notification settings - Fork 20
[김건우] week3 - 요구사항 개발 완료 / 1차 QA / 서버 사이드 렌더링 고민 #231
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
Open
coli-geonwoo
wants to merge
34
commits into
softeerbootcamp-7th:coli-geonwoo
Choose a base branch
from
coli-geonwoo:week3/thur
base: coli-geonwoo
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.
Open
[김건우] week3 - 요구사항 개발 완료 / 1차 QA / 서버 사이드 렌더링 고민 #231
coli-geonwoo
wants to merge
34
commits into
softeerbootcamp-7th:coli-geonwoo
from
coli-geonwoo:week3/thur
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.
완료한 태스크
고민한 부분
좋아요를 어디에 어떻게 저장해야 하는가?
articleId PK Generation Strategy에 귀속되지 않는 고민
현재는 Article 생성시 반환되는 (articleId)를 기반으로 GET /article/id?artilceId=artilceId로 최신 기준 offset을 알아낸 후, GET /main?offset={offset} 을 호출하여 댓글 작성 과정에서 다른 게시글이 추가되어 offset이 변화하더라도 원래 보던 article로 정확하게 리다이렉션해줌.
그러나, offset 호출 > 리다이렉션 사이에 다른 사용자가 새로운 게시글이 추가되면 offset이 밀려 같은 article을 보지못하는 케이스 발생 가능성이 있음
해당 경우를 대비하기 위해 Article Auto Increment의 속성을 활용하여 Id 값 기반 리다이렉션을 고려해볼 수 있으나, 이러한 API 설계는 엔티티 설계 구조를 API가 종속시켜버리는 느낌이라 망설여짐. 또한 delete 기능이 들어오면 이전, 다음 글 호출 시 id-1, id+1에 해당하는 삭제된 article을 조회할 가능성이 있음
서버 사이드 렌더링 고민
미션 수행 과정에서 일정에 쫓겨 서버 사이드 렌더링이 아닌 클라이언트 사이드 렌더링을 선택함. 즉 서버에서는 json만 반환하고 프론트 코드에서 해당 응답값을 받아 동적 렌더링을 진행함. 그러나, 엄밀한 의미에서 WebServer 구현 미션을 생각해본다면 동적 렌더링 요소까지 서버가 책임지는 것이 바람직하며 미션 의도에 부합하다고 판단함. ThymeLeaf 기능을 얼마나 서버 쪽으로 이전시킬 것인지에 대한 고민이 필요