VIPER ( ? OR : AND) MVVM
by Roxane Markhyvka
Agenda
● What is VIPER?
● Common problems and solutions
● How does MVVM fits in?
● Conclusions
What is VIPER?
● View - user interface, usually UIView or UIViewController subclass.
● Interactor - business logic layers, like API, Persistent Storage etc
● Presenter - fetches data from Interactor, passing it to View (modified
if needed) and processing user initiated actions from View.
● Entity - model in business logic, usually a struct
● Router - knows only of navigation that can happen from current
screen.
What is VIPER?
VIPER: cons
● Too many files
● Confusing communication (who owns who)
● Delegation of responsibilities (since all components are visible and
available)
VIPER cons: Too many files
Presentation
Business logic
VIPER cons: Who owns who
strong
weak
strong reference
from UIWindow
strong
weak
weak
strong by
injection
DI
creates
creates
and holds
VIPER cons: Delegation of responsibilities
● UIKit
● Life cycle
● User
Interaction
● UIKit
● Navigation
● fetching data from interactor
● converting data to representable
● filling View with data
● process output from view
● delegate to router
● provide data on request
● create Entities
● dumb model
VIPER: pros
● Flexible and reusable
● Easily maintainable
● Convenient for large teams
● Decoupled distribution of responsibilities
● Testable
● Cross platform code review with Android team
(this last one is so not my idea :) https://medium.com/@ankoma22)
VIPER in code: View
VIPER in code: Presenter
VIPER in code: Router
In real life...
What is MVVM?
VIPER + MVVM
ViewModel
creates
owns
VIPER + MVVM
in code
Conclusions
Like any other software architecture, VIPER has its pros and cons. It is
easy to fall over to overengineering side of the story with VIPER, so don’t
be afraid to put in a little extra to the mix when you see fit.
Pursuing sole architecture in your app often won’t give you the relief
it has promised, and not because the architecture is bad, but solely
because any of the patterns simply can not forsee each and every use case
your app will throw at you.
References
1.https://www.objc.io/issues/13-architecture/viper/
2.https://medium.com/ios-os-x-development/ios-architecture-patterns-ecba4c38de52
3.https://clean-swift.com/clean-swift-ios-architecture/
4.https://medium.com/@ankoma22/the-good-the-bad-and-the-ugly-of-viper-architecture-
for-ios-apps-7272001b5347
5.Lotus MVC - https://matteomanferdini.com/ios-architecture-lotus-mvc-pattern/
6.Xcode templates - https://blog.kulman.sk/creating-your-own-xcode-templates/
The end
Q & A

More Related Content

PDF
Jetpack Compose beginner.pdf
PDF
Building aosp
PDF
Mocking in Java with Mockito
PDF
Java 9 New Features
PDF
Service Worker Presentation
PPTX
Angular js
PDF
Quick introduction to Qwik
PPT
Spring Core
Jetpack Compose beginner.pdf
Building aosp
Mocking in Java with Mockito
Java 9 New Features
Service Worker Presentation
Angular js
Quick introduction to Qwik
Spring Core

What's hot (20)

PDF
PPT
Presentation Spring, Spring MVC
PPTX
Writing and using Hamcrest Matchers
PPTX
Introduce yourself to java 17
PPTX
MVVM ( Model View ViewModel )
PDF
Reactive Extensionsで非同期処理を簡単に
PPTX
Rest API with Swagger and NodeJS
PDF
React.js 세미나
PPTX
Migrating to Java 11
PDF
Wordpress Plugin Development Short Tutorial
PDF
Java11 New Features
PPTX
[C++ Korea 2nd Seminar] Ranges for The Cpp Standard Library
PPTX
PPTX
iOS Architecture
PDF
Angular
PPTX
What's new in Java 11
PDF
第一次用 Vue.js 就愛上 [改]
PDF
Microservices with Java, Spring Boot and Spring Cloud
PDF
你所不知道的 DDD - 文件驅動開發
Presentation Spring, Spring MVC
Writing and using Hamcrest Matchers
Introduce yourself to java 17
MVVM ( Model View ViewModel )
Reactive Extensionsで非同期処理を簡単に
Rest API with Swagger and NodeJS
React.js 세미나
Migrating to Java 11
Wordpress Plugin Development Short Tutorial
Java11 New Features
[C++ Korea 2nd Seminar] Ranges for The Cpp Standard Library
iOS Architecture
Angular
What's new in Java 11
第一次用 Vue.js 就愛上 [改]
Microservices with Java, Spring Boot and Spring Cloud
你所不知道的 DDD - 文件驅動開發
Ad

