디자인 품질을 평가하는 방법으로 결합도와 응집력을 설명한다.
이 기사는 디자인의 품질을 평가하기 위해 결합도와 응집력 두 개념을 다룬다. 응집력은 모듈 내 책임이 얼마나 밀접하게 관련되어 있는지를 측정하며, 낮은 응집력은 복잡성과 위험을 증가시킨다. 반면, 높은 응집력은 각 클래스를 명확한 목적을 갖춘 단위로 분리하여 이해와 테스트를 용이하게 만든다. 예시로 OrderService의 구성 요소를 분리하여 더 나은 디자인을 제안한다.
The article discusses how to evaluate design quality using coupling and cohesion concepts.
This article addresses the concepts of coupling and cohesion as tools for evaluating design quality. Cohesion measures how closely related the responsibilities within a module are, where low cohesion leads to increased complexity and risk. Conversely, high cohesion allows for clearer responsibilities, making understanding and testing easier. The article provides examples of reorganizing an OrderService to demonstrate better design practices.