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/
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!
Click here to view your Board
Congratulations @arwy! You received a personal award!
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!