2

Can anybody explain the real scenario for implementation of MVC vs MVVM vs VIPER for iOS based project.I'm looking some example which explain that where we should use MVC,MVVM and VIPER.

Thanks in advance.

Borys Verebskyi
  • 4,160
  • 6
  • 28
  • 42
Sachin Kumaram
  • 900
  • 1
  • 10
  • 27

2 Answers2

5

https://medium.com/ios-os-x-development/ios-architecture-patterns-ecba4c38de52#.58u55ykux

There is no silver bullet so choosing architecture pattern is a matter of weighting tradeoffs in your particular situation.

Alex Sfinx87
  • 244
  • 5
  • 16
2

I agree, there is no right or wrong way to do it. We have been using a VIPER/Clean architecture inspired architecture on a medium sized project (~70k lines of code) at my former company. It made sense for us to go with this approach because we have had quite a lot of business logic that should not change that often. Additionally, the architecture communicates intent so it is easier to understand what your application does (your use cases) instead of which frameworks and technologies you use.

If you want to know more about clean architecture inspired architectures such as VIPER, I suggest you have a look at Uncle Bob's talk on youtube.

https://www.youtube.com/watch?v=Nsjsiz2A9mg

If you are unsure which direction to go: follow the single responsibility principle (which you might want to follow anyway). That way you can recompose the parts later on to achieve the architecture style you've settled on.

Jens Meder
  • 4,237
  • 1
  • 25
  • 25