Skip to content

πŸš€ 4단계 - GitHub(인기 μ €μž₯μ†Œ) #73

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

Open
wants to merge 7 commits into
base: fbghgus123
Choose a base branch
from

Conversation

fbghgus123
Copy link

κ°œμš”

  • 인기 μ €μž₯μ†Œ κ΅¬ν˜„

μž‘μ—… λ‚΄μš©

  • 데이터 λ°›μ•„μ˜¬ λ•Œ Star μˆ˜λ„ λ°›μ•„ μ˜€λ„λ‘ μˆ˜μ •
  • domain νŒ¨ν‚€μ§€ 생성 ν›„ entity 이동 및 50개 νŒλ‹¨ 둜직 μΆ”κ°€
  • UiModel 생성 및 적용
  • Start 수 λ…ΈμΆœ 및 Hot ν‘œμ‹œ UI κ΅¬ν˜„

λ¦¬λ·°μ–΄λ‹˜μ—κ²Œ

μ•ˆλ…•ν•˜μ„Έμš” λ¦¬λ·°μ–΄λ‹˜.
리뷰 잘 λΆ€νƒλ“œλ¦½λ‹ˆλ‹€!

  • Star κ°œμˆ˜κ°€ 50개 이상인지 νŒλ‹¨ν•˜λŠ” 둜직이 domain의 UseCase둜 λ„£κ²Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€. Hot을 νŒλ‹¨ν•˜λŠ” λ‘œμ§μ€ μ„œλΉ„μŠ€ 정책상 κ²°μ •λœ κ²ƒμœΌλ‘œ λΉ„μ¦ˆλ‹ˆμŠ€ 둜직으둜 νŒλ‹¨ν•˜μ—¬ 도메인 λ ˆμ΄μ–΄μ— λ„£μ—ˆμŠ΅λ‹ˆλ‹€.
  • 도메인 λ ˆμ΄μ–΄κ°€ μΆ”κ°€ λ˜μ—ˆμŒμ—λ„ ViewModelμ—μ„œ data λ ˆμ΄μ–΄μ— ν¬ν•¨λœ repositoryλ₯Ό 직접 μ ‘κ·Όν•˜μ—¬ 데이터λ₯Ό κ°€μ§€κ³  μ˜€λŠ” 것을 μœ μ§€ν•˜μ˜€λŠ”λ°μš”, λ‹¨μˆœ 데이터λ₯Ό λ°”μ΄νŒ¨μ‹± ν•˜λŠ” UseCaseλ₯Ό μΆ”κ°€ν•˜λŠ” 것이 λΆˆν•„μš”ν•˜λ‹€κ³  νŒλ‹¨ν•˜μ˜€μŠ΅λ‹ˆλ‹€.

Copy link

@BeokBeok BeokBeok left a comment

Choose a reason for hiding this comment

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

이전 단계 ν”Όλ“œλ°±κ³Ό Github(인기 μ €μž₯μ†Œ) λ―Έμ…˜ν•˜μ‹œλŠλΌ κ³ μƒν•˜μ…¨μŠ΅λ‹ˆλ‹€. πŸ‘
κ³ λ―Όν•΄λ³Όλ§Œν•œ μ˜κ²¬λ“€μ„ μ½”λ§¨νŠΈλ‘œ μž‘μ„±ν•˜μ˜€μœΌλ‹ˆ, μΆ©λΆ„νžˆ κ³ λ―Όν•΄λ³΄μ‹œκ³  λ„μ „ν•΄λ³΄μ„Έμš”. πŸ’ͺ

Comment on lines 5 to 7
operator fun invoke(stars: Int): Boolean {
return stars >= 50
}

Choose a reason for hiding this comment

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

Star κ°œμˆ˜κ°€ 50개 이상인지 νŒλ‹¨ν•˜λŠ” 둜직이 domain의 UseCase둜 λ„£κ²Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€. Hot을 νŒλ‹¨ν•˜λŠ” λ‘œμ§μ€ μ„œλΉ„μŠ€ 정책상 κ²°μ •λœ κ²ƒμœΌλ‘œ λΉ„μ¦ˆλ‹ˆμŠ€ 둜직으둜 νŒλ‹¨ν•˜μ—¬ 도메인 λ ˆμ΄μ–΄μ— λ„£μ—ˆμŠ΅λ‹ˆλ‹€.

ν˜Έν˜„λ‹˜μ΄ μƒκ°ν•˜μ‹œλŠ” λΉ„μ¦ˆλ‹ˆμŠ€ 둜직과 UI λ‘œμ§μ€ μ–΄λ–€ 차이점이 μžˆλŠ” 것인지 κΆκΈˆν•©λ‹ˆλ‹€! πŸ€”
λ˜ν•œ UseCaseλž€ 무엇이라고 μƒκ°ν•˜μ‹œλŠ”μ§€λ„ κΆκΈˆν•©λ‹ˆλ‹€!
ν–‰μœ„μž(actor) μž…μž₯μ—μ„œ Hot μ—¬λΆ€λ₯Ό νŒλ‹¨ν•  수 μžˆλŠ”κ±΄κ°€μš”? πŸ€”

Copy link
Author

@fbghgus123 fbghgus123 Mar 23, 2025

Choose a reason for hiding this comment

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

ν˜Έν˜„λ‹˜μ΄ μƒκ°ν•˜μ‹œλŠ” λΉ„μ¦ˆλ‹ˆμŠ€ 둜직과 UI λ‘œμ§μ€ μ–΄λ–€ 차이점이 μžˆλŠ” 것인지 κΆκΈˆν•©λ‹ˆλ‹€! πŸ€”
λ˜ν•œ UseCaseλž€ 무엇이라고 μƒκ°ν•˜μ‹œλŠ”μ§€λ„ κΆκΈˆν•©λ‹ˆλ‹€!

λΉ„μ¦ˆλ‹ˆμŠ€ λ‘œμ§μ΄λΌλŠ” 것을 λŒ€κ°• μ•Œκ³  μžˆλ‹€κ°€ ν…μŠ€νŠΈλ‘œ κΊΌλ‚΄μ–΄ μ „λ‹¬ν•˜λ €λ‹ˆ λ§Žμ€ 생각이 λ“œλŠ”λ°μš”, κ΄‘λ²”μœ„ν•˜κ³  경계가 μ• λ§€ν•΄ λ³΄μ΄λŠ” λΉ„μ¦ˆλ‹ˆμŠ€ λ‘œμ§μ„ 뭐라 λ§ν•˜κΈ°κ°€ νž˜λ“  것 κ°™μŠ΅λ‹ˆλ‹€.

λ‹€λ§Œ μ•„ν‚€ν…μ²˜ κ΄€μ μ—μ„œ μ„€λͺ…ν•΄ 보자면 μ œκ°€ μƒκ°ν•˜λŠ” λΉ„μ¦ˆλ‹ˆμŠ€ λ‘œμ§μ΄λž€, UI ν˜Ήμ€ 데이터 λ ˆμ΄μ–΄μ— μƒκ΄€ν•˜μ§€ μ•Šκ³  μ•±μ˜ μš”κ΅¬μ‚¬ν•­μ„ λ§Œμ‘±μ‹œν‚€κΈ° μœ„ν•œ λ‘œμ§μž…λ‹ˆλ‹€. λ•Œλ¬Έμ— λ‹€λ₯Έ UI λ ˆμ΄μ–΄λ‚˜ 데이터 λ ˆμ΄μ–΄κ°€ λ‹€λ₯Έ κ²ƒμœΌλ‘œ κ΅μ²΄λ˜μ–΄λ„ μœ μ§€λ˜μ–΄μ•Ό ν•˜λŠ” λ‘œμ§μž…λ‹ˆλ‹€.

μœ μ¦ˆμΌ€μ΄μŠ€λŠ” μ΄λŸ¬ν•œ λ‘œμ§λ“€μ„ λ‹΄κ³  μžˆλŠ” ν–‰λ™μ˜ λ‹¨μœ„λΌκ³  μƒκ°ν•©λ‹ˆλ‹€.

UIλ‘œμ§μ€ λ‹¨μˆœν•˜κ²Œ 말 κ·ΈλŒ€λ‘œ UI에 λŒ€ν•΄μ„œλ§Œ 관심을 κ°–κ³  μžˆλŠ” 둜직이라고 μƒκ°ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

ν–‰μœ„μž(actor) μž…μž₯μ—μ„œ Hot μ—¬λΆ€λ₯Ό νŒλ‹¨ν•  수 μžˆλŠ”κ±΄κ°€μš”? πŸ€”

