Submit Search
Upload
iOS design patterns: MVC, MVP and MVVM
•
Download as PPTX, PDF
•
1 like
•
110 views
Suyash Gupta
Follow
iOS design patterns: MVC, MVP and MVVM
Read less
Read more
Mobile
Report
Share
Report
Share
1 of 19
Download now
Recommended
Store apps with AngularJS
Store apps with AngularJS
Timmy Kokke
VIPER ( ? OR : AND) MVVM
VIPER ( ? OR : AND) MVVM
Indeema Software Inc.
Android MVVM
Android MVVM
Vinícius Tonial Sossella
E2E testing with UIVeri5
E2E testing with UIVeri5
Maxim Naidenov
Reliable application tests for ui5 apps
Reliable application tests for ui5 apps
Maxim Naidenov
UI5 supportability tools explained
UI5 supportability tools explained
Maxim Naidenov
Vue.js vs angular the best java script framework to choose
Vue.js vs angular the best java script framework to choose
Mobiloitte
Android MVVM
Android MVVM
David Estivariz Pierola
Recommended
Store apps with AngularJS
Store apps with AngularJS
Timmy Kokke
VIPER ( ? OR : AND) MVVM
VIPER ( ? OR : AND) MVVM
Indeema Software Inc.
Android MVVM
Android MVVM
Vinícius Tonial Sossella
E2E testing with UIVeri5
E2E testing with UIVeri5
Maxim Naidenov
Reliable application tests for ui5 apps
Reliable application tests for ui5 apps
Maxim Naidenov
UI5 supportability tools explained
UI5 supportability tools explained
Maxim Naidenov
Vue.js vs angular the best java script framework to choose
Vue.js vs angular the best java script framework to choose
Mobiloitte
Android MVVM
Android MVVM
David Estivariz Pierola
Basics of Android MVP
Basics of Android MVP
Dinkar Kumar
C2M - App design
C2M - App design
rohanratnaparkhi
MVC 1.0 / JSR 371
MVC 1.0 / JSR 371
David Delabassee
Verification at scale: Fitting static code analysis into continuous integration
Verification at scale: Fitting static code analysis into continuous integration
Rogue Wave Software
How to Architect and Develop Cloud Native Applications
How to Architect and Develop Cloud Native Applications
Sufyaan Kazi
Ratpack - SpringOne2GX 2015
Ratpack - SpringOne2GX 2015
Daniel Woods
Using APIs
Using APIs
Akana
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
Divante
JVMCON Java in the 21st Century: are you thinking far enough ahead?
JVMCON Java in the 21st Century: are you thinking far enough ahead?
Steve Poole
The End of Security as We Know It - Shannon Lietz
The End of Security as We Know It - Shannon Lietz
SeniorStoryteller
Microservices + Oracle: A Bright Future
Microservices + Oracle: A Bright Future
Kelly Goetsch
Exploring MVVM, MVC, MVP Patterns - CRB Tech
Exploring MVVM, MVC, MVP Patterns - CRB Tech
Pooja Gaikwad
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Divante
DeveloperWeek 2020: Cloud-Native and Microservices Accelerate Process Improve...
DeveloperWeek 2020: Cloud-Native and Microservices Accelerate Process Improve...
Shahir Daya
Operations and Monitoring with Spring
Operations and Monitoring with Spring
Eberhard Wolff
Navigating Your Product's Growth with Embedded Analytics
Navigating Your Product's Growth with Embedded Analytics
Progress
Architectural Design Pattern: Android
Architectural Design Pattern: Android
Jitendra Kumar
Microservice Lifecycle Demo Presentation
Microservice Lifecycle Demo Presentation
Matt McLarty
Upmc tpdev1
Upmc tpdev1
Jean-Yves Rigolet
Advanced angular
Advanced angular
Sumit Kumar Rakshit
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Pooja Nehwal
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
anilsa9823
More Related Content
Similar to iOS design patterns: MVC, MVP and MVVM
Basics of Android MVP
Basics of Android MVP
Dinkar Kumar
C2M - App design
C2M - App design
rohanratnaparkhi
MVC 1.0 / JSR 371
MVC 1.0 / JSR 371
David Delabassee
Verification at scale: Fitting static code analysis into continuous integration
Verification at scale: Fitting static code analysis into continuous integration
Rogue Wave Software
How to Architect and Develop Cloud Native Applications
How to Architect and Develop Cloud Native Applications
Sufyaan Kazi
Ratpack - SpringOne2GX 2015
Ratpack - SpringOne2GX 2015
Daniel Woods
Using APIs
Using APIs
Akana
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
Divante
JVMCON Java in the 21st Century: are you thinking far enough ahead?
JVMCON Java in the 21st Century: are you thinking far enough ahead?
Steve Poole
The End of Security as We Know It - Shannon Lietz
The End of Security as We Know It - Shannon Lietz
SeniorStoryteller
Microservices + Oracle: A Bright Future
Microservices + Oracle: A Bright Future
Kelly Goetsch
Exploring MVVM, MVC, MVP Patterns - CRB Tech
Exploring MVVM, MVC, MVP Patterns - CRB Tech
Pooja Gaikwad
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Divante
DeveloperWeek 2020: Cloud-Native and Microservices Accelerate Process Improve...
DeveloperWeek 2020: Cloud-Native and Microservices Accelerate Process Improve...
Shahir Daya
Operations and Monitoring with Spring
Operations and Monitoring with Spring
Eberhard Wolff
Navigating Your Product's Growth with Embedded Analytics
Navigating Your Product's Growth with Embedded Analytics
Progress
Architectural Design Pattern: Android
Architectural Design Pattern: Android
Jitendra Kumar
Microservice Lifecycle Demo Presentation
Microservice Lifecycle Demo Presentation
Matt McLarty
Upmc tpdev1
Upmc tpdev1
Jean-Yves Rigolet
Advanced angular
Advanced angular
Sumit Kumar Rakshit
Similar to iOS design patterns: MVC, MVP and MVVM
(20)
Basics of Android MVP
Basics of Android MVP
C2M - App design
C2M - App design
MVC 1.0 / JSR 371
MVC 1.0 / JSR 371
Verification at scale: Fitting static code analysis into continuous integration
Verification at scale: Fitting static code analysis into continuous integration
How to Architect and Develop Cloud Native Applications
How to Architect and Develop Cloud Native Applications
Ratpack - SpringOne2GX 2015
Ratpack - SpringOne2GX 2015
Using APIs
Using APIs
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
JVMCON Java in the 21st Century: are you thinking far enough ahead?
JVMCON Java in the 21st Century: are you thinking far enough ahead?
The End of Security as We Know It - Shannon Lietz
The End of Security as We Know It - Shannon Lietz
Microservices + Oracle: A Bright Future
Microservices + Oracle: A Bright Future
Exploring MVVM, MVC, MVP Patterns - CRB Tech
Exploring MVVM, MVC, MVP Patterns - CRB Tech
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
DeveloperWeek 2020: Cloud-Native and Microservices Accelerate Process Improve...
DeveloperWeek 2020: Cloud-Native and Microservices Accelerate Process Improve...
Operations and Monitoring with Spring
Operations and Monitoring with Spring
Navigating Your Product's Growth with Embedded Analytics
Navigating Your Product's Growth with Embedded Analytics
Architectural Design Pattern: Android
Architectural Design Pattern: Android
Microservice Lifecycle Demo Presentation
Microservice Lifecycle Demo Presentation
Upmc tpdev1
Upmc tpdev1
Advanced angular
Advanced angular
Recently uploaded
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Pooja Nehwal
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
anilsa9823
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
anilsa9823
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
Delhi Call girls
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
PsychicRuben LoveSpells
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7
Pooja Nehwal
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
nishacall1
Recently uploaded
(7)
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
iOS design patterns: MVC, MVP and MVVM
1.
Copyright ©2016 Talentica
Software (I) Pvt Ltd. All rights reserved. C2M - Mobile App Architecture iOS - Suyash Gupta
2.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 2 Agenda • Separation of Concerns • MVC • Problems with MVC • MVP • MVVM • Working MVVM App
3.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 3 Separation of concerns • In computer science, separation of concerns (SoC) is a design principle for separating a computer program into distinct sections, such that each section addresses a separate concern. • When concerns are well-separated, individual sections can be reused, as well as developed and updated independently.
4.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 4 M-V-C (Model View Controller) • A proven pattern for organizing your code in complex application design, also the Apple recommended way of programming an app. • It’s also proven to have a second meaning in iOS development: Massive View Controller. • Apple hasn’t provided any real guidance on how to solve the Massive View Controller problem
5.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 5 MVC DEMO
6.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 6 Web MVC
7.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 7 Apple’s MVC Code: var userCell = tableView.dequeueReusableCellWithIdentifier("identifier") as UserCell userCell.configureWithUser(user)
8.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 8 Problems with MVC • Distribution— the View and the Model in fact separated, but the View and the Controller are tightly coupled. • Testability — due to the bad distribution you’ll probably only test your Model. • Ease of use — the least amount of code among others patterns. In addition everyone is familiar with it, thus, it’s easily maintained even by the inexperienced developers.
9.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 9 Problems with MVC
10.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 10 MVP DEMO
11.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 11 MVP
12.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 12 MVP- Features • Distribution — we have the most of responsibilities divided between the Presenter and the Model, with the pretty dumb View • Testability — is excellent, we can test most of the business logic due to the dumb View. • Easy of use — in our simple example, the amount of code is doubled compared to the MVC, but at the same time, idea of the MVP is very clear.
13.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 13 MVVM DEMO
14.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 14 MVVM
15.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 15 Some rules of MVVM • The View has a reference to the ViewModel, but not vice-versa. • The ViewModel has a reference to the Model, but not vice-versa. • Business logic controller(VM) should have no reference of UIKit. • View should be only responsible for UI handling. • View should not interact with Data Model or vice-versa. • View Model is responsible only for processing input to output and logic required for driving the UI as in demo example.
16.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 16 MVVM-Features • Distribution —MVVM’s View has more responsibilities than the MVP’s View. • Testability— the View Model knows nothing about the View, this allows us to test it easily. • Easy of use — its has the same amount of code as the MVP in our example, but MVVM would be much skinnier if you used bindings.[ReactiveCocoa]
17.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 17 Working MVVM App DEMO
18.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 18 References • https://academy.realm.io/posts/krzysztof-zablocki-mDevCamp-ios- architecture-mvvm-mvc-viper/ • https://github.com/blkbrds/arch-mvvm-ios (Remove the lint pod from podfile and build phases to make the project run) • The references of the all the patterns are available on Github:https://github.com/suyashgupta25/iOSPatternsSamples
19.
Copyright © 2016
Talentica Software (I) Pvt Ltd. All rights reserved.Copyright ©2016 Talentica Software (I) Pvt Ltd. All rights reserved. 19
Download now