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

[1주차] 2장. 의존성 역전하기_공은미 #12

Closed
eunmik opened this issue Feb 14, 2022 · 1 comment
Closed

[1주차] 2장. 의존성 역전하기_공은미 #12

eunmik opened this issue Feb 14, 2022 · 1 comment

Comments

@eunmik
Copy link

eunmik commented Feb 14, 2022

질문

  • SOLID 원칙이란?
  • 인자가 없는 기본 생성자를 추가하도록 강제하는 게 왜 결합의 예일까?
@eunmik
Copy link
Author

eunmik commented Feb 16, 2022

  • S : Single Responsibility Principle (단일 책임 원칙)

  • O : Open/closed Principle (개방-폐쇄 원칙)

  • L : Liskov Substitution Principle (리스코프 치환 원칙)

  • I : Interface Segregation Principle (인터페이스 분리 원칙)

  • D : Dependency Inversion Principle (의존관계 역전 원칙)

  • 예를 들어 JPA를 사용하는 경우 Entity에 기본생성자를 필요가 없더라도 추가해야 하거나 JPA에 의해 추가가 된다. 즉, 이말은 우리가 필요가 없음애도 불구하고 외부 프레임워크/라이브러리의 필요로 인해 기본 생성자를 추가하게 된다는 것은 외부 어댑터와 코드와의 결합이 높다고 볼수 있기 때문이다.

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

No branches or pull requests

2 participants