Similar to VIPER ( ? OR : AND) MVVM (20)

ODP
VIPER
PDF
software architecture
PPTX
VIPER Architecture
PPTX
Decentralized APIs for Agile Businesses
PPTX
APIdays Zurich 2019 - Decentralized API Management for Agile Enterprises Nuwa...
PDF
"Micro-frontends from A to Z. How and Why we use Micro-frontends in Namecheap...
PDF
Models used in iOS programming, with a focus on MVVM
PDF
App structure Fundamentals
PDF
MVP Clean Architecture
PPTX
WinJS at NYC Code Camp 2012
PDF
#7 - Client-side web apps, MVC and jQuery
PDF
Android App Architecture
PPTX
Microservices: Living Large in Your Castle Made of Sand
PPTX
Mobile App Architectures & Coding guidelines
PPTX
MVP vs MVVM : a fast introduction
PDF
Ensure The Success of VMware Horizon View Deployments
PPTX
Hypori Performance Webinar
PDF
Delivering Best Apps with Efficiency
PDF
[Workshop] API Management in Microservices Architecture
PPTX
Training: MVVM Pattern
VIPER
software architecture
VIPER Architecture
Decentralized APIs for Agile Businesses
APIdays Zurich 2019 - Decentralized API Management for Agile Enterprises Nuwa...
"Micro-frontends from A to Z. How and Why we use Micro-frontends in Namecheap...
Models used in iOS programming, with a focus on MVVM
App structure Fundamentals
MVP Clean Architecture
WinJS at NYC Code Camp 2012
#7 - Client-side web apps, MVC and jQuery
Android App Architecture
Microservices: Living Large in Your Castle Made of Sand
Mobile App Architectures & Coding guidelines
MVP vs MVVM : a fast introduction
Ensure The Success of VMware Horizon View Deployments
Hypori Performance Webinar
Delivering Best Apps with Efficiency
[Workshop] API Management in Microservices Architecture
Training: MVVM Pattern
Ad

Recently uploaded (20)

PPTX
assetexplorer- product-overview - presentation
PDF
AI Guide for Business Growth - Arna Softech
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PPTX
Patient Appointment Booking in Odoo with online payment
PDF
Cost to Outsource Software Development in 2025
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
iTop VPN Crack Latest Version Full Key 2025
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
DOCX
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
PPTX
Tech Workshop Escape Room Tech Workshop
PDF
Designing Intelligence for the Shop Floor.pdf
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
PDF
Wondershare Recoverit Full Crack New Version (Latest 2025)
PDF
Time Tracking Features That Teams and Organizations Actually Need
PDF
MCP Security Tutorial - Beginner to Advanced
PDF
Website Design Services for Small Businesses.pdf
PDF
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
assetexplorer- product-overview - presentation
AI Guide for Business Growth - Arna Softech
How to Use SharePoint as an ISO-Compliant Document Management System
Patient Appointment Booking in Odoo with online payment
Cost to Outsource Software Development in 2025
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
iTop VPN Crack Latest Version Full Key 2025
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
Tech Workshop Escape Room Tech Workshop
Designing Intelligence for the Shop Floor.pdf
Computer Software and OS of computer science of grade 11.pptx
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
Wondershare Recoverit Full Crack New Version (Latest 2025)
Time Tracking Features That Teams and Organizations Actually Need
MCP Security Tutorial - Beginner to Advanced
Website Design Services for Small Businesses.pdf
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx

VIPER ( ? OR : AND) MVVM

Editor's Notes

  • #7: Xcode templates