-
Notifications
You must be signed in to change notification settings - Fork 2
BE Code Conventions
-
As code get complicated, documentation is need for the better development environment
-
To understand a function, a developer needs to read the every lines of function to guess what it does.
"Code is more often read than written"
- Guido van Rossum
-
-
Variable, Function -
camelCase: starts with a lowercase letter, words separated by uppercase first letter of the next word- e.g.
userName,createAt - e.g.
getUser(),saveUser()
- e.g.
-
Class -
PascalCase: starts with an uppercase letter, words separated by uppercase first letter of the next word- e.g.
UserController,GetUserBean
- e.g.
-
url -
kebab-case: words separated by hyphen(-) with all letters lowercase- e.g.
post-heart,create-at
- e.g.
-
feat: 새로운 기능 추가- ex) feat: 공지 조회 api 추가
-
fix: 버그 수정- ex) fix: 공지 조회 api 정렬 버그 수정
-
docs: 문서 수정- ex) docs: readme 문서 작성
-
style: 코드의 수정은 없지만 문법 및 변경사항 수정- ex) style: for each 문 stream()으로 변경
-
refactor: 코드 리펙토링- ex) refactor: 공지 조회 공통 기능 small Bean으로 모듈화
- 'rename`: 파일명 폴더명 수정
- ex) rename: GetNotificationDAOsBean -> GetNotificationDAOBean
-
remove: 파일 삭제- ex) remove: GetNotificationDAOsBean 삭제
-
comment: 주석 추가 및 변경- ex) comment: 공지 조회 기능 관련 주석 추가
-
test: 테스트코드 추가 및 변경- ex) test: GetNotificationDAOBean 테스트 코드 작성
-
If you need to add or modify a new code such as modification or function addition, create a
branchand make apull request. In thepull request, the reviewer is always @seeungmin -
When requesting
Pull reqeust, write markdown according to the template form.
## Docs
- [Issue Link]()
## Changes
- before :
- after :
- images
## Review Points
#### Problem
#### Solution
## Test Checklist
- [ ] check 1
- [ ] check 2-
If there are issues, manage comments through numbering.
-
Manage other issues by writing additional comments.
-
Commit Convention Issue
-
Indentation Issue
-
Comment Issue
-
Class Naming Issue
-
Variable Naming Issue
-
Code Separation Issue
- check
- get
- save
- update
- delete
- NotificationDAO
- ResponseDTO
- Used for GET requests
- Format: Response(DAOName)GetDTO
- RequestDTO
- Used for other requests
- Format: Request(DAOName)(MethodName)DTO
- For additional cases, provide feedback as they arise.
- Use overloading to differentiate methods.
- Bean Naming Conventions:
- GetNotificationBean
- GetNotificationsBean
- Small Bean Naming Conventions:
- GetNotificationDAOBean
- CreateNotificationDTOBean
- CreateNotificationDAOBean
- NotificationRepositoryJPA