Posts

Showing posts with the label VIPER

UI-based Application Architecture

Image
For reducing coupling between model, view and business logic to increase unit testing compatibility different architectures are used. I am studying in the perspective of ios platform. MVC: Model-View-Controller Model:  Model classes are just data structure and manager of data structures like core data model classes and user-defined all model classes. The handler of core data models and json parser. View:  Storyboards, xibs, UIView classes, Controller: UIViewController classes. which contain all business logic and presentation logic so this becomes a clumsy class and incompatible for unit testing. MVP: Model-View-Presenter Presenter - For solving the problems with Controller of MVC presenter is used in MVP. The controller class is partitioned in different view classes with its own business logic so controller class is reduced in smaller size in presenter pattern.  But this also breaks SRP and unit testing problem does not solve yet using pre...