Ticker

6/recent/ticker-posts

Top 20 MVC Interview Questions and Answers

What is MVC?

MVC stands for Model-View-Controller. It is a software layout pattern which became introduced within the 1970s. Also, MVC pattern forces a separation of concerns, it manner domain version and controller good judgment are decoupled from the user interface (view). As a result, protection and checking out of the software grow to be easier and easier.

2. What is ASP.NET MVC?

ASP.NET MVC is an open supply framework built on the top of the Microsoft .NET Framework to develop a web utility that permits easy separation of code. ASP.NET MVC framework is the most customizable and extensible platform shipped by using Microsoft.

3. What are the benefits of ASP.NET MVC?

There are following advantages of ASP.NET MVC over Web Forms (ASP.NET):
Separation of concern: MVC design sample divides the ASP.NET MVC software into three predominant aspects Model, View, and Controller which make it less complicated to control the software complexity.
TDD: The MVC framework brings higher assist to test-pushed development.
Extensible and pluggable: MVC framework components have been designed to be pluggable and extensible and therefore may be changed or customized less difficult than Web Forms.
Full control over application behavior: MVC framework doesn’t use View State or server-based paperwork like Web Forms. This gives the utility developer extra control over the behaviors of the software and also reduces the bandwidth of requests to the server.
ASP.NET functions are supported MVC framework is constructed on top of ASP.NET and consequently can use maximum of the capabilities that ASP.NET consist of including the provider’s architecture, authentication, and authorization scenarios, membership, and roles, caching, session and more.
URL routing mechanism: MVC framework supports a powerful URL routing mechanism that helps to build a greater comprehensible and searchable URL to your application. This mechanism helps the utility to be greater addressable from the eyes of search engines and clients and can assist in search engine optimization.

4. What is the difference among Routing and URL Rewriting?

Many developers compare routing to URL rewriting considering that each appearance similar and can be used to make search engine marketing pleasant URLs. But each the processes are very a whole lot different. The most important distinction between routing and URL rewriting is given below :
URL rewriting is targeted on mapping one URL (new URL) to every other URL (antique URL) even as routing is targeted on mapping a URL to a resource.
URL rewriting rewrites your antique URL to a brand new one even as routing by no means rewrite your vintage URL to the brand new one however it maps to the original route.

5. What is View Engine?

A View Engine is an MVC subsystem which has its personal markup syntax. It is accountable for converting the server-side template into HTML markup and rendering it to the browser. Initially, ASP.NET MVC ships with one view engine, net paperwork (ASPX) and from ASP.NET MVC3 a new view engine, Razor is introduced. With ASP.NET MVC, you could additionally use other view engines like Spark, NHaml, etc.

Post a Comment

0 Comments