MVC Interview Questions

Ques. What is ASP.NET MVC?

Ans. ASP.NET MVC is a web application Framework. It is light weight and highly testable Framework. MVC separates application into three components — Model, View and Controller.

Ques. What are different version of MVC?

Ans. Mvc version 2,3,4,5,6.

Ques. What’s new in the latest version of MVC?

Ans. In MVC 6 Microsoft removed the dependency of System.Web.Dll from MVC6 because it is extremely expensive, as it typically used to consume 30K of memory per request and response, whereas now MVC 6 only requires 2K of memory per request and the response is really small memory consumption.

Ques. What are the advantages of Mvc over Asp.Net

Ans. 1)Provides a clean separation of concerns among UI (Presentation layer), model (Transfer objects/Domain Objects/Entities) and Business Logic (Controller).2)Easy to UNIT Test.3)Improved reusability of model and views. We can have multiple views which can point to the same model and vice versa.4)Improved structuring of the code.

Ques. What is Model in MVC?

Ans. Model represents domain specific data and business logic in MVC architecture. It maintains the data of the application. Model objects retrieve and store model state in the persistance store like a database. Model class holds data in public properties.

Ques. What is Controller in MVC?

Ans. Controller — Request sent by the user always scatters through controller and it’s responsibility is to redirect to the specific view using View() method

Ques. What is View in MVC?

Ans. View — It’s the presentation layer of MVC.

Ques. What is the use of MVC?

Ans. MVC segregates your project into a different segment, and it becomes easy for developers to work on It is easy to edit or change some part of your project that makes project less development and maintenance cost MVC makes your project more systematic

Post Question