Friday, November 18, 2011

Why should we use MVC vs normal ASP.NET

There are various positive points to moving towards MVC

1. SEO friendly URL by design (though now this is possible in ASP.NET 4 as well)
2. No ViewState (this may seem a bit of moving backward to some), but overall a good design decision.
3. Clean View Markup (no additional HTML emitted)
4. 100% extensible. You can add your own controller with IOC, switch view engines at will, control model binding at wish etc.
5. Rich UI support (possible through client side JS libraries like jQuery UI and others). Telerik has released some controls for MVC which includes Grid control as well (which are merely HTMLHelpers)
6. Session, JS, Ajax works. Validation is even more powerful with DataAnnotations and jquery.
7. Is MVC faster? Yes by default because of lack of viewstate and clean markup. But performance is subject and MVC by design is more performant that traditional ASP.NET webforms (though webforms can be made as fast as required.
8. Out of the box support for mitigating antiforgery attacks and XSS vulnerability (though asp.net does has this to some extent)
9. Out of the box minimal IOC support.
10. Full control over rendered HTML

No comments:

Post a Comment