Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Mobile Fest 2018. Matteo Manferdini. A comparative approach to MVC, MVVM and VIPER: taking the best ideas without fighting against the platform

121 views

Published on

In the world of iOS development, it is common to hear the names of different design patterns thrown around. Each pattern is sold as a solution to the limitations of other ones, only to introduce new, various problems. Some of these get to the extreme of rejecting the foundations on which iOS apps are built. In this talk, we will explore the different ideas behind these patterns, their drawbacks, and how we can harmonize them

Published in: Education
  • Be the first to comment

  • Be the first to like this

Mobile Fest 2018. Matteo Manferdini. A comparative approach to MVC, MVVM and VIPER: taking the best ideas without fighting against the platform

  1. 1. A COMPARATIVE APPROACHTO MVC, MVVM ANDVIPER Taking the best ideas without fighting against the platform Mobile Fest 2018, Kiev matteomanferdini.com Matteo Manferdini
  2. 2. • Hard to read • Hard to maintain • Hard to test 2011
  3. 3. 2013
  4. 4. THE CULPRIT Controller View Model Massive view controllers
  5. 5. FIXING MVC ( ? ) ControllerView Model View Presenter Interactor Entity Wireframe Data Store View Controller View Model Model
  6. 6. MVC'S HIDDEN COMPLEXITY • Separation of concerns • Vertical information flow • State • View controller communication • Parallelism Controller View Model Controller View Model
  7. 7. MVVM+C View Controller View Model View Model View View Controller View ModelNetwork Manager Coordinator
  8. 8. VIPER View Controller View Entity Interactor View View Controller InteractorData Store Wireframe Network ManagerPresenter Presenter
  9. 9. WHAT I DON’T LIKE • Rigid and prescriptive • Rely on bindings • Fight against the platform
  10. 10. CENTRALITY OFVIEW CONTROLLERS View Controller View Model View Controller View Model
  11. 11. CONTROLLING COMPLEXITY IN SWIFT https://academy.realm.io/posts/andy-matuschak-controlling-complexity
  12. 12. INERT MODELTYPES View Controller View Model View Controller View Model
  13. 13. –Concepts in Objective-C Programming One can merge the MVC roles played by an object, making an object, for example, fulfill both the controller and view roles—in which case, it would be called a view controller. In the same way, you can also have model-controller objects.
  14. 14. MODEL CONTROLLERS View Controller View Model Model Controllers Shared Controllers View Controller View Model Controllers Coordinator
  15. 15. https://matteomanferdini.com/mvvm-pattern-ios-swift/
  16. 16. INERTVIEW MODELS View Controller View Model Model Controllers View Model Shared Controllers View Controller View Model Controllers View Model Coordinator
  17. 17. View Controller Programming Guide for iOS
  18. 18. INTERFACE CONTROLLERS View Controller View Model Model Controllers View Model Interface Controllers Shared Controllers Coordinator View Controller View Model Controllers View Model Interface Controllers
  19. 19. LOTUS MVC View Controller View Model Model Controllers View Model Interface Controllers Shared Controllers Coordinator View Controller View Model Controllers View Model Interface Controllers
  20. 20. Cell Data Source View ModelTable view View Controller Cell Interface Controller Table view View Controller Model Storage Controller View Controller
  21. 21. matteomanferdini.com

×