Since Microsoft joined the MVC foray with ASP.NET MVC (other options existed previously, such as Monorail) I’ve personally witnessed (and been part of ) a lot of MVC vs. WebForms discussions. Usually these discussions end up with opposite sides taking their ball and going home in a pissed-off offended rage. Usually the WebForm fans snicker and say “Why change whats broken, I have X number of users and I make X money off of my app which has X % of uptime and it work great!”, etc etc etc. They’re right. Why change it? The MVC folks usually reply with “What about standards, ease of use, integration, ease of use with js frameworks, restful architectures, separation of concerns, SOLID, maintainability, and testability as well as a working app”? They’re also right. What about those things the MVC fans talk about? Most of those things require you jump through some hoops to do them in WebForms. Some of these problems were solved long ago by some smart WebForms people. Thats the counter argument. But then again all programming problems have a common counter argument – Hasnt everything already been solved by Lisp and Smalltalk (or so the saying goes)?
Each side of this arguments has their own opinion and their own valid points. So be it. Learn to live with it.
Personally, I’m a HUGE ASP.NET MVC advocate. However I’m realistic in my thought process and I use the right tool for the right job.
Here’s a perfect example: This last weekend I helped lead the Twin Cities GiveCamp team to a successful web project implementation for the Animal Humane Society. The solution was a web application. Almost everyone I know would say “Oh cool! You did a nice fancy MVC App right?!” Nope. Sure didnt. Myself and the team agreed that while MVC was what WE as a group wanted to do, it wasnt the right thing for the job.
We had 48 hours to create a solution for the non-profit. We needed simple app that was forms over data and we also needed to make sure that anyone who maintains this code base in the future would be able to update it. With not everyone knowing asp.net mvc we chose WebForms. Everyone on the team knew WebForms and how it worked. If we went with MVC I think the solution might have have been cleaner, but I do feel we would have NOT completed the job on time. In the end the MVC learning curve was too much for the team. Therefore in this instance, MVC was not the correct choice. We ended up using ASP.NET 3.5 WebForms, jQuery, and some other controls to get the job done. It worked out great and we’re in the process of setting the client up with a hosting account with DiscountASP.NET so they can start using the app as soon as possilbe. Choosing web forms allowed us to get the app done save their organizatoin time and money which allows them to improve treatment and facilities for the animals (which is the real end goal). If we chose MVC we most likely would not have finished and the entire event would have been a failure. No business problem solved, plain and simple.
The proof is in the pudding: Use what works best for the given problem … and really … who cares what technology you use to implement a given solution. If it doesnt work, you failed. If it works, you succeeded. This holds true if you’re using ASP.NET vs. Rails vs. PHP vs. JSP. In the end, ship working software. Otherwise, you’ve taken a long ride on the dreaded fail train.
What I’m trying to say is … do what you need to do to get the job done. Don’t be a technical-framework-nazi. If you love ASP.NET MVC, cool! If you love WebForms, cool! Get the job done, get paid, pay your bills and go home and spend time with your family.
What’s a big deal to you today, won’t be a year from now. Remember, no one ever laid down in their deathbed thinking “Ya know what, I should have used ASP.NET MVC for that one project.”
Robz says
Dude, I couldn't agree with you more on this one.
Todd says
Wow, you made that website in 48 hours? Impressive. Also, thank you for not being a framework nazi. Developers need to remember that users don't know / care what framework you are using. They just want it to work.
Justice~! says
“Remember, no one ever laid down in their deathbed thinking “Ya know what, I should have used ASP.NET MVC for that one project.”
I would! MVC rules!!
data recovery says
I use microsoft dotnet framework for all kind of applications.
Michael says
I recently lost a web job, because it was taking too long to code in MVC. I'm going to my deathbed saying, “I should have code that in WebForms.”
Spider252 says
great post. This also hold true to linq vs stored procedures. People who have a lifetimes worth of database experience may find it faster to write scripts in the database and hate the lack of left joins, horrible debugger, and backwards writting of linq. On the other hand the new kid on the block may love having a way to write parameter driven queries in the application layer. In the end it doesn’t, matter both work.
RTC says
Dude!!!!! I am convinced with ur point on the decision over MVC and webforms but i liked ur atitude towards the choice no one really cares wht technology we have used only goal is JOB-DONE. Thanks for giving me the spirit!!!!
Donn Felker says
RTC – No problem. I’m glad I could help. In the end I truly believe its
about getting the job done. If you want to use MonoTouch to build a iPhone
app or use Objective-C, the user does not care. They just want it to work.
So choose the right tool for the job!
Thanks for reading!
Donn
enamrik says
You didn’t go with WebForms because not all the developers know it? That’s maybe a reason to go with WebForms in your situation but not a real defense for WebForms overall. And shipping great software relies solely on proper design philosophies. Model View Controller and other complimentary design patterns have proven to be the way to write code you trust. When last did you hear a discussion about Dependency Injection or Separation of Concerns from a WebForms developer?
Bartek Marnane says
In my opinion, the question is becoming blurred with a lot of the cool features of MVC making their way into Webforms. ASP.NET 4.0 added URL Routing, reduced ViewState, and greater control of the HTML mark-up produced by many ASP.NET controls, now the next version of Webforms will incorporate many more MVC features into Webforms. http://bit.ly/dNhBd8
Jonathan Wood says
I’m a WebForms developer who just ordered my first MVC book. There are a few things I like about MVC (namely, clean HTML) and think it’s time to make the switch.
However, I’ve been programming many years and used many languages. I don’t get caught up in the “my language is better than yours”-type of arguments. I agree different tools are better at different things. But the discussions comparing WebForms and MVC have been useful for me because I don’t yet know enough about MVC to be able to compare the two in any detail.
Sciencedev says
Finally a sain statement in this debate. I think its rediculous people get when getting involved in this mvc vs webform debate. Myself I dont consider to be a hardcore web person more of a generic software engineer type who has programmed in multiple areas. The client does not care what its done in or how many patterns you put in something, just that it meets the requirement and its on time . thats all. I have seen people loose jobs because they were zealots about a particular tech or pattern.
Sciencedev says
separation of concerns, testability are great and can be done in webforms via model view presenter and using other patterns. Yes despite all the marketing points MS is pushing out with MVC you can have a poorly written MVC app and a poorly written Web form app
Donn Felker says
Very well said. You can definitely have some garbage mvc apps. I’ve seen
plenty of them. 🙂
reality101 says
The problem I see with asp.net mvc, you loose your shirt because the time it takes to complete anything beyond trivial pages. If you want more than the trivial, you need an expert in Javascript, ajax, css and linq to get anything done. And it still takes that “expert” 3-4 times longer to produce something that I can complete in standard asp.net with a good component provider with better results in a fraction of the time. Are we in the business to waste money or get something done?
And the arguments I see on blogs against asp.net appear to be written by authors who no little about OOP and how it is applied easily to the event model in asp.net to produce powerful frameworks that completely kick but on asp.net mvc…
Bryan says
My, my my. I usually don’t respond to the purest rants but I have to on this one. I was one of them but then reality sets in. MVC is NOT superior to Webforms and this developing the wrong way with Winforms is rediculous. MVC leads to the age old problem… separation of duties. Now i have a developer writing javascript and designing layout. Winforms allow large shops to have designers be designers. MVC is good for dipciplined developers otherwise you get a mess. You have code in your business in your models and views that belong in the HTML. Finally, we have large APIs written that host business logic that is used across winforms, webforms and WCF. Winforms is better for rapid binding etc.. MVC is yes aother place for a developer lacking wisdom to preach he is better than he is.
Reality Bites says
Interesting that almost no one is considering the non-functional characteristics of these solutions like long-term maintainability, scalability, security…
JonnyB says
Great post and very well said. Thanks for putting this out there. I’m guilty of getting caught up in the need to use the latest and greatest, but MS doesn’t help things. It gets to the point where you feel like you’re being force fed…whether its MVVM, MVC, Agile dev, etc. I 100% agree…use the tools that are right for the job.
Aa says
aaa
Coach Factory Outlet says
http://www.buycoachfactoryoutlet.net Coach Factory Outlet
Amaury C says
My questions are…… Which technology will offer better employ-ability for 2012/2013? ASP.NET Webform or ASP.NET MVC?
Which technology should a junior developer pick?
Thanks
Randall Tomes says
MVC would be better for this type. Is is a marketing style web site? or complexe application impersonating a thick client online? Do you see reusing many slick custom server controls in the app? Then stick with WebForms. Is this a marketing style website and there is going to be a lot of client script integration with 3rd party wigets. The website will have some forms but mostly is html design? Then mvc works better. Basically, your project more like a website? or a rich thick client that will be available online? MVC is bad when it comes to resuasable controls but great for mulit technology http integration like that is needed in many real world web sites. Once you learn mvc the speed difference becomes about equal. If you are trying to build the next online SAP i wouldn’t recommend doing that with MVC because you are going to want as much code as possible using OOP. MVC is good if you are just posting back some forms and collecting info. This is my humble opinion on it having worked with both now extensively.
ME says
Just read this and I couldnt agree more, well said.
Geoge says
I was about to loose a project that I started in MVC . Moving to web forms with Web API Controller and jQuery and seems like I am back in game .