Skip to content
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

4장 유스케이스 구현하기 #6

Open
wants to merge 2 commits into
base: mychum1
Choose a base branch
from

Conversation

mychum1
Copy link

@mychum1 mychum1 commented Jan 9, 2022

클린 아키텍쳐 4장

1. final 로 불변 필드로 지정해서 생성 이후 변경할 수 없다는 것을 보장한다.
2. 유스케이스 API 일부이기 때문에 incoming 포트 패키지에 위치한다.
3. @NotNull 과 같이 Bean Validation API 를 사용하면 유효성을 쉽게 체크할 수 있다.
4. SelfValidating 추상 클래스를 확장해서 어노테이션 외에 유효성 검증을 체크한다. 이는 계층형의 계층이 아니라 유스케이스의 보호막 계층이다.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SelfValidating 추상 클래스를 확장한건 아니고, 추상 클래스를 상속받고, 부모클래스의 validateSelf()메서드만 사용하더라구요.

추상클래스로 만든건 단순 인스턴스화 못하게 하기위해서 제약을 둔거 같은데, 좋은 방법 일까여??


## 유지보수 가능한 소프트웨어를 만드는 데 어떻게 도움이 될까?

입출력 모델을 독립적으로 모델링해서 원치 않는 부수효과를 피할 수 있다.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

우리 어드민 비즈니스들이 입력 모델 분리가 필요를 많이 느낌 ㅠㅠ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants