Tuesday, 22 March 2016

ASP.NET MVC Verses ASP.NET Webforms

1 comment

Why ASP.NET MVC is better than ASP.NET Webforms

Differnces between ASP.NET MVC and Webforms

This is the first question that was rised in my mind when i was started learning ASP.NET MVC.And every MVC begineer have to know that ASP.NET MVC is not an alternative to ASP.NET Webforms.But the performance of MVC is better compared to traditional asp.net web application.How it is going to happen we will discuss in this tutorial.before going to learn how MVC is better than asp.net we have to know what is MVC and what is asp.net webforms

ASP.NET Webform:

ASP.NET Webform is framework developed by microsoft in 2000 for rapid application development.By using webforms we can develop web applications rapidly with the predefined tools(like server controls).Its limits the size of the development team.

ASP.NET MVC:

ASP.NET Mvc Frame work is developed by the Microsoft in 2009.It uses a pattern based approach(Model,View,Controller) for development.It is best suitable for larger enterprise applications.It also need more number of developers.

Now we look at some of the differences between ASP.NET MVC and ASP.NET Webforms

WebForms
Asp.net MVC
1.Webforms uses traditional event driven approach.
1.Asp.net mvc uses pattern based approach
2.It is not a light weight technology.The page size is very high .
2.It is a light weight technology.
3.Compatibility with client side scripting is less
3.It supports client side technologies like javascript,jquery etc.
4.webforms have server controls for the rapid application development
4.ASP.NET MVC consists of normal html tags
and also consists of HTML helpers(these entends the functionality of traditional html elements).
5.It doen not supports Bootstrap(because it is a view based development)
5.It support bootstrap and other UI frameworks
6.webforms are processed by asp.net engine
6.It contains two view engines
a)aspx engine (used in MVC1 and MVC2)
b)Razor engine (from MVC 3 onwards it's avilable and it also worlds popular view engine).
7.It support the View state and session management on client side
7.It does not support View state and session state
8.webforms have master pages for consistent look.User controls for code re usability
8.In ASP.NETMVC also view have Master View.And partial views for code reusability.
9.Webforms have file based URL system.
9.ASP.NET MVC have controller based URL system.and the urls are clean URL's best suited for 'Search Engine Optimization'.
10.In Webforms View are tightly coupled to the code behind code.And the Modification is also difficult.
10.In ASP.NETMVC the Views and Business logic is completely seperated (it uses Seperation of Concern).
11.It is a not a open source technology
11.It is a open source technology.
12.Best suited for small enterprise applications and requires less people to development.And modifications are difficult.we can do Rapid application development.
12.Best suited for large enterprice applications.Requires more people to develop.And Modifications are done very easily.It does not support Rapid application development.

I hope u got the main differences between ASP.NET MVC and Traditional Webforms.before you going to develop any application check the requirement one and pick suitable technology based on the requirements.

I hope you understand if any comments and questions on this post i am always welcome.I feel very happy to answer you. 

1 comment: