Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feat/ocp#13

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
kyc3492 wants to merge3 commits intomaster
base:master
Choose a base branch
Loading
fromfeat/OCP
Open

Feat/ocp#13

kyc3492 wants to merge3 commits intomasterfromfeat/OCP

Conversation

@kyc3492
Copy link

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

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

@kyc3492kyc3492Jun 8, 2023
edited
Loading

Choose a reason for hiding this comment

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

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

jinmyeongAN reacted with thumbs up emoji

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)
withoutchangingitsinternalcontracts.Anobjectcanenablethiswhenitis
designedtobeextendedcleanly.
객체는확장에는개방적이어야하지만수정에는폐쇄적이어야합니다.내부계약의변경없이객체(클래스)에서제공하는기능을활용해확장이가능해야합니다.객체가깔끔하게확장될있도록디자인되어야이와같은방법이가능해집니다.
Copy link
Author

Choose a reason for hiding this comment

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

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

jinmyeongAN and FacerAin reacted with eyes emoji
Mixinsarebare-bonesclassesthataremeanttobeusedexclusivelywithother
relatedclasses.Theyare"mixed-in"withthetargetclassusingmultiple
inheritance,inordertochangethetarget'sbehaviour.
가지규칙들이있습니다.
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.

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

@kyc3492kyc3492 self-assigned thisJun 8, 2023
Copy link

@jinmyeongANjinmyeongAN left a comment

Choose a reason for hiding this comment

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

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

method,whichnowneedstobefrozenintime.Wecannotintroduce,forexample,
someadditionalchecksinallour`View`-derivedclassesbecausethebehaviour
isoverriddeninatleastonesubtypeandwewillneedtoupdateit.
`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 theView 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를 남겨놓는게 좋아보입니다.

kyc3492 reacted with eyes emoji
compositionisto
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 라는 용어가 어떤 의미인지 잘 모를 수도 있을 것 같습니다.
참고할 만한 링크가 있으면 이해에 도움이 될 것 같습니다.

kyc3492 reacted with eyes emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@jinmyeongANjinmyeongANjinmyeongAN left review comments

@FacerAinFacerAinAwaiting requested review from FacerAin

Assignees

@kyc3492kyc3492

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@kyc3492@FacerAin@jinmyeongAN

[8]ページ先頭

©2009-2025 Movatter.jp