Questions tagged [viper-architecture]

VIPER is an application of Clean Architecture to iOS apps.

127 questions
1
vote
2 answers

Different framework for Model, View and Presenter in iOS?

I am new to iOS development, so please excuse me in case my question sounds trivial. I am planning to introduce MVP or VIPER pattern. I am from Web background and in web application we used to follow different layers/dlls (for model, view, common…
Pragmatic
  • 3,093
  • 4
  • 33
  • 62
1
vote
1 answer

Clean Architecture: Interactor logic on the server

I've been playing around with Clean Architecture and VIPER. Yesterday a friend asked me why not put the Interactor logic on the server and just sync the processed data to the iOS client, instead of sending raw data and processing on the Interactor.…
Rodrigo Ruiz
  • 4,248
  • 6
  • 43
  • 75
1
vote
2 answers

Update NSManagedObject on a app with VIPER architecture

On an app that performs VIPER architecture it's recomended to deal with entities with NSObject instead of NSManagedObject (Interactor). So a NSManagedObject is 'transformed' in a PONSO to work with. The question is, if I modify attributes in a…
RFG
  • 2,880
  • 3
  • 28
  • 44
1
vote
3 answers

A lot of Switch cases in cellForRowAtIndexPath

I have a question regarding set up table view with hard coded data. Sometime developer face with situation when you need to display data that is received not form DATA MODEL layer, but stored as hard coded information. What I mean For example when…
Matrosov Oleksandr
  • 25,505
  • 44
  • 151
  • 277
1
vote
1 answer

iOS Architecture and Data Prefetching

I've been looking for an elegant solution for some time without happiness. I want to: solve the massive viewcontroller problem that VIPER, MVVM, et al address, always animate transition between fully rendered screens. This feels like fighting the…
Jim Stead
  • 21
  • 2
1
vote
0 answers

UITableViewSeparator only shows when scrolling using VIPER architecture

i've a weird situation where my UITableViewSeparators are only appearing when i scroll. I created a very simple project with a UITableView listing a list of cars. Im using VIPER architecture. I created a gist with relevant clases. Here is the…
Godfather
  • 4,040
  • 6
  • 43
  • 70
0
votes
0 answers

Can viper architecture be used on android with jetpack compose?

According to my research, viper architecture is mostly used on the iOS side, but is it used with jetpack compose on the android side? What's the difference with most common architecture mvvm in android ? If it is more advantageous than mvvm, what…
0
votes
0 answers

How to create a UISplitViewController with a VIPER pattern and how to handle the communication between viewControllers?

I've created a UISplitView Module using VIPER architecture, my intention is to use it many times during the project. I want to handle communication between the two child viewcontrollers. I am not being able to think a suitable way for this. This is…
0
votes
0 answers

Getting Data from Presenter No reflecting in View Controller Tableview Cell

getting data from presenter in protocol not reflecting in tableview cell class ViewController: UIViewController { @IBOutlet weak var tableView: UITableView! var presenter : Presenter? var products = [Products]() override…
0
votes
0 answers

Changes of entity from 1-st VIPER module don't affect on 2-nd VIPER module using same entity

I have 1 viper module where through dependency injection I set value of favoriteBeers and then pass this entity to router where I create 2 viper module with this same entity of favoriteBeers. Also I have "add to favourites" button to remove or add…
0
votes
1 answer

Where should VIPER modules be initiated in UIKit project

I have read a lot of articles in internet, where people explaining what each layer responsobility is, and that router or in some articles "constructor" should create whole VIPER module. But no one does not explain where to create them and how (most…
0
votes
1 answer

SwiftUI View don't see property of ObservableObject marked with @Published

I'm writing my app using SwiftUI and VIPER. And to save the idea of viper(testability, protocols and etc) and SwiftUI reactivity I want to add 1 more layer - ViewModel. My presenter will ask data from interactor and will put in ViewModel, then view…
0
votes
1 answer

Migrating to VIPER from inherited UI+business-logic/etc superclass

I've decided to try migrating my existing project architecture to VIPER. VIPER seems popular due to the way it separates modules. However, I have 2 similar view controllers that inherit from CustomVC. These 2 view controllers call for super methods…
0
votes
1 answer

When using the Viper pattern, Should the viper pattern be applied to all viewcontrollers?

When using the VIPER pattern, what are examples in source code of the downside impacts of applying the VIPER pattern to only some views & view-controllers but not all? Conversely, what are examples in source code of the upside advantages of…
DHyuk
  • 35
  • 1
  • 3
0
votes
1 answer

VIPER architecture: tab bar controller

I am using VIPER and at the moment I am a bit lost. How do I setup a UITabBarController in a UINavigationController and also add viewControllers to the UITabBarController? At the moment, all of my code gets messy and crashes all the time. I'm…
jbehrens94
  • 2,356
  • 6
  • 31
  • 59
1 2 3
8
9