Skip to content

Conversation

@sujin9
Copy link

@sujin9 sujin9 commented May 22, 2023

안녕하세요, 토리!
주말동안 잘 지내셨나요? 😄

우선 1, 2단계 때 주신 피드백들에 매우 감사드려요 :)
피드백들 반영하고 3, 4단계 미션도 열심히 해보았습니다!
다만, 테코톡 등 다른 일들과 병행하여 진행하게 되면서 모든 시간을 투자하지 못했고
그에 따라 일부 기능 구현이 미완성된 상태입니다 ㅠㅠ
하지만 우선 리뷰를 받고 싶어서 현재까지의 구현들에 대해 PR을 보냅니다..!
남은 기능들에 대해서는 다음 피드백 반영하는 것과 함께 제출할 수 있도록 할게요!

이번 3, 4 단계에서도 성능과 구조적인 부분에 대한 고민을 하면서 진행한 것 같습니다.
view에 관련해서는 재사용 (특히 리사이클러뷰와 관련하여) 측면에서 잘 이루어지고 있는지가 주된 고민이었고,
리사이클러뷰와 관련하여 어댑터, 뷰 홀더가 적절한 역할을 수행하여 잘 진행이 되고 있는지가 궁금해요.

또한, 데이터베이스에 접근하는 과정을 최소화하기 위해 로컬 저장을 이용하려고 했는데,
어떤 시점에서 로컬 저장을 활용하고, 어떤 시점에서 db와 동기화를 하는지, 와 같은 부분들이 혼란스러웠어요.
매번 db에서 쿼리문을 실행하고, 혹은 db에서 모든 아이템을 가져오는 로직을 실행하는 것이 성능적으로 부담이 적지 않을 것 같은데,
그렇다면 미리 아이템을 로컬에 저장해두고 계속해서 사용하면 좋지 않을까? 하는 고민이 들었거든요.
이런 경우에, 어떤 식으로 플로우가 많이 이뤄지는지, 어떠한 trade-off가 있을지 토리의 의견이 궁금해요!

그 외에도 이번에도 미션과 관련하여 다른 피드백들이 있으시다면 많이 알려주세요! 잘 부탁드립니다!! 🌸

sujin9 added 18 commits May 18, 2023 13:30
- 가격 관련 포맷팅 간단하게 수정
- 삭제, 수량 변경 시에도 가격이 업데이트된다
- 아이템을 삭제했을 때 하단 페이지 버튼의 업데이트가 제대로 이루어지도록 수정
- db 테이블 수정
- repository 수정
- presenter 테스트 수정
Copy link

@galcyurio galcyurio left a comment

Choose a reason for hiding this comment

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

미션 진행하느라 고생하셨습니다. 👏👏
모든 요구사항이 충족된게 아니라서 질문주신 부분들과 MVP 패턴을 위주로 피드백을 남겼습니다.
이번 미션 끝까지 힘내세요! 화이팅!

@sujin9
Copy link
Author

sujin9 commented Jun 7, 2023

안녕하세요 토리!
지난 주에 캠퍼스에서 뵈어 반가웠어요 😆
휴가는 잘 보내셨나요? ;)

다른 미션 진행에 바빠 피드백 반영이 늦어졌네요 ㅠㅠ
피드백도 반영하고, 구현하지 못했던 기능들도 함께 구현했어요!

다만, 커밋 refactor: BindingAdapter 적용 이후로 3개의 커밋을 더 보냈었는데,
제 레포지토리의 step3 브랜치에는 반영되어있는데 어찌 된 일인지 이 PR의 추가 커밋 내역에는 제 깃허브에서는 보이지가 않네요 😢

마지막 피드백도 잘 부탁드려요 🌸

Copy link

@galcyurio galcyurio left a comment

Choose a reason for hiding this comment

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

마지막까지 고생하셨습니다. 👏👏
추가로 몇 가지 코멘트를 남겨두었으니 확인해주세요!
반영할 피드백이 많지 않아서 이번 미션은 여기서 마무리하겠습니다.
방학 잘 보내시길 바랄게요!

Comment on lines +46 to +76
@Test
fun__실행__전체_상품_리사이클러뷰가_보인다() {
해당_항목이_보인다(R.id.rv_main_product)
}

@Test
fun__실행__최근__상품_리사이클러뷰가_보이지_않는다() {
해당_항목이_보이지_않는다(R.id.rv_recently_viewed)
}

@Test
fun__실행__상품__개를_보면_최근__상품_리사이클러뷰가_보인다() {
해당_항목이_보이지_않는다(R.id.rv_recently_viewed)

상품_리스트의_해당_아이템을_클릭하면(1)
상세_페이지에서_뒤로가기를_누르면()

해당_항목이_보인다(R.id.rv_recently_viewed)
}

@Test
fun 상품_목록_스크롤을_올리면_최근__상품_리사이클러뷰가_보이지_않는다() {
상품_리스트의_해당_아이템을_클릭하면(1)
상세_페이지에서_뒤로가기를_누르면()

해당_항목이_보인다(R.id.rv_recently_viewed)

화면의_스크롤을_내리면()

해당_항목이_보이지_않는다(R.id.rv_recently_viewed)
}

Choose a reason for hiding this comment

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

모든 동작을 한글로 된 함수로 만들어주셔서 가독성이 엄청 좋네요 👍️

Comment on lines +6 to +9
override fun onPlusCountButtonClick(productId: Long, oldCount: Int)
override fun onMinusCountButtonClick(productId: Long, oldCount: Int)
fun onCloseButtonClick(productId: Long)
fun onCheckboxClick(isChecked: Boolean, item: CartUIState)

Choose a reason for hiding this comment

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

여러 콜백을 하나로 잘 묶어주셨네요 👍️

Comment on lines +6 to +9
import com.bumptech.glide.load.engine.DiskCacheStrategy
import woowacourse.shopping.R

@BindingAdapter("ImageBinding")

Choose a reason for hiding this comment

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

안드로이드의 기본 속성을 그대로 사용하실 수도 있습니다.

@BindingAdapter("android:src")

android:layout_marginHorizontal="18dp"
android:layout_marginBottom="20dp"
android:background="@drawable/shape_border_grey_1dp"
android:onClick="@{()->onRecentProductClick.invoke(recent_product.id)}"

Choose a reason for hiding this comment

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

data binding을 활용할 때도 kotlin, java의 coding convention을 그대로 따라 주시는게 좋습니다.

Suggested change
android:onClick="@{()->onRecentProductClick.invoke(recent_product.id)}"
android:onClick="@{() -> onRecentProductClick.invoke(recentProduct.id)}"

Choose a reason for hiding this comment

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

id를 snake_case로 지어서 그러신 것 같은데 tv_cart_count와 같이 지어진 ID도 데이터바인딩을 통해 생성된 코드에서는 tvCartCount와 같이 변경됩니다.

Comment on lines +12 to +14
<variable
name="onItemClick"
type="kotlin.jvm.functions.Function1" />

Choose a reason for hiding this comment

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

Function1를 넘기기보다는 다른 곳처럼 별도 인터페이스로 선언해주시는게 좋습니다.
그 이유는 매개변수가 늘어나거나 줄어드는 경우 type도 변경되어야하기 때문이에요.

<variable
    name="listener"
    type="woowacourse.shopping.listener.ProductItemListener" />

@galcyurio galcyurio merged commit 6b077f0 into woowacourse:sujin9 Jun 8, 2023
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