Skip to content

Instantly share code, notes, and snippets.

@GeekTree0101
Last active November 1, 2021 02:44
Show Gist options
  • Save GeekTree0101/4cd4cb08bd4a88df503d00763a165896 to your computer and use it in GitHub Desktop.
Save GeekTree0101/4cd4cb08bd4a88df503d00763a165896 to your computer and use it in GitHub Desktop.
Usecase 추상화 vs 실객체
protocol FeedUsecase { }
final class BusinessFeedUsecase: FeedUsecase {
init(repo: ArticleRepositoryProtocol) { ... }
}
final class FleaMarketFeedUsecase: FeedUsecase {
init(repo: ArticleRepositoryProtocol) { ... }
}
final class FeedPresentation {
init(feed: FeedUsecase) { ... }
}
final class ArticleWatchUsecase {
init(repo: ArticleRepositoryProtocol) { ... }
}
final class ArticleStatusUsecase {
init(repo: ArticleRepositoryProtocol) { ... }
}
final class ArticleDetailPresentation {
init(watch: ArticleWatchUsecase, status: ArticleStatusUsecase) { ... }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment