When it comes to the architecture design patterns, we have many options to choose from Model-View-Controller (MVC), Model-View-ViewModel (MVVM), Model-View-Presenter (MVP), and keep going… Most often what I hear from the software engineers are :
- What is MVVM?
- What is the difference between MVC, MVVM and MVP?
- How to choose between MVC and MVVM?
Although the answers are simple but to understand the concept in depth and clearly, like always, I would prefer to take a real use case as an example. Let’s think about a music search application, musicoverflow (derived from stackoverflow; hmm a long time programmer).
Fundamentally, MV(X)
Before we dive in the various variants of it, lets understand what MV(X) is? Fundamentally, all these variants, MVC, MVVM, MVP aims to segregate the duties of processing, visualization, we need to understand briefly MVC, MVP, and MVVM architecture before dive into them.
Why Model-View-(C or P or VM)?
The aim of these architectures is to separate the responsibilities of visualizing, processing, and data management for UI applications.