VIPER Design pattern in iOS

in #vincentb7 years ago

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/

Sort:  

This post has received a 0.35 % upvote from @drotto thanks to: @banjo.

Great article. Upvoted. Thank you for sharing. Vincent B community. Follow and upvote me Cryptoryno33.

Congratulations @arwy! You received a personal award!

1 Year on Steemit

Click here to view your Board

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @arwy! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.15
TRX 0.12
JST 0.025
BTC 55515.17
ETH 2501.35
USDT 1.00
SBD 2.30