VIPER Design pattern in iOS

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@arwy·
0.000 HBD
VIPER Design pattern in iOS
Hi Friends,
This post is in continuation with my earlier STEEMIST post -  https://steemit.com/vincentb/@arwy/design-patterns-in-ios

The latest pattern which is getting attention in iOS now a days is VIPER design pattern as it helps in designing and testing iOS apps.
The word VIPER is a backronym for View, Interactor, Presenter, Entity, and Routing. 

View: Class that has all the code to show the app interface to the user and get their response. Upon receiving the response View alerts the Presenter.

Presenter: Nucleus of a module. It gets user response from the View and work accordingly. Only class to communicate with all other components. Calls the router for wire-framing, Interactar to fetch data (network calls or local data calls), view to update the UI.

Interactor: Have business logics of an app. Primarily make API calls to fetch data from a source. Responsible for making data calls but not necessarily from itself.

Router: Does the wire-framing. Listen from the presenter about which screen to present and executes it.

Entity: Contains model classes used by interactor.

For in-depth understanding  of this design pattern, you can visit -
https://www.objc.io/issues/13-architecture/viper/
👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,