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 better way.

Now 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 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 asp.net control which will cause 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.

Controller is equal to Code behind logic.

View is equivalent to ASPX/HTML page.

Model is middle layer.

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

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

Comments

Popular

C# 6.0 New Features

SharePoint Interview Questions and Answers

Calling ASP.Net WebMethod using jQuery AJAX

What is Cloud Computing - A guide for beginners