2
Reply

.NET and ASP.NET interview questions: What is MVC, MVP and MVVM pattern?

Shivprasad Koirala

Shivprasad Koirala

Jul 04, 2011
12.7k
0

    Nice catch

    Dmitry Pavlov
    May 07, 2012
    0

    Answer:
     

    MVC, MVP and MVVM are design patterns which come under the presentation pattern category and they help to remove any kind of cluttered code in UI like manipulation of user interfaces and maintaining state. Thus keeping your UI code cleaner and better to maintain.

    MVC(Model view controller) pattern divides the architecture into 3 parts model, view and controller. The first request comes to the controller and the controller then decides which view to be displayed and ties up the model with the view accordingly.

    MVP (Model view presenter) has the same goals as MVC i.e. separating the UI from the model. It does the same by using a presenter class. The UI talks via an interface to the presenter class and the presenter class talks with the model.

    MVVM is an architectural pattern with the focus of removing UI cluttered code. It does the same by using an extra class called as view model. MVVM is mostly suitable for Silverlight and WPF projects because of the rich bindings provided by the technologies.

    Following you can see step by step video to create simple application using ASP.NET MVC template:



    Shivprasad Koirala
    July 04, 2011
    0