Fairway Technologies Blog

blog

MVC, Web Forms, or Client-Side Technologies?

In Insider No Comments

It seems like everywhere you read, everyone is talking about using Angular, Bootstrap, or MVC to create web applications. But what about programmers still working in Web Forms? You want to continue to use Web Forms and still build mobile web apps, use jQuery, Angular and Bootstrap. Not to fear, Web Forms is not dead, and nearly everything you can do in MVC, you can also do in Web Forms. Web Forms can also use client-side frameworks just as well as MVC.

MVC Advantages

Many programmers feel they have to choose one technology over another. But, there is really no reason you can’t program in both MVC and Web Forms and use each for what they are good at. Many MVC programmers give many reasons why you should use MVC as opposed to Web Forms. The reasons I hear more often are:

 

  1. Fine control over the HTML generated
  2. Ability to unit test
  3. Can control the "id" attribute generated
  4. Easier to use jQuery and JavaScript because no generated "id" attribute
  5. Ability to use Friendly URLs
  6. No ViewState sent to client

 

Web Forms Advantages

Of course, programmers that like Web Forms have many reasons why they want to stick with it:

 

  1. Rapid Application Development
  2. Less code to write because of rich server controls
  3. Lots of server controls to choose from
  4. Great third-party support
  5. Easy to preserve state
  6. They like the event driven model
  7. Hides the complexity of the web

 

Client-Side Advantages

Of course there are many advantages to using client-side code as well.

 

  1. Very fast
  2. Greatly reduces the need for post-backs
  3. No hiding of web behind any server-side technologies
  4. Lots of frameworks to help you develop

 

Which One to Choose?

Each of the technologies above has disadvantages as well. The best part is, you do not need to just choose one. You can have the majority of your web application written in Web Forms and still start using client-side technologies like jQuery and Angular. You can also start adding new pages in MVC and these can integrate with your Web Forms pages with no problems.
 
Almost all of the advantages outlined above for using MVC can also be accomplished in Web Forms as well. You might have to slightly modify the way you work in Web Forms, but it can be done. Both technologies use ASP.NET, so the engine is the same. If you wish to just stick with Web Forms, then do that. If you want to learn more about having Web Forms take advantage of MVC-like features, read my old blog post called Web Forms is Not Dead located at http://bit.ly/2ehCTP1.
 

Using Angular

Many Web Forms developers ask about Angular and using it in their Web Forms apps. The great thing about Angular is you can easily add it to your Web Forms or MVC application. You will most typically use Angular for new pages that you wish to create in your existing application, or to replace slow performing pages. This means you will probably start with a plain old HTML page and then add your Angular code to that.

Summary

It is up to you which technologies you are going to use when developing your web applications. Using ASP.NET Web Forms or MVC are both good choices and both can be made to run quickly or slowly depending on how you code it. Taking advantage of client-side technologies such as Angular and jQuery can give you a performance boost. If you need help with any migration or learning any of these technologies, please contact PDSA and we will be glad to help.

Plan Your Technology Team with This Online Assessment Tool

Subscribe to Email Updates

Build a Technology Dream Team. Start with This Online Assessment. →