Tuesday, October 1, 2013

Diff Between 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