Comparing MVC, MVP, and MVVM
The MVC, MVP, and MVVM patterns share the same concepts of the View and the Model. However, their relationships and ways of communication are different.
In MVC, one Controller has access to multiple Views and usually calls the functions of View directly. The View and the Model are tightly coupled. User inputs are handled by the Controller. Unit testing is limited to the Model on business logic only. Modifying the View or the Model would require changing the Controller as well. It is suitable for small projects only because the code footprint is the smallest.
In MVP, one Presenter manages at least one View. The View and the Model have no knowledge about the Presenter, but they communicate with the Presenter using callback functions. Also, the View and the Model are decoupled. User inputs are handled by the View, and then the View invokes the callback function provided by the Presenter. Unit testing can be done in the Model on business logic. The behaviors...