Disclaimer
What is MVC(Model view controller)?
Can you explain the complete flow of MVC?
Is MVC suitable for both windows and web application?
What are the benefits of using MVC?
Is MVC different from a 3 layered architecture?
What is the latest version of MVC?
What is the difference between each version of MVC?
What are routing in MVC?
Where is the route mapping code written?
Can we map multiple URL’s to the same action?
How can we navigate from one view to other view using hyperlink?
How can we restrict MVC actions to be invoked only by GET or POST?
How can we maintain session in MVC?
What is the difference between tempdata,viewdata and viewbag?
What are partial views in MVC?
How did you create partial view and consume the same?
How can we do validations in MVC?
Can we display all errors in one go?
How can we enable data annotation validation on client side?
What is razor in MVC?
Why razor when we already had ASPX?
So which is a better fit Razor or ASPX?
How can you do authentication and authorization in MVC?
How to implement windows authentication for MVC?
How do you implement forms authentication in MVC?
How to implement Ajax in MVC?
What kind of events can be tracked in AJAX?
What is the difference between “ActionResult” and “ViewResult”?
What are the different types of results in MVC?
What are “ActionFilters”in MVC?
Can we create our custom view engine using MVC?
How to send result back in JSON format in MVC?
What is “WebAPI”?
But WCF SOAP also does the same thing, so how does “WebAPI” differ?
With WCF also you can implement REST,So why "WebAPI"
Disclaimer
By reading these MVC interview question it does not mean you will go and clear MVC interviews. The whole purpose of this article is to quickly brush up your MVC knowledge before you for the MVC interviews.
This article does not teach MVC, it’s a last minute revision sheet before going for MVC interviews.
In case you want to learn MVC from scratch start by reading Learn MVC ( Model view controller) step by step 7 daysor you can also start with my step by step MVC ( Model view controller) video series from youtube.
What is MVC(Model view controller)?
MVC is architectural pattern which separates the representation and the user interaction. It’s divided in three broader sections, “Model”, “View” and “Controller”. Below is how each one of them handles the task.
The “View” is responsible for look and feel.
“Model” represents the real world object and provides data to the “View”.
The “Controller” is responsible to take the end user request and load the appropriate “Model” and “View”.
Figure: - MVC (Model view controller)
Can you explain the complete flow of MVC?
Below are the steps how control flows in MVC (Model, view and controller) architecture:-
All end user requests are first sent to the controller.
The controller depending on the request decides which model to load. The controller loads the model and attaches the model with the appropriate view.
The final view is then attached with the model data and sent as a response to the end user on the browser.
Is MVC suitable for both windows and web application?
MVC architecture is suited for web application than windows. For window application MVP i.e. “Model view presenter” is more applicable.IfyouareusingWPFandSLMVVMismoresuitableduetobindings.
