I found a good article comparing the main aspects of two modern approaches to developing on ASP.NET.
The translation is not literal, but somewhat adapted, but completely conveys the meaning. I hope that someone who plans to use ASP.NET for their project, this information will be useful. It was this note that was taken because the author is rather open-minded about both technologies, not focusing on the benefits of one of them. For comparison, the author offers such a tool marketer as a SWOT-analysis. ')
So…
While many are starting to use ASP.NET in their projects, and Microsoft is releasing new frameworks, it is increasingly a question of which model to use - “classic ASP.NET” (called WebForms), that is, use the model proposed by - default or newly made ASP.NET MVC.Also, it seems to many that Microsoft contributes to confusion, saying that they will fully support and develop both models.And since each project can be done using WebForms and MVC, the question often arises - “what is the best for my project?” One of the good ways to answer this question is to conduct a SWOT analysis of both approaches.
ASP.NET MVC SWOT Analysis
Strengths
Offers full control over the generated HTML code;
Generates pure HTML code;
Better separation between UI and code (application logic and presentation logic);
Easier for unit testing;
Supports many different view engines (View Engines);
By default, it uses the REST approach for URLs - which is also good for SEO;
No viewstate (this can also be a disadvantage in certain cases);
The usual size of the loaded page is small;
Simple integration with jQuery frameworks.
Weaknesses (Weaknesses)
It is not based on (server) events, so it can be difficult for people who think in terms of ASP.NET WebForms to master;
The number of third-party control libraries and components is small;
No viewstate (also an advantage).
Opportunities
It allows you to use the Test Driven Development (TDD) approach - the framework is built mostly with an emphasis on TDD, so it’s much easier with MVC to write unit tests, create mock objects and intercept application execution, controlling it at all stages;
Allows you to reuse the application model with other UI-interfaces and applications.
Threats
It takes more time to start productive work with it and more time to master newcomers to web development.
ASP.NET WebForms SWOT Analysis
Strengths
Provides excellent features for RAD (Rapid Application Development, rapid application development);
Excellent support for "designer" in Visual Studio;
Ease of developing business applications that work with large amounts of data and are tied to data (data-heavy);
A huge number of third-party companies that provide ready-made libraries of controls, as well as support projects for WebForms;
The familiar Windows Forms-developers concept of events (server events for the UI), which allows you to quickly start working with this approach.
Weaknesses (Weaknesses)
The UI logic is closely related to the code and is thus difficult to separate;
It is difficult to produce unit testing, thus it is difficult to use the TDD approach;
Large (and often just huge) page sizes thanks to ViewState.
Opportunities
Great for quickly creating prototypes of business applications. This works great when you need to agree on a preliminary concept with a potential client.
Threats
It is difficult to apply different UIs to one application, despite the sufficient number of available frameworks and technologies (Master pages, themes, etc.).
Based on all these arguments, it is possible to present the decision-making process in favor of one or another approach in the following way:
Summarizing this scheme, we can make two key conclusions that determine the choice of approach:
Test Driven Development (Development with the help of tests) - life will be MUCH easier if you use MVC when using TDD practice.
Data Driven Application - life will be MUCH easier if you use WebForms while the application works with a huge amount of diverse data.
Of course, there are no unambiguous "yes" or "no" here, and each specific application can be written either one way or the other. In fact, you can even use a mixed approach by writing part of an application using WebForms, and partly using MVC (theoretically).
What do you think?
And just about the question of the author about how we think - I propose to speak in the comments. At the same time, I propose to expand the points of the SWOT-analysis on both approaches.