-
Notifications
You must be signed in to change notification settings - Fork 0
Coding Convention
Sim-km edited this page Apr 5, 2024
·
6 revisions
.
├── Api-Module # 스프링 실행과 presentation, application 계층을 담당하는 모듈
├── Common-Module
├── Domain-Module # 도메인들을 포함하는 모듈
└── Infra-Module # 외부 데이터베이스 연결, API 호출을 담당하는 모듈
.
└── Api-Module/
└── src/
└── main/
└── kotlin/
└── com/
└── pawith/
├── global
└── domain/
├── user/
│ ├── presentation
│ └── application
└── todo/
├── presentation
└── application
.
└── com/
└── pawith/
└── domain/
├── repository
├── service
├── exception
├── Util.class
├── Domain.class
└── ...
.
└── com/
└── pawith/
├── mapper
├── jpa/
│ ├── entity
│ └── repository
├── DomainRepositoryImpl.class
└── ...
- Domain이름 + Controller
ex) UserController
- Domain이름 + (자원) + 행위 + Service
ex ) UserInfoGetService, UserNicknameUpdateService, UserDeleteService
-
행위 네이밍
- 조회 : Get
- 수정 : Update
- 생성 : Create
- 삭제 : Delete
...
- 도메인 + 행위에 대한 역할(er)
ex ) UserReader, UserModifier, UserAppender
-
행위에 대한 역할
- 조회 : Reader
- 수정 : Modifier
- 생성 : Appender
- 삭제 : Remover
...
- http method + domain 이름 + (자원)
ex) getTodo, getTodoPregress, postTodo
- 조회 : get + Domain이름 + (자원)
- 수정 : update + Domain이름 + (자원)
- 삭제 : delete + Domain이름 + (자원)
- 생성 : create + Domain이름 + (자원)
ex ) getUserInfo()
- 조회 : read + Domain이름 + (자원)
- 수정 : modify + Domain이름 + (자원)
- 삭제 : remove + Domain이름 + (자원)
- 생성 : append + Domain이름 + (자원)
ex ) readUser(), modifyUserNickname()
- 도메인 + Mapper
- 도메인 + PersistenceMapper