4. Cons
◦ Massive View Controller!
◦ Sometimes hard to test
◦ More “layers” are needed as app
grows
◦ Its an “Apple thing”
◦ Decrease code clarity
◦ There are better design
patterns
5. What better you say?
MVVM - Model View View Model
--iOS
MVP - Model View Presenter
--Android
6. MVVM
◦ View controllers are technically
distinct components, they
almost always go hand-in-hand
together, paired
◦ When is the last time that a
view could be paired with
different view controllers??
8. MVVM
◦ Most of the stuff in
ViewController is presentation
logic
◦ Things like transforming values
from the model into something
the view can present
10. MVVM
MVVM is an augmented version of
MVC where we formally connect
the view and controller, and move
presentation logic out of the
controller and into a new object.
11. MVVM
Why?
◦ Reduces the complexity of one’s
view controllers and makes
one’s presentation logic easier
to test
21. On top of that
◦ View can disappear and appear
at random time
◦ Do not forget about
saving/restoring of Views
◦ Attach a couple of background
tasks to that temporary Views