Lately I have come across 2 frameworks that are quite similar, as it is out from ASP.NET, it is quite a hard choice to choose which framework is suitable to develop the system. What is the constraints and requirements need to be consider? Well I have done some reading in it and I will post it below:
so what is the difference between them?
ASP.NET MVC Vs ASP.NET Web Form
|ASP.NET MVC||ASP.NET Web Form|
|1||Unit testing (TDD)||Able||It is impossible to be perform because the page life cycle of the Web Form is too complex and has the tightly coupling between all things in the ASP.net framework and a single class is used both to display output and handles user input.|
|2||Viewstate, Postback, server control,server based form to enable full
control over the application and
|No, able to follow agile methodologies and practices since web is a stateless things||Yes, sometimes even small size of web page may affect the performance of the application|
|3||Make search engine optimization(SEO) URLs publish by application||Able, Use Representational state transfer (REST) based URL||Not able, Use file-name extension|
|4||.Net Framework supported||.Net Framework 3.5||.Net Framework 2.0|
|5||Allow to build highly testable, maintainable loosely coupled applications (test driven development)||RAD development|
|7||Good for public face application||Good choice for small projects, build quick application with less than 1000 users|
|8||Powerful to add admin stuff and things that render to thousands of users|
1. Do you need test driven development?
-web form use single file for all 3 roles which makes testing complicated
-MVC, we can test controller or model separately using other testing framework
2. Is it important to have URL mapping?
-MVC, not associated with some page, physically stored on server, this makes URL mapping easier which is good for search engine optimization (SEO).
-web form, does support MVC features, every user request is associated with some .aspx page.
3. Support multiple views?
-MVC, multiple views can work with single model or controller. Then for different clients you can use different views. Different browser or older version of browser may need different view, this make application not that complex, and easy to maintain.
4. Is the need of separation a concern?
-web form, all code is in single file, making it so complex
-MVC, data access code is in model, output in view, code for user interaction in controller make application less complex and easy for testing
5. Do you need complete control over generated HTML output?
And here is the swot analysis:
So here are some information that able to help you to make the decision. But you do not need to be a technical-framework-nazi, sticking to one of them. It is ok for both, depends on the requirements and the methodology you are using for developing the application.