MVC Interview Questions

Ques 1. Explain ASP.NET MVC?

Ans. MVC is a framework pattern that splits an application’s implementation logic into three component roles: models, views, and controllers. • Model: The business entity on which the overall application operates. Many applications use a persistent storage mechanism (such as a database) to store data. MVC does not specifically mention the data access layer because it is understood to be encapsulated by the Model. • View: The user interface that renders the Model into a form of interaction. • Controller: Handles a request from a View and updates the Model that results in a change of the Model's state. To implement MVC in .NET we need mainly three classes (View, Controller and the Model).

Ques 2. 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 3. What are different version of MVC?

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

Ques 4. What are the features of MVC5?

Ans. • Scaffolding • ASP.NET Identity • One ASP.NET • Bootstrap • Attribute Routing • Filter Overrides

Ques 5. What are the features of MVC5?

Ans. • Scaffolding • ASP.NET Identity • One ASP.NET • Bootstrap • Attribute Routing • Filter Overrides

Ques 6. 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 7. 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 8. In which version of ASP.NET MVC was bundling and minification techniques introduced?

Ans. ASP.NET MVC4 and .NET Framework 4.5

Ques 9. What is bundling and minification in ASP.NET MVC?

Ans. Bundling: It bundles multiple files into a single file. You can create CSS, JavaScript and other bundles. Fewer files mean fewer HTTP requests that can improve first page load performance. Minification: Minification does a variety of code optimizations for scripts or CSS, such as removing unnecessary white space and comments and shortening variable names to one character.

Ques 10. 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.

Post Question Details

Ques. rx8nas

Posted On:9/21/2022 7:04:16 PM

Ques. What is Storage Model?

Posted On:5/7/2020 11:57:18 AM