Skip to content
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

RecipeDetailInteractor, RecipeListInteractor 의 ouput을 제거, 네이밍을 수정하였습니다. #15

Merged
merged 9 commits into from
Jul 21, 2024

Conversation

GeonH0
Copy link
Collaborator

@GeonH0 GeonH0 commented Jul 14, 2024

RecipeDetailInteractor, RecipeListInteractor 의 ouput을 제거, 네이밍을 수정하였습니다.

  • OutputRecipeListInteractor 프로토콜을 삭제하였습니다.
  • 비즈니스 로직에서 처리된 결과를 RecipeListInteractorDelegate를 통해 뷰 컨트롤러에 전달하게 수정하였습니다.

스크린샷 2024-07-15 오전 1 17 21

  • OutputRecipeDetailInteractor 프로토콜을 삭제하였습니다.
  • recipeDetailSubject가 제거하여 결과를 직접 Delegate를 통해 전달하게 수정하였습니다.

스크린샷 2024-07-15 오전 1 09 45

@@ -9,16 +9,18 @@ import UIKit

final class RecipeListViewController: UIViewController {

private var interactor: RecipeListInteractor
private var recipes: [RecipeListItemViewModel] = []
private var interactor: RecipeListInteractorImpl

Choose a reason for hiding this comment

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

여기는 수정되면 안될것 같아요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

[bf8676f] 수정했습니다

private let recipeListMapper = RecipeListMapper()
private let router: RecipeListRouterProtocol

init(interactor: RecipeListInteractorImpl, router: RecipeListRouterProtocol) {

Choose a reason for hiding this comment

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

여기도 구현체말고 프로토콜을 봐야해요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

[bf8676f] 수정했습니다

recipeID: Int
) {

init(fetchRecipeDetailUseCase: FetchRecipeDetailUseCase, recipeID: Int) {

Choose a reason for hiding this comment

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

줄바꿈은 왜 사라졌죠?!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

[b583cae] 다시 적용했습니다

Comment on lines 42 to 44
.subscribe(onSuccess: { [weak self] result in
self?.delegate?.fetchedRecipe(result: result)
})

Choose a reason for hiding this comment

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

기존에 성공, 실패 모두 다뤘는데 성공밖에 안남은 것 같아요

Choose a reason for hiding this comment

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

excute는 무조건 성공인가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

실패도 있습니다. 실패도 추가하겠습니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

[ef21ffe] 수정했습니다

@@ -13,12 +13,12 @@ final class RecipeDetailViewController: UIViewController {

private let contentView = RecipeDetailView()
private let customNavigationBar = CustomNavigationBar()
private let interactor: RecipeDetailInteractor
private let interactor: RecipeDetailInteractorImpl

Choose a reason for hiding this comment

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

구현체 직접 보지 않도록 수정해주세요 (SOLID 원칙 생각해주세요)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

[a1b8b37] 수정했습니다

Comment on lines 70 to 73
extension RecipeDetailViewController: Drawable {
var viewController: UIViewController? {
return self
}

Choose a reason for hiding this comment

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

Drawble은 어디서 쓰는거에요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

라우터에서 사용하는 것입니다!

Choose a reason for hiding this comment

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

router에서 viewController를 들고있는게 아니라 Drawble을 들고있는거에요?
이 PR에서 라우팅 맥락은 없는 것 같은데 여기 커밋에서 추가하신 이유가 있을까요? 맥락에 안맞는 것 같아서요.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

router의 Drawble프로토콜이 viewcontroller를 반환 하게 정의해 두었습니다
맥락에 맞지 않는코드가 같이 올라간거 같아요 주의 하겠습니다

Choose a reason for hiding this comment

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

이 PR에서는 제거해주세요~

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

[433cc55] 제거 완료했습니다

Copy link

@GeonH0 GeonH0 merged commit 9bd17b1 into main Jul 21, 2024
2 checks passed
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