01 Aug Comparison between ASP.NET MVC or ASP.NET Web Forms
A lot of discussion going on which one to be preferred, the new Model View Controller (MVC) technology or Web Forms for Microsoft based web application development technology.
Let’s compare and figure out:
Following are the advantages of ASP.NET MVC over Web Forms:
- Absence of statefulness and ViewState makes the page lighter compared to WebForms
- Shorter page life-cycle makes it easy to understand and less complex
- Higher control over HTML means compliance with evolving standards like Web2.0
- Higher control over HTML also means developers find it easier in building Ajax applications, and adding more interactivity and responsiveness to existing applications
- Modification takes less time to implement as there is separation between UI and business layers
- Having option to accommodate more than one form in a single page is a clear advantage
- TDD is easier to implement as it does not relies on event handlers which are only fired in web contexts, when a form is posted or a page is requested
- MVC framework decouples the components and makes use of interfaces, which makes it easier to test individual components in isolation from the rest of the framework
- It’s efficient for large application specially those follows agile methodologies for development
- URLs tend to be much more SEO-friendly, if you design your controllers and actions properly
Following are the advantages of Web Forms over ASP.NET MVC:
- Easy to learn for most of the developers regardless of their background in development
- Higher number of active developers compared to ASP.NET MVC as the technology is relatively old
- Since it uses controls, it is easier to inherit that means you can reuse controls made for other application
- For developers increase in productivity is a definite plus
- Developer with higher competence in HTML,DOM, and CSS is not mandatory as most of it is handled by controls
- Easier to achieve data persistence between requests due to statefulness and ViewState
- RAD(Rapid Application Development) with drag & drop controls means you do not need to code much
- It is faster to implement validation on controls as they are generated automatically
- Programmatic access to the UI elements makes it easier to implement SharePoint
The framework chosen should be based upon the requirements and resources of the company doing the development. If you want to have a faster development cycle than Web Forms might be the best option. If time, money, and energy to develop an application from the scratch is not a constraint then MVC could potentially be the better option.
Andolasoft has extensive experience with both frameworks and would be more than happy to help you to decide your development decisions.
Recommended Blog: Rails-Things you must know about TDD and BDD
Do you like this blog? I’d love to hear something from you. Thanks for sharing your comments.