Member-only story
Why Provider And Not MVVM
Why Provider and Not MVVM as app architecture is one of the questions you need to ask to fully understand what is different about Flutter app architecture from other front end frameworks.
What Is MVVM
Model-View-And-ViewModel is a Microsoft invention for ASPNET. It’s a variation of Martin Fowler’s presentation Model design pattern. It uses property value object communication between the view and the view-model> Here let me show you an example in flutter.
Notice anything wrong? Ahem, the property-value binding has directly coupled the view to the view-model. If the framework was only for mobile apps we might get away with that as medium-sized mobile apps usually do not re-use a viewmodel for a different view in a different app screen.
But, in big mobile apps and desktop and web apps we have the problem of how to decouple the relationship between the view and view-model so that we can re-use the view-model in a new app screen view-page.
Now, let me show you a provider example.