-
Notifications
You must be signed in to change notification settings - Fork 47
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
[둘리] 3, 4단계 영화 극장 선택 제출합니다. #31
Conversation
…terRepository 수정 및 생성
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/src/main/java/woowacourse/movie/data/theater/TheaterMockRepository.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/woowacourse/movie/view/model/SeatInfoUiModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/woowacourse/movie/view/moviemain/movielist/MovieListFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/woowacourse/movie/view/moviemain/setting/SettingFragment.kt
Show resolved
Hide resolved
app/src/main/java/woowacourse/movie/view/reservation/ReservationContract.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/woowacourse/movie/view/seatselection/SeatSelectionPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/woowacourse/movie/view/moviemain/movielist/MovieListContract.kt
Outdated
Show resolved
Hide resolved
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.
피드백 반영 고생하셨습니다.
몇 가지 간단한 의견을 추가로 남겨두었습니다. 💪🏻
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.
이번 미션도 고생 많으셨습니다.
지금까지 잘 해주신 것 처럼, 선택과 집중을 통해 많은 것을 얻어 가셨으면 좋겠습니다.
안녕하세요, 리뷰어님!
이번 미션 요구사항이 대부분 처음 해보는 것들이라 까다로웠습니다.
MVP에서 Presenter의 역할이 어디까지인지 어렵네요.🥲 MVP를 고민하는데 가장 많은 시간을 사용한 것 같습니다.
이번 제출 코드에 도메인의 변경사항이 많아 핵심 변경 사항의 설명을 함께 첨부합니다!
코드 설명 - 도메인
Schedule
Movie의 프로퍼티에 Schedule을 추가하여, 극장이 그 영화를 몇 시에 상영하는지 정보를 담았습니다.
SeatInfo
Theater 클래스에 프로퍼티로 포함되어 있습니다.
액티비티에서 사용할 때는 색깔 정보도 필요하기에, toUiModel로 등급별 색깔 정보를 받아 변환할 수 있습니다.
Theater
각 극장별로 할인 정책이나 좌석 정보가 달라지더라도 대응할 수 있도록 클래스를 생성하였습니다.
ScreeningDateTimes
ReservationActivity에서 사용하는 클래스로, 기존 코드에서는 Movie에 포함되어 있었으나 극장에 따라 시간대가 달라지게 되면서 분리하였습니다.
극장 선택 후에 팩토리 함수를 사용하여 그 극장의 상영 시간에 맞는 LocalDate - List Map을 생성합니다.
System
질문
Repository에서 데이터를 가져오는 것은 비즈니스 로직이라고 생각하여 분리했는데, 단순히 값을 가져오고 리턴하는 것은 Presenter의 역할이 아닌 것 같다는 느낌이 듭니다.
그렇다고 하여 View에서 각 요소마다 Set함수를 작성하자니 코드가 자잘하게 길어지는 것 같습니다.
지금 당장 생각나는 것은 각 뷰마다 ViewModel을 생성해준다, BindingAdapter를 생성하여 커스텀한다. 두 가지 방법인데요.
각 뷰마다 ViewModel을 일일히 작성해주자니 UiModel 클래스들의 존재 이유가 불명확해지는 것 같고, 커스텀 어댑터를 생성하자니 코드가 괜히 길어지는 것 같습니다.
이 외에는 방법이 없는걸까요? 보통 이런 경우에 어떻게 작성하나요?