VIPER Design pattern in iOS

in vincentb •  7 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/

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

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

All the best.. Steem on

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!