Modelviewviewmodel (MVVM) is a software architectural pattern. MVVM is a variation of Martin Fowler"s Presentation Model design pattern. Like Fowler"s Presentation Model, MVVM abstracts a view"s state and behavior.
Model refers either to a domain model, which represents real state content (an object-oriented approach), or to the data access layer, which represents content (a data-centric approach).
The view model is an abstraction of the view exposing public properties and commands. Instead of the controller of the MVC pattern, or the presenter of the MVP pattern, MVVM has a binder. In the view model, the binder mediates communication between the view and the data binder.[clarification needed] The view model has been described as a state of the data in the model.
Declarative data- and command-binding are implicit in the MVVM pattern. In the Microsoft solution stack, the binder is a markup language called XAML. The binder frees the developer from being obliged to write boiler-plate logic to synchronize the view model and view. When implemented outside of the Microsoft stack the presence of a declarative data binding technology is a key enabler of the pattern.
MVC Pattern stands for Model-View-Controller Pattern. This pattern is used to separate application"s concerns. Model - Model represents an object or JAVA POJO carrying data. It can also have logic to update controller if its data changes.
The central component of MVC, the model, captures the behavior of the application in terms of its problem domain, independent of the user interface.
The model directly manages the data, logic and rules of the application.
A view can be any output representation of information, such as a chart or a diagram. Multiple views of the same information are possible, such as a bar chart for management and a tabular view for accountants.
The third part, the controller, accepts input and converts it to commands for the model or view.