Skip to content

Conversation

Sangjin0702
Copy link

No description provided.

Copy link

@KYM-P KYM-P left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

Copy link
Contributor

@kongwoojin kongwoojin left a 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에서 변수를 선언해서 데이터를 받아오도록 하셨는데, 함수로 선언하셔야 합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants