MVC:
In MVC , M is a model which can hold logic to persists the data. V represents view it just responsible to display data and C is controller .
C Is heart for the MVC. Controller is responsible to handle the incoming request and invoke the corresponding view by passing the model.
Controller can call multiple view by as per business logic .
MVP:
In MVP , P stands for presenter and Controller is replaced by Presenter. Presenter is not responsible to handle the input request. Presenter and View communicates with each other
thorough some interface. Presenter is responsible for handling all the requests made by the view and Communicate with model and updates the view. In MVP , The Presenter
should associated with one View.
MVVM:
In MVVM, VM view model is same as Presenter But VM can have multiple views. View has a reference to ViewModel and it supports two way binding.
All above design patterns are used to implement loosely coupled system which allows us achieve extendibility, testability and scalability .
No comments:
Post a Comment