- Notifications
You must be signed in to change notification settings - Fork0
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
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| - [**Classes**](#classes) | ||
| - [**SingleResponsibilityPrinciple (SRP)**](#single-responsibility-principle-srp) | ||
| - [**Open/ClosedPrinciple (OCP)**](#openclosed-principle-ocp) | ||
| - [**개방/폐쇄원칙(Open/ClosedPrinciple (OCP))**](#개방폐쇄-원칙openclosed-principle-ocp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
SRP와 마찬가지로 통용된 한국어 원칙명을 적용했으며 영어 원문 명칭을 병기했습니다.
또한 통용되는 원칙명은개방 폐쇄 원칙 이나 원문을 유지하고자개방/폐쇄 원칙으로 작성했습니다.
너무 길어 번잡해보이진 않는지 다른 분들 의견 궁금합니다. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
SRP와 마찬가지로 바람직해보입니닷! 👍👍👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
저도 좋아 보입니다!! 👍
| class) | ||
| withoutchangingitsinternalcontracts.Anobjectcanenablethiswhenitis | ||
| designedtobeextendedcleanly. | ||
| 객체는확장에는개방적이어야하지만수정에는폐쇄적이어야합니다.내부계약의변경없이객체(클래스등)에서제공하는기능을활용해확장이가능해야합니다.객체가깔끔하게확장될수있도록디자인되어야이와같은방법이가능해집니다. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
해당 링크를 참조하여계약이라는 단어를 그대로 활용하는 것을 참고하였고 본문에도 해당 단어를 사용했습니다.
다른 안이 있다면 자유롭게 코멘트 남겨주세요!
| Mixinsarebare-bonesclassesthataremeanttobeusedexclusivelywithother | ||
| relatedclasses.Theyare"mixed-in"withthetargetclassusingmultiple | ||
| inheritance,inordertochangethetarget'sbehaviour. | ||
| 몇가지규칙들이있습니다. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
다음과 같이나이를 위해 처럼 매끄럽게 이어지게 할 수 있는 추가 단어를 붙일까요? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
원문에서 명사형으로 사용되었으니,몇 가지 규칙: 요렇게 하는 것도 방법이라 생각해요! 🤔
jinmyeongAN left a comment
There was a problem hiding this 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`의파생클래스들에대한몇가지추가검사를도입하려할때,적어도하나의하위유형에오버라이딩되어있고이를업데이트해야하기때문에불가능합니다. |
There was a problem hiding this comment.
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
Viewto 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를 남겨놓는게 좋아보입니다.
| compositionisto | ||
| use [Mixins](https://docs.djangoproject.com/en/4.1/topics/class-based-views/mixins/) | ||
| . | ||
| Mixins는다른관련클래스들과독점적으로사용되게끔하게해주는베어본클래스입니다.대상의동작을변경하기위해다중상속을활용하여'혼합'되어있습니다. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
독자들이bare-bones classes 라는 용어가 어떤 의미인지 잘 모를 수도 있을 것 같습니다.
참고할 만한 링크가 있으면 이해에 도움이 될 것 같습니다.
OCP 부분 번역 완료하여 PR 올립니다.
추가 개선사항 등 자유로운 피드백 부탁드립니다!! 😁