Skip to content

Conversation

@kyc3492
Copy link

@kyc3492 kyc3492 commented Jun 8, 2023

OCP 부분 번역 완료하여 PR 올립니다.
추가 개선사항 등 자유로운 피드백 부탁드립니다!! 😁

- [**Classes**](#classes)
- [**Single Responsibility Principle (SRP)**](#single-responsibility-principle-srp)
- [**Open/Closed Principle (OCP)**](#openclosed-principle-ocp)
- [**개방/폐쇄 원칙(Open/Closed Principle (OCP))**](#개방폐쇄-원칙openclosed-principle-ocp)
Copy link
Author

@kyc3492 kyc3492 Jun 8, 2023

Choose a reason for hiding this comment

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

SRP와 마찬가지로 통용된 한국어 원칙명을 적용했으며 영어 원문 명칭을 병기했습니다.
또한 통용되는 원칙명은 개방 폐쇄 원칙 이나 원문을 유지하고자 개방/폐쇄 원칙으로 작성했습니다.
너무 길어 번잡해보이진 않는지 다른 분들 의견 궁금합니다. 🤔

Choose a reason for hiding this comment

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

SRP와 마찬가지로 바람직해보입니닷! 👍👍👍

Choose a reason for hiding this comment

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

저도 좋아 보입니다!! 👍

class)
without changing its internal contracts. An object can enable this when it is
designed to be extended cleanly.
객체는 확장에는 개방적이어야 하지만 수정에는 폐쇄적이어야 합니다. 내부 계약의 변경 없이 객체(클래스 )에서 제공하는 기능을 활용해 확장이 가능해야 합니다. 객체가 깔끔하게 확장될 있도록 디자인되어야 이와 같은 방법이 가능해집니다.
Copy link
Author

Choose a reason for hiding this comment

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

해당 링크를 참조하여 계약이라는 단어를 그대로 활용하는 것을 참고하였고 본문에도 해당 단어를 사용했습니다.
다른 안이 있다면 자유롭게 코멘트 남겨주세요!

Mixins are bare-bones classes that are meant to be used exclusively with other
related classes. They are "mixed-in" with the target class using multiple
inheritance, in order to change the target's behaviour.
가지 규칙들이 있습니다.
Copy link
Author

Choose a reason for hiding this comment

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

다음과 같이이를 위해 처럼 매끄럽게 이어지게 할 수 있는 추가 단어를 붙일까요? 🤔

Choose a reason for hiding this comment

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

원문에서 명사형으로 사용되었으니,
몇 가지 규칙: 요렇게 하는 것도 방법이라 생각해요! 🤔

@kyc3492 kyc3492 self-assigned this Jun 8, 2023
@kyc3492 kyc3492 requested review from FacerAin and jinmyeongAN June 8, 2023 09:11
Copy link

@jinmyeongAN jinmyeongAN left a comment

Choose a reason for hiding this comment

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

고생 많으셨습니다! 리뷰하는데도 공부가 많이 되는 것 같아요 👍

method, which now needs to be frozen in time. We cannot introduce, for example,
some additional checks in all our `View`-derived classes because the behaviour
is overridden in at least one subtype and we will need to update it.
`TemplateView` 클래스는 많은 기능을 수행하기 위해 부모 클래스의 내부 동작을 수정했습니다. 이렇게 함으로써, 이제 일정 시간 정지해야하는 `.get()` 메서드의 구현을 변경하지 않기 위해 `View` 의존하게 됩니다. 예를 들어, `View` 파생 클래스들에 대한 가지 추가 검사를 도입하려할 , 적어도 하나의 하위 유형에 오버라이딩 되어있고 이를 업데이트해야 하기 때문에 불가능합니다.

Choose a reason for hiding this comment

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

수요일 회의 때 이야기 나눈 것처럼,

In doing so, it now relies on the View to not change the implementation of the .get() method, which now needs to be frozen in time.

이 부분의 내용 자체가 좀 어색해보입니다.
제 생각에는 다음과 같이 쓰여야 될 것 같습니다.

In doing so, it now doesn't rely on the `View` to change the implementation of the `.get()` method, which now needs to be frozen in time.

그리고 여기서 frozen의 의미는 부모 클래스의 메서드가 override 되지 않고, 유지되어야 한다 라는 의미로 쓰인 것 같습니다.

추후에 저자의 repo에 PR를 남겨놓는게 좋아보입니다.

composition is to
use [Mixins](https://docs.djangoproject.com/en/4.1/topics/class-based-views/mixins/)
.
Mixins는 다른 관련 클래스들과 독점적으로 사용되게끔 하게 해주는 베어본 클래스입니다. 대상의 동작을 변경하기 위해 다중상속을 활용하여 '혼합' 되어있습니다.

Choose a reason for hiding this comment

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

독자들이 bare-bones classes 라는 용어가 어떤 의미인지 잘 모를 수도 있을 것 같습니다.
참고할 만한 링크가 있으면 이해에 도움이 될 것 같습니다.

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.

4 participants