-
Notifications
You must be signed in to change notification settings - Fork 12
[김영찬_Android] 13주차 과제 제출 #89
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
jusang3057
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.
수고하셨습니다 👍
| app:layout_constraintEnd_toEndOf="parent" /> | ||
|
|
||
| <Button | ||
| android:id="@+id/btnImage" |
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.
네이밍 컨벤션 주의해주세요
| android:id="@+id/btnImage" | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:text="사진 선택" |
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.
다른곳은 다 @string썼는데 여기만 빠트렸어요
kongwoojin
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.
고생하셨습니다.
다만, 지금 구조 또한 클린 아키텍쳐가 지켜지지는 않았습니다.
먼저 UseCase가 없습니다. 클린 아키텍쳐에서는 UseCase를 거쳐서 data 레이어에 접근해야 합니다.
두번째로, domain에 Word dto가 선언되어 있는데, 여기서 Word는 androidx.room에 의존성을 가지고 있습니다.
androidx.room은 안드로이드에 의존성을 가지는 라이브러리인 만큼, domain 레이어는 순수 Java/Kotlin 코드로 작성해야 한다는 원칙을 만족하지 못합니다. 이를 위해서 각 레이어별로 dto를 정의하고 mapper를 사용하는 방식으로 개발합니다.
세번째로, 일반적으로 Repository에서 데이터에 직접 접근하지 않고, DataSource를 구현해서 접근합니다.
네번째로, Repository에서 변수를 선언해서 데이터를 받아오도록 하셨는데, 함수로 선언하셔야 합니다.
다섯번째로, ViewModel에서는 repository를 접근하면 안됩니다.
No description provided.