viper-architecture

Which it is the place for NSFetchedResultsController in VIPER architecture?

☆樱花仙子☆ 提交于 2020-01-03 09:11:53
问题 In VIPER, unlike the MVC, the role and place not so clearly defined for NSFetchedResultsController. Is it right to place it on the interactor? 回答1: According to this article interactor should not know how to persist the entities. VIPER and the architecture that uses NSFetchResultController are different approaches. There is no right place for NSFetchResultController in VIPER. VIPER is good for big application as it provides architecture layers that are isolated well. NSFetchResultController

Which it is the place for NSFetchedResultsController in VIPER architecture?

◇◆丶佛笑我妖孽 提交于 2020-01-03 09:11:46
问题 In VIPER, unlike the MVC, the role and place not so clearly defined for NSFetchedResultsController. Is it right to place it on the interactor? 回答1: According to this article interactor should not know how to persist the entities. VIPER and the architecture that uses NSFetchResultController are different approaches. There is no right place for NSFetchResultController in VIPER. VIPER is good for big application as it provides architecture layers that are isolated well. NSFetchResultController

TDD VS BDD: REST Service

ε祈祈猫儿з 提交于 2019-12-24 07:59:06
问题 I am all confused with TDD vs BDD :) How does TDD and BDD differ in each of below point? Development: Test case first, development follows next RestService(HTTP): Don't make rest calls? If so, a) do we return only hardcoded json using a mock object? b) how to handle REST call failures? We should have test case for that too? Especially for item 2, i have googled so many articles, but couldn't find a sample (code) approach on how to handle rest calls. 回答1: BDD and TDD are not comparable to each

iOS using VIPER with UITableView

人盡茶涼 提交于 2019-12-18 10:36:24
问题 I have a view controller which contains a table view, so I want to ask where should I put table view data source and delegate, should it be an external object or I can write it in my view controller if we say about VIPER pattern. Normally using pattern I do this: In viewDidLoad I request some flow from presenter like self.presenter.showSongs() Presenter contains interactor and in showSongs method I request some data from interactor like: self.interactor.loadSongs() When songs are ready to

How a UITabBarController fit into the VIPER architecture?

笑着哭i 提交于 2019-11-29 02:25:40
问题 I am writing an application which has a TabBar based navigation. I am adopting the VIPER architecture but I am really confused with the topic of how a UITabBarController's tab changing should be implemented. 回答1: This might be late, but it might be helpful for others. My use case was to implement the tabBarController after the login screen. There can be many ways we can do it in VIPER but how I did it is as follows: Allocated TabBar manually, without using storyboards. Create a new WireFrame