Liked some of my work? Buy me a coffee (or more likely a beer)
- Architecture: Model View Presenter - Router (MVP-R)
- API: TMDB-Movies APIs
- Dependency Injection
Upcoming Movies | Edit Movie | Update Movie | Submit Changes |
---|---|---|---|
View
- delegates user interaction events to thePresenter
and displays data passed by thePresenter
- All
UIViewController
,UIView
,UITableViewCell
subclasses belong to theView
layer
- All
Presenter
- contains the presentation logic and tells theView
what to present- Usually we have one
Presenter
per scene (view controller) - It doesn't reference the concrete type of the
View
, but rather it references theView
protocol that is implemented usually by aUIViewController
subclass - It should be a plain
Swift
class and not reference anyiOS
framework classes - this makes it easier to reuse it maybe in amacOS
application - It should be covered by Unit Tests
- Usually we have one
Router
- contains navigation / flow logic from one scene (view controller) to another- In some communities / blog posts it might be referred to as a
FlowController
- It is usually referenced by the
Presenter
and weak referenced by theView
(UIViewController)
- In some communities / blog posts it might be referred to as a
- iOS 12.0+
- Xcode 11+
- To install the app, clone the repository and open the
TMDB-Movies-MVP.xcworkspace
file in Xcode.
- My vietnamese blog: MVP-R blog