What Is the Difference between MVC and MVVM (for Flutter)?
If you ask n people about the difference between MVC (Model-View-Controller) and MVVM (Model-View-ViewModel) you get at least n^n different opinions of what it is. Even Allen Wyma, the host of the podcast “Flying high with flutter,” and his guest Richard Coutts, the creator and maintainer of the MVVM+ package (a package that implements the MVVM pattern for Flutter), admit that even for them it is hard to get the difference. But how should a student, aspiring coder, or entrepreneurial tech enthusiast understand this topic, if even experts find it hard to articulate the difference?
In this article, I will give you a better understanding of MVVM and MVC by explaining both patterns and giving you a counter-app implementation of both patterns in Flutter.
Settling on definitions
One issue with understanding MVC and MVVM is that different definitions of each pattern exist which vary in minor and major aspects. To understand differences we need to settle on one definition for each pattern that we compare.
Following, I will refer to the MVC definition by Glenn E. Krasner and Stephen T. Pope (1988) who further developed the original pattern coined by Trygve Reenskau…