Considering ASP.NET Web Forms or ASP.NET MVC

Spread the love

In this paper I’ll ultimately discuss, from a high level, what ASP.NET Web Forms version is as well as how it compares with ASP.NET MVC. I’ll discuss some pros and cons of both; the purposes these could be used for and ultimately how a developer should consider choosing between selecting ASP.NET MVC and ASP.NET Web forms for a project. ASP.NET MVC is not a complete overhaul of ASP.NET Web Forms and there are a few possibilities for using each, as well as a few factors to carefully consider when choosing which to use for your project.

Firstly, let’s discuss what each is; “ASP.NET MVC is a Microsoft’s one more Web application framework designed with separation of concerns and testability in mind. It is built on CLR and completely based on MVC architecture and so we think in terms of controllers and Views. ASP.NET doesn’t have support for ViewState and server controls, so we get feel of old web here. Let’s talk about Advantages and disadvantages of ASP.NET MVC” – describes Marla Sukesh, in his article titled ‘WebForms vs. MVC’ posted on codeproject.com. MVC certainly sounds like the future in terms of web application building, both for structure, separate presentation from functionality for maintenance as well as allowing a secure environment for data to pass. Now, the Microsoft Docs describe ASP.NET Web Forms as; ‘ASP.NET Web Forms is a part of the ASP.NET web application framework and is included with Visual Studio. It is one of the four programming models you can use to create ASP.NET web applications, the others are ASP.NET MVC, ASP.NET Web Pages, and ASP.NET Single Page Applications.’ in details further down the documentation it illustrates ‘Using Visual Studio, you can create ASP.NET Web Forms. The Visual Studio Integrated Development Environment (IDE) lets you drag and drop server controls to lay out your Web Forms page. You can then easily set properties, methods, and events for controls on the page or for the page itself. These properties, methods, and events are used to define the web page’s behavior, look and feel, and so on. To write server code to handle the logic for the page, you can use a .NET language like Visual Basic or C#.’

Some benefits of using or choosing ASP.NET Web Forms; include better SharePoint integration, rich set of server-side controls that have AJAX functionality built within for rapid and easier use, as well as other built in functionalities on the server side if SEO is not a concern. A potential Web Form con is, In Web Forms ‘code behind’ ends up with lots of event handlers, making automatic unit testing an impossible task. Benefits of ASP.net MVC are commonly touted as ‘great for SEO, semantic URL/HTML handling, and complete control of presentation layer such as HTML, If you want to build a heavy AJAX client-side app, the total control over the HTML/URLs provided by MVC can be an advantage, it is also said to be a much better choice for tasks such as unit testing. If you want the ability to customize almost any layer of the web-framework, ASP.NET MVC provides the hooks necessary to-do so. Want a different view engine, integrate an IOC container, etc – then MVC provides some nice hooks.

So, what do we get from this? Ultimately ASP.NET Web Forms appears to be a more mature, cost effective approach that allows for faster or more rapid application development. Where as ASP.NET MVC is said to be much better for control, organization and structure; as well as being the more progressive option and a much better choice for things like ‘unit testing’. All in all, as always, it appears the choice is ‘it depends on the project and specs’. If you need to get out a smaller web application, with a lot less time or resources, and you don’t plan on doing much with for a while; or it’s single use type application, possibly Web Forms may be a better option. If content and functionality separation is vital to you for SEO, scalability, maintenance, or security; or you may have a larger web project with many developers involved with a few life cycles predicted, MVC may be the better and more intelligent option for this application while planning ahead at it’s life cycles and growth. Other things like functionality and web technologies used, should also be considered when choosing which route to go. However, if it came to a close choice between the two, I would sway much more toward the ASP.NET MVC as I believe it is the more modern and progressive option for many scenarios.

References:

.NET Web Forms vs. MVC: Which is Better? (2017, September 19). Retrieved from https://www.seguetech.com/net-web-forms-vs-mvc/

Difference between ASP.NET WebForms and ASP.NET MVC. (2018, February 15). Retrieved from http://www.webdevelopmenthelp.net/2013/10/difference-between-asp-net-webform-and-asp-net-mvc.html

Sukesh, M. (n.d.). WebForms vs. MVC. Retrieved from https://www.codeproject.com/Articles/528117/WebForms-vs-MVC

R. (n.d.). What is Web Forms. Retrieved from https://docs.microsoft.com/en-us/aspnet/web-forms/what-is-web-forms

Stack Overflow, Enthusiastic Programmers
http://www.stackoverflow.com

Considering ASP.NET Web Forms or ASP.NET MVC

Considering ASP.NET Web Forms or ASP.NET MVC

Leave a Reply

Your email address will not be published. Required fields are marked *