SlideShare a Scribd company logo
App Structure
Fundamentals
MVC, MVP, MVVP, and VIPER
www.Pyranova.Tech 1
Content
● What is app structures ?
● Purpose of session.
● App structures
○ MVC
○ MVP
○ MVVM
○ VIPER
● Concoulasion.
● Reference.
2
www.Pyranova.Tech 2
What is app structures ?
● Organize your application’s component.
● Determine your app scale “as developer”.
www.Pyranova.Tech 3
Purpose of session
● Know the most used App structures.
● Determine the best structures you should follow to work in your app.
www.Pyranova.Tech 4
Purpose of session
TO
www.Pyranova.Tech 5
App Structures
○ MVC
○ MVP
○ MVVM
○ VIPER
www.Pyranova.Tech 6
What is MVC ?
● separation of concern
Model - View - Controller
www.Pyranova.Tech
7
7
MVC Architecture.
www.Pyranova.Tech
8
8
Example.
www.Pyranova.Tech
9
9
Why MVC ?
● Faster development process.
● Easier to Debug .
● Good in case of small apps.
www.Pyranova.Tech
10
10
App Structures
○ MVC
○ MVP
○ MVVM
○ VIPER
www.Pyranova.Tech 11
What is MVP ?
● separation of concern
Model - View - Presenter
● Start using delegate.
www.Pyranova.Tech
12
12
MVP Architecture.
www.Pyranova.Tech
13
13
Example.
www.Pyranova.Tech
14
14
Example
15
15www.Pyranova.Tech
Why MVP ?
● Clear separation of responsibilities between components.
● Easier in test.
www.Pyranova.Tech
16
16
App Structures
○ MVC
○ MVP
○ MVVM
○ VIPER
www.Pyranova.Tech 17
What is MVVM ?
● separation of concern
Model - View - ViewModel
● View model is connect chain between View and model.
www.Pyranova.Tech
18
18
MVVM Architecture.
www.Pyranova.Tech
19
19
Example.
www.Pyranova.Tech
20
20
Example.
www.Pyranova.Tech
21
21
Why MVVM ?
● Distribute responsibilities between classes in a application.
● Easier in test.
www.Pyranova.Tech
22
22
MVP vs MVVM ?
www.Pyranova.Tech 2323
protocol StudentsViewPresenterProtocol: class {
func updateStudent (name: String, isJoined: Bool)
func showMessage (message: String)
}
protocol ViewModelUIDelegate: class {
func viewWillUpdate()
func viewDidUpdate(requestUrl: String)
func showErrorView(error: String)
}
App Structures
○ MVC
○ MVP
○ MVVM
○ VIPER
www.Pyranova.Tech 24
What is VIPER ?
• separation of concern
most like MVC, MVVC
• modular approach
each feature = module service by 5 classes.
www.Pyranova.Tech
25
25
VIPER Architecture.
www.Pyranova.Tech
26
26
VIPER Architecture.
• Viper is a delegation driven architecture. So, One layer calls
another through a protocol.
• Protocols :
PresenterToViewProtocol
ViewToPresenterProtocol
InteractorToPresenterProtocol 
PresentorToInterectorProtocol 
PresenterToRouterProtocol
www.Pyranova.Tech
27
27
Example
www.Pyranova.Tech
28
28
Example
www.Pyranova.Tech
29
29
Example
www.Pyranova.Tech
30
30
Why VIPER ?
• Make the structure more modular
• Very good environment for unit testing.
• Reduce the load and dependency on controllers.
• Working with constantly changing requirements.
NOT good in case of small apps
www.Pyranova.Tech
31
31
Concoulasion
● App structure is to organize your application’s
component.
● There is no best and worst.
www.Pyranova.Tech
32
32
References
• https://medium.com/@smalam119
• https://danielmiessler.com/study/mvc
• https://blog.pusher.com/mvvm-ios
• https://medium.com/@vigneshwaran_89879/mvc-vs-mvv
m-vs-mvp-vs-viper-which-design-architecture-is-suitable-f
or-ios-bb1f32328bd8
• https://medium.com/swift-india
• https://medium.com/@saad.eloulladi/ios-swift-mvp-archit
ecture-pattern-a2b0c2d310a3
www.Pyranova.Tech
33
33

More Related Content

PPTX
MVVM_Ashraf
PPTX
VIPER ( ? OR : AND) MVVM
PDF
Choosing the architecture
PDF
Clean VIP (Clean Swift) architecture
PDF
Models used in iOS programming, with a focus on MVVM
PDF
iOS architecture patterns
PDF
Mobile architectures
MVVM_Ashraf
VIPER ( ? OR : AND) MVVM
Choosing the architecture
Clean VIP (Clean Swift) architecture
Models used in iOS programming, with a focus on MVVM
iOS architecture patterns
Mobile architectures

Similar to App structure Fundamentals (20)

PPTX
VIPER Architecture
PDF
Common iOS Architecture: From MVC to VIPER, with Redux
PPTX
MV(X) architecture patterns
PPTX
iOS Architecture
PDF
Dmytro Zaitsev Viper: make your mvp cleaner
PDF
SE2016 Android Dmytro Zaitsev "Viper make your MVP cleaner"
PPTX
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
PPTX
iOS Architectures
ODP
VIPER
PDF
PDF
Infinum iOS Talks #2 - VIPER for everybody by Damjan Vujaklija
PDF
MVVM & RxSwift
PDF
How I Accidentally Discovered MVVM
PPTX
Sexy Architecting. VIPER: MVP on steroids
PPSX
Software Design Patterns
PDF
PDF
MVC architecture
PDF
Application architecture pattern
PPTX
Android DesignArchitectures.pptx
PPTX
Difference between Software Architectural pattern
VIPER Architecture
Common iOS Architecture: From MVC to VIPER, with Redux
MV(X) architecture patterns
iOS Architecture
Dmytro Zaitsev Viper: make your mvp cleaner
SE2016 Android Dmytro Zaitsev "Viper make your MVP cleaner"
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
iOS Architectures
VIPER
Infinum iOS Talks #2 - VIPER for everybody by Damjan Vujaklija
MVVM & RxSwift
How I Accidentally Discovered MVVM
Sexy Architecting. VIPER: MVP on steroids
Software Design Patterns
MVC architecture
Application architecture pattern
Android DesignArchitectures.pptx
Difference between Software Architectural pattern
Ad

Recently uploaded (20)

PPTX
UNIT 4 Total Quality Management .pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
composite construction of structures.pdf
DOCX
573137875-Attendance-Management-System-original
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
web development for engineering and engineering
PPTX
Geodesy 1.pptx...............................................
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPT
Project quality management in manufacturing
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
Construction Project Organization Group 2.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
UNIT 4 Total Quality Management .pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
R24 SURVEYING LAB MANUAL for civil enggi
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Foundation to blockchain - A guide to Blockchain Tech
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
composite construction of structures.pdf
573137875-Attendance-Management-System-original
OOP with Java - Java Introduction (Basics)
web development for engineering and engineering
Geodesy 1.pptx...............................................
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Project quality management in manufacturing
Internet of Things (IOT) - A guide to understanding
Construction Project Organization Group 2.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Ad

App structure Fundamentals