Skip to content

Conversation

@yeran27
Copy link

@yeran27 yeran27 commented Dec 29, 2025

No description provided.

Copy link

@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.

고생하셨습니다!
전에 비해서 확실히 실력이 느신게 보이네요

몇가지 피드백을 드리자면

  1. 현재 구조는 클린 아키텍처를 따른다고 보기는 어렵습니다. 클린 아키텍처는 domain layer가 필수지만, 현재 구조상 data 와 presentation 레이어만 존재하고, Repository와 Usecase, DataSource도 없네요.
  2. 의존성 주입을 사용하는 것이 좋습니다. AndroidViewModel을 사용하신 이유가 Room에 context를 주입하기 위해서일텐데, AndroidViewModel은 사용을 지양하는 것이 맞고, 결국 의존성 주입을 사용하면 해결이 가능합니다.
  3. 이건 팁인데, 사람들이 클린 아키텍처랑 앱 아키텍처에 대해 많이 헷갈려합니다. 이것도 한번 어떤 차이점이 있는지 알아보시면 좋을 것 같아요.

Comment on lines +22 to +23
viewBinding = true
dataBinding = true

Choose a reason for hiding this comment

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

여기서 질문! viewBinding과 dataBinding은 무슨 차이일까요?

suspend fun delete(word: WordEntity)

@Query("SELECT * FROM word_table")
fun getAll(): LiveData<List<WordEntity>>

Choose a reason for hiding this comment

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

LiveData는 안드로이드 생명주기를 인식하고 있는 클래스입니다.
따라서, 안드로이드 생명주기 밖에서 동작하는 data layer에서 사용하기는 부적절해보입니다.

Comment on lines +60 to +64
intent.putExtra(EXTRA_WORD_ID, word.id)
intent.putExtra(EXTRA_WORD, word.word)
intent.putExtra(EXTRA_MEANING, word.meaning)
intent.putExtra(EXTRA_IMAGE_PATH, word.imagePath)
startActivity(intent)

Choose a reason for hiding this comment

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

Bundle을 사용하지 않은 이유가 있을까요?

private lateinit var wordViewModel: WordViewModel
private var wordId: Int? = null
private var selectedImageUri: Uri? = null
lateinit var pickImage: ActivityResultLauncher<String>

Choose a reason for hiding this comment

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

private 처리해주세요


if (wordId != null && wordId != -1) {
val wordEntity = WordEntity(
id = wordId!!,

Choose a reason for hiding this comment

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

wordId != null이 선언되었으니 타입 추론이 되지 않나요?

import data.WordEntity
import kotlinx.coroutines.launch

class WordViewModel(application: Application) : AndroidViewModel(application) {

Choose a reason for hiding this comment

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

AndroidViewModel를 사용하신 이유가 있을까요?

androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "roomCommonJvm" }
androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "roomCommonJvm" }
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "roomCommonJvm" }
coil = { module = "io.coil-kt:coil", version.ref = "coil" }

Choose a reason for hiding this comment

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

오호 Glide 대신 Coil을 사용하신 이유가 무엇인가요?

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.

2 participants