Introduction to ASP.Net MVC

Introduction to ASP.Net MVC

This is my first blog on MVC. So what is the relation between ASP.Net and MVC?

ASP.Net is a framework for developing web applications and MVC (Model View Controller) is an architecture to arrange code in the better way.

Now a question may rise, why MVC?

As you know we were already doing development with traditional ASP.Net web forms, then what was the problem? Why we are looking for MVC architecture?

In any web application, the major factor is “Response Time”. How fast your page loads it decide the web page performance.

In ASP.Net we are using all server-side control. For eg –

<asp:TextBox ID=”txtBox1” runat=”server”/>

This control will render in as HTML because it is control which will cause an increase in load time which directly affect page performance.

In ASP.Net everything is ASPx and .cs file where three-layer architecture can be implemented.

Now let’s move to benefit of MVC. MVC has 3 sections Model, View, and Controller.

Here we can divide MVC in three-layer architecture as below.

A controller is equal to Code behind logic.

View is equivalent to ASPX/HTML page.

Model is middle layer.

In MVC, the first hit comes to the controller. Depending on the action, Controller creates the object of the model.

I will start coding/development level blog after this. Till then enjoy learning MVC.

Next Blog - First MVC Program



What's new in C# 6.0 language - All new features of C# 6.0 for developers

SharePoint Interview Questions and Answers