ASP.Net Web forms work best for Small Sites
After months of research, I have finally decided to stick with ASP.net web forms for my web applications for now. I considered moving over to MVC, but I couldn’t find good enough reasons to switch. Web forms can do just anything I want out of the box without a lot of extensions.
While I agree ASP.Net MVC has its place, I feel it is just more bloatware. Web forms are the perfect size for small commercial ventures. To expand my reasoning, let’s look at what people say are the disadvantages of web forms.
Open Project Architecture
Web forms use an open architecture philosophy. Many developers claim this to be a downside. Personally, I say it is an advantage. You have to design your project according to the application it will serve. Web forms let you do that.
Unit testing is the only place where MVC beats web forms, but most web sites have no need for it. Especially true for small simple sites, the only testing you need online is if the page works as a whole. The modular nature of web forms lets you test new components in relation to code you know works.
ViewState and Page Performance
ViewState maintains page information across reloads of the same page. It’s useful for form elements. It adds extra information to the rendered HTML increasing the size of the page, but the performance dip is minimal if not unnoticeable. You can even turn ViewState off if your application does not need it.
Web forms are modular by design. You can reuse code through user controls and master template pages.
Web form URLs normally go to real ASPX files. If you need to pass data to them, you most likely use query string. This is no different than php. It may not be “SEO friendly”, but all web development languages do this, even MVC. SEO requires URL rewriting, and you can do it with anything. MVC just hides it.
Less control over HTML
With all these issues, I am starting to see a pattern here. All the complaints against web forms are developer errors and mistakes. I guess most developers prefer to blame their tools than their own lack of skills.
Ticking off an entire group of people aside, I see no reasons to jump on to the ASP.Net MVC bandwagon for either my own website or those I create for clients. There may be a time I will need to use MVC, but ‘tis not this day.
If you feel the same way, add your take to the comments below. You can also use it to state how much of an idiot I am.