What are MVC, MVP and MVVM Design Patterns?
There are three types of design patterns commonly used in today’s technological generation. The MVC, MVP and MVVM. Here is a brief description about the three.
MVC Pattern
Model View Controller is defined as an architectural software pattern used for executing user interface on computers which was introduced in 1970s. It separates given software into three parts which means that controlled logic and domain model are decoupled from user interface which allows the testing and maintenance go easier.
MVC pattern splits an application basically into three parts. They are;
• Model: A model depicts the set of classes which further describes the business logic i.e. data model. It delineates the rules for business data which can be manipulated and changed further.
• View: The View depicts the User Interface modules like jQuery, CSS, html, etc. View only displays the data that is obtained from the controller as outcome.
• Controller: The Controller processes the incoming requests. Controller receives the input from the user via the View; further it processes the data with the help of Model and then sends it back to View as a result. Characteristically, it acts as a manager between Model and View.
Presently, this pattern is in common use by popular frameworks like,
• Spring Framework
• Ruby on Rails
• Apple iOS development.
MVC pattern splits an application basically into three parts. They are;
• Model: A model depicts the set of classes which further describes the business logic i.e. data model. It delineates the rules for business data which can be manipulated and changed further.
• View: The View depicts the User Interface modules like jQuery, CSS, html, etc. View only displays the data that is obtained from the controller as outcome.
• Controller: The Controller processes the incoming requests. Controller receives the input from the user via the View; further it processes the data with the help of Model and then sends it back to View as a result. Characteristically, it acts as a manager between Model and View.
Presently, this pattern is in common use by popular frameworks like,
• Spring Framework
• Ruby on Rails
• Apple iOS development.
MVP Pattern
MVP stands for Model View Pattern, which is derived from the Model View Controller architectural pattern. In this, the controller is replaced by presenter. In this, the application is broken into three aspects;
• Model: Like in previous case, the model depicts a set of classes that illustrates the business logic and data.
• View: The View is described as passive interface which displays data, and directs the event to presenter which further acts upon it.
• Presenter: The presenter retrieves the data from model and further formats it for display to the View. Presenter does not coordinate the incoming request like controller.
MVP Pattern is widely used with,
• Window forms
• ASP.NET
• Model: Like in previous case, the model depicts a set of classes that illustrates the business logic and data.
• View: The View is described as passive interface which displays data, and directs the event to presenter which further acts upon it.
• Presenter: The presenter retrieves the data from model and further formats it for display to the View. Presenter does not coordinate the incoming request like controller.
MVP Pattern is widely used with,
• Window forms
• ASP.NET
MVVM Pattern
Model View-View Model is an architectural software pattern. MVVM supports two-way data binding between View and view model. It is a value converter which enables the automatic proliferation of changes, within the View to the state of View model.
As briefed before, the Model and View in MVVM represents the business logic and UI components. While View model is accountable for commands, exposing methods and other properties that helps to preserve the state of view and to influence the model as the outcome of action in the view.
The MMVM Pattern is mostly used by;
• nRoute
• Silverlight
• WPF and
• Caliburn.
In conclusion, all of the three have some similarities and some differences. All the three have MV i.e. Model and View common with some advantage over one another.
As briefed before, the Model and View in MVVM represents the business logic and UI components. While View model is accountable for commands, exposing methods and other properties that helps to preserve the state of view and to influence the model as the outcome of action in the view.
The MMVM Pattern is mostly used by;
• nRoute
• Silverlight
• WPF and
• Caliburn.
In conclusion, all of the three have some similarities and some differences. All the three have MV i.e. Model and View common with some advantage over one another.
http://www.anarsolutions.com/mvc-mvp-mvvm-design-patterns/?utm_source=Blogger.com
No comments:
Post a Comment