[김영수_Android] 13주차 과제 수정#88
Open
TTRR1007 wants to merge 3 commits intoBCSDLab-Edu:mainfrom
Hidden character warning
The head ref may contain hidden characters: "\uacfc\uc81c"
Open
Conversation
kongwoojin
reviewed
Jul 28, 2025
Contributor
kongwoojin
left a comment
There was a problem hiding this comment.
고생하셨습니다.
다만, 지금 구조 또한 클린 아키텍쳐가 지켜지지는 않았습니다.
먼저 UseCase에서 repository를 접근하는데, repository는 data 레이어에 있기 때문에, 접근 할 수 없는 것이 정상입니다.
이 때문에 원래는 interface 패턴을 사용합니다.
두번째로, UseCase에서 Word dto를 참고하고 있는데, 여기서 Word는 androidx.room에 의존성을 가지고 있습니다.
androidx.room은 안드로이드에 의존성을 가지는 라이브러리인 만큼, domain 레이어는 순수 Java/Kotlin 코드로 작성해야 한다는 원칙을 만족하지 못합니다. 이를 위해서 각 레이어별로 dto를 정의하고 mapper를 사용하는 방식으로 개발합니다.
세번째로, 일반적으로 Repository에서 데이터에 직접 접근하지 않고, DataSource를 구현해서 접근합니다.
마지막은 사소한건데, UseCase는 클래스 이름이 UseCase로 끝나는 것이 일반적입니다.
대부분의 문제가 모듈 분리가 이루어지지 않아서 발생한 만큼, 모듈 분리를 시도 해보시면 좋을 것 같습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
domain의 usecase에 단어 추가, 업데이트, 제거 기능을 추가 하여 수정 해 보았습니다.
혹시 해당 방식으로 구현하는게 맞을까요?