도메인
영어 | 한글 |
bookmark | 북마크 |
user | 사용자 |
profile | 프로필 |
linkmetadata | 링크 메타데이터 |
notification | 알림 |
tag | 태그 |
follow | 팔로우 |
favorite | 즐겨찾기 |
비즈니스 용어
- 컨트롤러, 서비스 계층 에서 활용
영어 | 한글 | 컨트롤러 메서드 사용 예 |
register | 등록 | registerBookmark , registerProfile |
getXXXs | 목록 조회 | getMyBookmarks , getAllCetegories , getProfiles |
getDetailed | 상세 조회 | getDetailedBookmark , getDetailedProfile |
update | 수정 | updateBookmark , updateProfile |
remove | 삭제 | removeBookmark |
follow/unfollow | 팔로우/언팔로우 | follow /unfollow |
favorite/unfavorite | 즐겨찾기/ 즐겨찾기 취소 | favorite /unfavorite |
login/loginSuccess | 로그인/로그인 성공 | login /loginSuccess |
share | 공유 | shareNotification |
obtain | 얻기 | getOrSaveLinkmetadataTitle |
영송성 계층의 용어
영어 | 한글 | 리포지토리 메서드 사용 예 |
find | 조회 | findByProfile_idAndBookmark |
save | 저장 | save |
update | 수정 | update |
delete | 삭제 | deleteByProfileAndBookmarkAndType |
exists | 존재 확인 | existsByOwner_idAndBookmark |
count | 카운트 조회 | countReactionGroup |
@Query
- 영속성 계층에서 리포지토리를 사용하여 단순한 조회로직을 담당하는 컴포넌트를 'Query' 라고 지정한다.
- 리포지토리를 사용한 조회가 상대적으로 단순하지만 재활용이 많이 되는 경우 Query 를 활용한다
- Find,Check + [도메인] + [Query]
- e.g.
FindBookmarkByIdQuery
,CheckIsFollowQuery
- 리포지토리를 사용한 조회가 복잡하여 로직을 분리 시키는 것이 적절하다고 생각될때 Query 를 활용한다.
- [도메인] + [Query]
- e.g.) ,
ReactionQuery
DTO
컨트롤러 계층
요청(Request)
[비즈니스 용어] + [도메인] + [Request]
- 비즈니스 용어, 도메인 만으로 구분되지 않는 경우
컨트롤러 메서드 이름 + [Request]
응답(Response)
[도메인] + [Response]
- 도메인 만으로 응답이 구분되지 않는경우
컨트롤러 메서드 이름 + [Response]
서비스 계층
명령 (Command)
[비즈니스 용어] + [도메인] + [Command]
- 데이터의 변경을 요구하는 경우 사용
결과 (Result)
[비즈니스 용어] + [도메인] + [Result]
- 조회성 요청에 대한 응답으로 사용한다
영속성 계층
조건 (Cond - Condition)
- 조회의 필터링 조건
- 서비스 계층에서도 활용가능 하다
- e.g.)
BookmarkFindCond
,ProfileFindCond
페이저블 (pageable)
- Spring 의
PageRequest
사용
- 컨트롤러 계층에서도 활용 가능 하다
페이지 (Page)
- Spring 의 PageImpl 사용
- 서비스 계층에서도 활용 가능 하다