Open
Conversation
jusang3057
reviewed
Jul 29, 2025
| app:layout_constraintEnd_toEndOf="parent" /> | ||
|
|
||
| <Button | ||
| android:id="@+id/btnImage" |
| android:id="@+id/btnImage" | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:text="사진 선택" |
kongwoojin
reviewed
Jul 29, 2025
Contributor
kongwoojin
left a comment
There was a problem hiding this comment.
고생하셨습니다.
다만, 지금 구조 또한 클린 아키텍쳐가 지켜지지는 않았습니다.
먼저 UseCase가 없습니다. 클린 아키텍쳐에서는 UseCase를 거쳐서 data 레이어에 접근해야 합니다.
두번째로, domain에 Word dto가 선언되어 있는데, 여기서 Word는 androidx.room에 의존성을 가지고 있습니다.
androidx.room은 안드로이드에 의존성을 가지는 라이브러리인 만큼, domain 레이어는 순수 Java/Kotlin 코드로 작성해야 한다는 원칙을 만족하지 못합니다. 이를 위해서 각 레이어별로 dto를 정의하고 mapper를 사용하는 방식으로 개발합니다.
세번째로, 일반적으로 Repository에서 데이터에 직접 접근하지 않고, DataSource를 구현해서 접근합니다.
네번째로, Repository에서 변수를 선언해서 데이터를 받아오도록 하셨는데, 함수로 선언하셔야 합니다.
다섯번째로, ViewModel에서는 repository를 접근하면 안됩니다.
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.
No description provided.