Porównanie architektur MVVM i MVC (iOS)

Preview:

Citation preview

_

Nev

er s

ettle

.w

ww

.intiv

e.co

m

Welcome

Porównanie architektur: MVVM oraz MVC na

przykładzie dwóch aplikacji

Patryk Grabowskipatryk.grabowski@intive.com

Intive, 2016_09_29

Jeżeli nie potrafisz czegoś prosto wyjaśnić - to znaczy, że niewystarczająco to rozumiesz.

Albert Einstein

Agenda

IntroductionMVC vs. MVVM:

• Model View Controller• Model View View-Model• How does it look on iOS?

Reactive Programming• Reactive Frameworks

DemoSummary

MVC vs MVVM

What are them?

MVC vs MVVM

Do we really need them?

MVC vs MVVM

MVVM:ModelViewView-Model

MVC:ModelViewController

MVC vs MVVM

MVC vs MVVM

MVC vs MVVM

Is it wise to use an application design pattern other than the one (MVC) recommended by Apple?

YES!!!• Apple doesn’t provide solution hot to solve problem of Massive View Controller• Fits really nicely within the MVC pattern

MCV vs MVVM

MVC vs MVVM

MVVM in iOS:• „Protocol-Oriented MVVM”: Introduction to Protocol-Oriented MVVM by

NatashaTheRobot• „MVVM in Swift” by Ash Furrow• Reactive MVVM

Reactive Programming

„Reactive programming is programming with asynchronous data streams”

• RxSwift• ReactiveCocoa

Demo

Demo

Summary

• MVC is fully replaceable with MVVM pattern in iOS• MVVM is my default way I write apps (with protocols and generics)

Recommend:• http://artsy.github.io/blog/2015/09/24/mvvm-in-swift/• http://www.sprynthesis.com/2014/12/06/reactivecocoa-mvvm-introduction/• https://realm.io/news/altconf-scott-gardner-reactive-programming-with-rxswift/

patryk.grabowski@intive.com

Contact us _Never

settle.Patryk GrabowskiiOS Developerpatryk.grabowski@intive.com