In Part1, I discussed the basics of what the MVC pattern is and how Microsoft has incorporated MVC into ASP.NET. In this segment, I am going to discuss some general advantages of ASP.NET Web Forms and ASP.NET MVC. Neither flavor of ASP.NET will be the superior choice in all circumstances. Therefore knowing the advantages to each will help.
I’ve found through my development career that there’s never a right or wrong way to do something. Scott Guthrie posted recently the following which is very true, “Great developers using bad tools/frameworks can make great apps.” The same principal applies to bad developers using great tools/frameworks… inevitably they will create bad applications. Just because one framework may shine better in certain situations may not mean its better. If the developers using the superior technology cannot grasp or develop it properly, its full potential will not be realized. So keep these principals in mind when evaluating the two.
Advantages of ASP.NET MVC
1) Separation of model, view, controller results in reduction of complexity, promotes parallel development, and easier to maintain.
2) Enables full control over rendered HTML (leaner html rendering).
3) Works much better with automated testing as all core contracts are interface based. You can run unit-tests without having to run the controllers under an ASP.NET process.
4) Does not use view state or postbacks (no view stage = quicker load times).
5) Framework is very extensible and pluggable.
6) Supports existing markup (aspx, master pages, ascx, inline expressions).
7) Supports existing session, caching, authentication, etc.
9) Follows the design of a stateless web.
Advantages of ASP.NET Web Forms
1) Commonality between windows forms development in that it uses the event model.
2) Usage of view state and server forms helps manage state more easily.
3) Promotes RAD more so than MVC as more controls/components are available.
4) Less complex than MVC and generally requires less code.
5) More mature as it’s been around since the 1990’s.
ASP.NET MVC Overview Part 1 (General ASP.NET MVC Overview)
ASP.NET MVC Overview Part 2 (Advantages of MVC and Web Forms)
ASP.NET MVC First Impressions