Skip to content
Discussion options

You must be logged in to vote

제가 아는 가장 큰 이유는 아래와 같습니다

유틸리티 클래스는 static 으로 선언되니
모든 객체가 이에 대한 존재를 알고 있게 되며
이로 인해 캡슐화가 깨지게 된다

캡슐화가 깨지면서 객체지향이 깨지기에 객체지향과 거리가 멀다


그 외에도 생각해보면 상태를 가지지 않는다 가 있는 거 같아요
상태를 가지고 변화해야 살아있는 객체지, 상태가 없으면 객체라고 하기 어려울 거 같다고 생각해요


비즈니스 로직과 거리가 멀다 라는 생각도 드는데
비즈니스 로직을 처리하는 유틸리티 클래스를 만드는 게 좋은 경우도 있을까요?

이 부분에 대해서 어떻게 생각하시는지 궁금합니다

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@JHZLO
Comment options

JHZLO Jan 4, 2025
Maintainer Author

@digitpic
Comment options

Answer selected by JHZLO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
질문
Labels
None yet
2 participants