Asp.net programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this Asp.net and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Asp.net Website by URL, How to Play YouTube Videos in Asp.net by using Jquery , Jquery Change div background on mouseover in asp.net , JQuery UI Datepicker (Calendar) etc.

Saturday, December 6, 2014

What is the difference between MVC,MVP and MVVM in .NET

What is the difference between MVC,MVP and MVVM in .NET:



MVC, MVP And MVVM:

In this post we want to describe the basic difference between MVC framework and MVP and MVVM. In my privies posts we give many related to the MVC some are list here.


Difference between MVC and MVVM and MVP:

In the MVC here the first hit comes on the controller and the go to the view or model and so the information to user.

But in MVP here the first hit comes to the UI(user interface) and then the UI interact to presenter class who talk to the model. The MVP refers to the Model view presenter. It has the same goals as MVC.

And in the MVVM here the first hit comes to the UI and UI talk to the model by a separate class as view model. Rich the binding are used by the view model class to communicate to the model thus keeping the UI code clean. Again the MVVM is architectural pattern with the focus of removing UI cluttered code.

Basically the MVC good for the web application development in asp.net. And the MVP for the windows application development.


The MVVM is good for the silverLight and the WPF projects as they have binding.


What is the difference between MVC,MVP and MVVM in .NET


MVC:
  • Use in situations where the connection between the view and the rest of the program is not always available (and you can’t effectively employ MVVM or MVP).
  • This clearly describes the situation where a web API is separated from the data sent to the client browsers.  Microsoft’s ASP.NET MVC is a great tool for managing such situations and provides a very clear MVC framework.


MVP:
  • Use in situations where binding via a data context is not possible.
  • Windows Forms is a perfect example of this.  In order to separate the view from the model, a presenter is needed.  Since the view cannot directly bind to the presenter, information must be passed to it view an interface (IView).

MVVM:
  • Use in situations where binding via a data context is possible.  Why?  The various IView interfaces for each view are removed which means less code to maintain.
  • Some examples where MVVM is possible include WPF and JavaScript projects using Knockout.



Asp.net Related Other Post:






No comments:

Post a Comment