Feb 21, 2014

Difference between ASP.NET MVC and ASP.NE

ASP.NET Web Forms uses Page controller pattern approach for rendering layout, whereas ASP.NET MVC uses Front controller approach. In case of Page controller approach, every page has its own controller, i.e., code-behind file that processes the request. On the other hand, in ASP.NET MVC, a common controller for all pages processes the requests.
Follow the link for the 
difference between the ASP.NET MVC and ASP.NET WebForms.




Asp.net Web Forms
Asp.Net MVC
Control over HTML
Less control over HTML generated. Example Asp.net Label will be rendered as span in chrome and IE but rendered as label tag in Mozilla.
In Asp.Net MVC Server controls are not supported so only choice left with us is using HTML controls and so we get complete control over Generated HTML.
Architecture
There is no Fixed architecture for Asp.net Web Forms.
Project structure is predefined.
Unit Testing support
Automatic unit testing of code behind classes is very difficult.
There is no code behind. We have Controller and Model classes. Both of which are simple classes so can easily be tested.
Performance
Viewstate increases the size of the page affecting performance.
No Viewstate so better performance.
Parallel development
The time when one developer will be working on ASPX, second developer may can't work on code behind (because he is unaware about the controls other developer is adding - specially id of the controls)
The time when one developer will be working on View, second developer may work on controller.
Less Learning effort
Easy to learn
Difficult when compared to Web Forms
RAD
Best for Rapid application development.
Not best one.

No comments:

Post a Comment