μ—¬κΈ°μ„œ λ§μ”€ν•˜μ‹œλŠ” ν–‰μœ„μžκ°€ UI라고 생각이 λ“œλŠ”λ°μš”, Hot μ—¬λΆ€λ₯Ό νŒλ‹¨ν•  수 μžˆλŠ”μ§€ μ—†λŠ”μ§€λŠ” UI와 도메인이 λ‚˜λˆ μ Έ μžˆλŠ” μ•„ν‚€ν…μ³μ—μ„œλŠ” UIκ°€ Hot μ—¬λΆ€λ₯Ό νŒλ‹¨ν•˜λŠ” λ‘œμ§μ„ κ°€μ§€λ©΄ μ•ˆλœλ‹€κ³  생각이 λ“­λ‹ˆλ‹€.

@@ -159,12 +165,25 @@ private fun RepositoryListEmptyScreenPreview() {
}
}

@SuppressLint("CoroutineCreationDuringComposition")

Choose a reason for hiding this comment

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

CoroutineCreationDuringCompositionκ°€ μ™œ λ°œμƒν•˜λŠ” κ±΄κ°€μš”?
CoroutineCreationDuringComposition이 λ°œμƒν•˜μ§€ μ•Šλ„λ‘ κ°œμ„ ν•΄λ³΄λ©΄ μ–΄λ–¨κΉŒμš”?

Copy link
Author

Choose a reason for hiding this comment

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

Composable이 λ¦¬μ»΄ν¬μ§€μ…˜ 될 λ•Œ λ§ˆλ‹€ 코루틴이 싀행될 수 μžˆμŒμ„ λ‚˜νƒ€λ‚΄λŠ” κ²½κ³  κ°™μŠ΅λ‹ˆλ‹€ ... !
μˆ˜μ •ν•˜κ² μŠ΅λ‹ˆλ‹€.

val fullName: String,
val description: String,
val stars: Int,
val isHot: Boolean,

Choose a reason for hiding this comment

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

Star κ°œμˆ˜κ°€ 50개 이상인지 νŒλ‹¨ν•˜λŠ” 둜직이 domain의 UseCase둜 λ„£κ²Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€. Hot을 νŒλ‹¨ν•˜λŠ” λ‘œμ§μ€ μ„œλΉ„μŠ€ 정책상 κ²°μ •λœ κ²ƒμœΌλ‘œ λΉ„μ¦ˆλ‹ˆμŠ€ 둜직으둜 νŒλ‹¨ν•˜μ—¬ 도메인 λ ˆμ΄μ–΄μ— λ„£μ—ˆμŠ΅λ‹ˆλ‹€.

isHot을 μœ„ν•΄ RepositoryUiModel을 λ§Œλ“€μ–΄μ£Όμ‹  κ²ƒμœΌλ‘œ λ³΄μž…λ‹ˆλ‹€.
ν˜Έν˜„λ‹˜ 말씀에 μ˜ν•˜λ©΄, Star 개수λ₯Ό νŒλ‹¨ν•˜λŠ” λ‘œμ§μ€ domain에 μžˆμ–΄μ•Όν•˜λŠ” κ²ƒμœΌλ‘œ 이해λ₯Ό ν–ˆλŠ”λ°μš”.
κ·Έλ ‡λ‹€λ©΄ isHot에 λŒ€ν•œ μ •λ³΄λŠ” RepositoryUiModel이 μ•„λ‹Œ Repository에 μžˆμ–΄μ•Ό ν•˜μ§€ μ•Šμ„κΉŒμš”? πŸ€”

Copy link
Author

Choose a reason for hiding this comment

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

isHot을 λΆˆλŸ¬μ˜€λŠ” λ‘œμ§μ€ UI에 μžˆμ–΄μ•Ό ν•˜λŠ”κ±° μ•„λ‹Œκ°€? λΌλŠ” 생각이 λ“€μ–΄μ„œ ViewModel에 μž‘μ„± ν–ˆμ—ˆλŠ”λ°μš”,
λ¦¬λ·°μ–΄λ‹˜ 말씀을 보고 λ‹€μ‹œ 생각 ν•΄λ³΄λ‹ˆ UI λ ˆμ΄μ–΄μ—μ„œ isHot을 λ”°λ‘œ ν˜ΈμΆœν•˜λŠ” 것 μžμ²΄κ°€ λΉ„μ¦ˆλ‹ˆμŠ€ λ‘œμ§μ„ ν¬ν•¨ν•˜κ³  μžˆλ‹€λŠ” 생각이 λ“œλ„€μš” ...
Repository에 isHot을 λ“€κ³  같이 μ˜€λŠ” 게 λ§žλŠ” 것 κ°™μŠ΅λ‹ˆλ‹€...!

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