Beginner from asp.net .. What should I choose web forms or mvc?

Possible duplicates:
Best Practices for Using ASP.net or MVC Web Forms
How to decide if WebForms or MVC is correct when running ASP.NET

I am new to web development and asp.net ... I was browsing the asp.net site and the number "n" here in stackoverflow regarding Webforms or MVC .... But still, as a newbie, I canโ€™t get an idea of โ€‹โ€‹what select?

  • What should I choose web forms or mvc?
  • If MVC, what should I know before starting with it?
  • If web forms, what should I know before starting with it?
+4
source share
4 answers

In terms of specific reasons for considering web forms for new projects:

1) If you use SharePoint. Today, SharePoint sites more naturally integrate Web Parts / Web Parts into them. The SharePoint team would like to add MVC support in the future, but if your site / solution integrates with SharePoint today or a new version is released, you will find Web Forms easier to do this.

2) If you are creating an application in which an existing server control or a set of server controls can provide more functionality. This is true for many reporting scenarios (where you can use chart controls), as well as data editing scenarios using grids (where you can use data controls). There is also a rich set of server-side controls that have built-in AJAX features that many developers find really useful for common scripts.

3) When you create an application (usually based on an intranet), where you need to support older browsers or have strict accessibility requirements that exclude the modern JavaScript framework, and therefore must host a lot of user interface logic on the server. If you donโ€™t care about SEO (because itโ€™s an intranet application) and donโ€™t care about full control over your HTML, then using controls with built-in functionality can provide performance.

In terms of specific reasons for considering MVC for new projects:

1) If you are creating a public website where SEO, semantic URL / HTML and full control over HTML are important. Although ASP.NET 4 provides many new features for web forms to enable this, MVC still provides more control.

2) If you need to use the TDD workflow and / or easily unit test your application. Although you can use the MVP template with web forms, MVC provides a basic approach that naturally supports this.

3) If you want to create a heavy application on the AJAX side, general control over the HTML / URLs provided by MVC can be an advantage. You can still accomplish this with web forms (especially with ASP.NET 4), but if you want MVC client-side overall JS control to be probably more attractive.

4) If you want to customize / extend almost every level of the web framework, ASP.NET MVC provides the necessary hooks for this. If you want a different viewing mechanism, integrate the IOC container, etc. - then MVC provides some nice hooks.

From the comments section:

http://weblogs.asp.net/scottgu/archive/2010/01/24/about-technical-debates-both-in-general-and-regarding-asp-net-web-forms-and-asp-net- mvc-in-particular.aspx

+9
source

Web Forms might be the best choice if you are creating an intranet site with a lot of data editing.

http://www.asp.net/web-forms/

ASP.NET MVC might be the best choice if you are building a test website that focuses on HTML, performance, and scalability.

http://www.asp.net/mvc/

0
source

Both things are preferable for development, but depends on your scenario that you develop. If you are developing a new idea with rapid development, I suggest using MVC. In MVC, your code is manageable and customizable. MVC is scalable and has no performance issues.

I would prefer MVC as an ideal development methodology / template.

-1
source

Source: https://habr.com/ru/post/1308203/


All Articles