programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Website by URL, How to Play YouTube Videos in by using Jquery , Jquery Change div background on mouseover in , 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:


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 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

  • 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.

  • 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).

  • 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. Related Other Post:

No comments:

Post a Comment