MVC Controller vs ViewModel
Developers should learn and use MVC Controllers when building applications that require a clear separation between data handling, user interface, and control logic, such as web frameworks (e meets developers should learn viewmodel to build robust android apps that handle configuration changes without data loss, as it decouples ui state from activities or fragments. Here's our take.
MVC Controller
Developers should learn and use MVC Controllers when building applications that require a clear separation between data handling, user interface, and control logic, such as web frameworks (e
MVC Controller
Nice PickDevelopers should learn and use MVC Controllers when building applications that require a clear separation between data handling, user interface, and control logic, such as web frameworks (e
Pros
- +g
- +Related to: model-view-controller, asp-net-mvc
Cons
- -Specific tradeoffs depend on your use case
ViewModel
Developers should learn ViewModel to build robust Android apps that handle configuration changes without data loss, as it decouples UI state from activities or fragments
Pros
- +It's essential for implementing the MVVM pattern, improving code organization, and enabling easier unit testing by isolating data handling from the UI layer
- +Related to: android-jetpack, mvvm-architecture
Cons
- -Specific tradeoffs depend on your use case
The Verdict
Use MVC Controller if: You want g and can live with specific tradeoffs depend on your use case.
Use ViewModel if: You prioritize it's essential for implementing the mvvm pattern, improving code organization, and enabling easier unit testing by isolating data handling from the ui layer over what MVC Controller offers.
Developers should learn and use MVC Controllers when building applications that require a clear separation between data handling, user interface, and control logic, such as web frameworks (e
Disagree with our pick? nice@nicepick.dev