ASP.NET MVC Basics: Part 2


Introduction

In my last article we saw some basics of MVC. In that we saw What is MVC? In this article we will see How MVC is different from ASP.NET? By reading my last article I think you are clear about what MVC is. So let's start with how it is different from ASP.Net.

To differentiate the ASP.Net and MCV we have to first see what is ASP.Net? How do ASP.Net pages are execute? From the following diagram you will get clear idea of What is ASP.Net?

mvc1.bmp

Everyone is familiar with the diagram shown above. I think so, so there is no need to explain more about it. Next we will see how the server is handling requests and responses in ASP.Net. See the following diagram which everybody knows.

mvc2.bmp

From the above diagram it is clear to you the ASP.Net execution and design pattern. We are all use this pattern to design our ASP.Net webpages. I know you all are familiar with above structure but for better differentiating ASP.Net MVC this explanation is required. I'm not going to bore you with this; next we will see the MVC structure and from the structure yourself only can dedifferentiate the ASP.Net and ASP.Net with MVC.

What Is MVC?

1. Architectural/presentation design pattern

2. Separates model from presentation

3. Adds specific responsibility to portions of your UI

What Is ASP.Net MVC? 

1. New web application framework

2. ASP.NET implementation of MVC

3. Makes unit testing web applications simpler

4. Replaceable pipeline components

5. Enables logical mapping of URLs to controllers

From the last diagram and the above points it is clear to you what ASP.Net is and what ASP.Net MVC is. We have seen ASP.Net request and response handling but in ASP.Net MVC it is something different, not like the previous; just see the following figure how ASP.Net MVC is handling requests and responses.

mvc3.bmp

How Does ASP.NET MVC Differ From ASP.NET WebForms?

1. No postbacks

2. No view state/control state

3. No server-side form

4. No page/control lifecycle

What Do They Have In Common?

1. Visual Studio web designer

2. Master pages

3. Membership/Roles/Profile providers

4. Caching

5. Other non ui services of ASP.Net

Conclusion

From the above discussion and diagrams it is clear to you how ASP.Net MVC is different than ASP.Net. In my next article we will see the execution of an ASP.Net MVC application.

Up Next
    Ebook Download
    View all
    Learn
    View all