ASP.NET MVC wins with simplicity, not features

As a follow-up to some ASP.NET MVC comments by Dino Esposito, I want to provide my commentary on why the grassroots of the .Net developer community is so in love with ASP.NET MVC, even though Microsoft marketing isn’t really seeming to push it.  It’s odd, too, because with Entity Framework, the message from Microsoft is clear:  DataSets and Linq2Sql will still be supported. . . but . . . er. . .um, we recommend you start moving to Entity Framework.

Car vs. Motorcycle? Irrelevant analogy, I say

Because of the way the http://asp.net/mvc and other folks(Scott Hanselman) present a car vs. motorcycle analogy, the message is loud and clear:  9 of of 10 of you should be using Web Forms/car.  The remaining 1 psycho with a death wish can ride the motorcycle/MVC.  The problem is that reality is the following:  Web Forms is the 1985 Lincoln TownCar (or even modern cars) where every single function is a physical electric toggle switch, plush comfortable seats and a sunroof.  ASP.NET MVC is a 1950s Chevy.  Every Chevy owner could understand how that car worked because of its simplicity.  With the decked-out Lincoln, you needed to call in expert help if your electronic left mirror adjustment switch stopped working.

Whether Microsoft says it or not, ASP.NET MVC is a much superior IHttpHandler than Web Forms.  I say it in this way because both use the ASP.NET runtime, which has proven very solid over the years.  Because they are both linked to this core interface, they play nicely together.  (In fact, stay tuned for an article about how to utilize MvcContrib’s Portable Areas feature by dropping in a DLL into a Web Forms app to instantly give that site a new section of urls and pages.)

Why is ASP.NET MVC superior?  How can I say this when Web Forms has so many more controls, so many more features?  I say this because it is a framework, not a product.  I build products.  I use frameworks to build products.  I want my platform vendor to provide me with a simple and powerful framework so that I can build killer products for my clients.  Crowding the framework with features actually hurts my ability to achieve my goal.

Web Forms will always have more features than ASP.NET MVC.   ASP.NET MVC will never provide as many features as Web Forms.  Chart control?  Nope.  How about the most basic grid?  I certainly hope not.  In fact, as one of the early and strongest community champions of ASP.NET MVC, I hope a grid never ships with it (MS should concentrate on the framework and let the community and component vendors ship grids).  ASP.NET MVC has such grassroots excitement in the developer community because of the raw simplicity of it.

Simplicity will cause ASP.NET MVC to de facto replace Web Forms.  I’ve said before that Web Forms will continue to power interesting web sites for decades to come.  I am glad for that.  It is a great framework, and I have delivered business critical applications with it.  ASP.NET MVC is the way into the future for ASP.NET, though.  After having a framework with tons of features and many strong control vendors who provide almost any functionality you can think of in a control, we (as in the average joe developer) long for a simpler way.  ASP.NET MVC latches onto some of the strength of Rails and PHP.  It is very easy to understand what is going on.  Very simple.  It doesn’t take an expert to decipher the flow of logic in the pages.  This is simpler to the exercise equipment craze of the 1990s giving way to the rise in popularity of simple running and bicycling that we have seen in the U.S this decade.

Conclusion

Microsoft is not jumping up and down saying:  “You should be using ASP.NET MVC for all your new web applications!”  It’s just the folks who have given the framework a chance who are saying it.


Trackbacks

ASP.NET MVC Archived Blog Posts, Page 1 Posted on 11.17.2009 at 10:04 PM

Pingback from ASP.NET MVC Archived Blog Posts, Page 1

Where is the next Access? Posted on 11.19.2009 at 1:26 PM

Ted Neward recently posted a response to a talk by Biily Hollis, and asked "Where is this decade's

Weekly Web Nuggets #81 Posted on 11.24.2009 at 9:51 AM

Pick of the week: Figuring Out What Your Company Is All About General Hello Tekpub : Rob Conery announces TekPub.com , a new site he's launched with James Avery providing screencasts with content provided by the topic experts themselves. WPF 4 (VS 2010

Comments

Steve Smith said on 11.11.2009 at 10:23 AM

The car vs. motorcycle analogy was supposed to have been abandoned while MVC 1 was still a preview. They (Phil, ScottHa, et al) shifted from it to "automatic transmission" vs. "manual transmission" which is IMHO a much better though of course still imperfect metaphor. If there's still car vs. motorcycle stuff out there it should certainly be updated.

Jeffrey Palermo said on 11.11.2009 at 10:29 AM

How about this past week from Scott Hanselman? www.hanselman.com/.../DevConnectionsT

Automatic transmission could be better, though since MVC is very automatic and Web Forms is much more of a Manual process.

Ben Scheirman said on 11.11.2009 at 5:12 PM

Jeffrey, that post is 2 years old :)

(You even commented on it!)

Michael Paterson said on 11.11.2009 at 5:40 PM

Great article Jeffrey. It seems these days that people love MVC and hate WebForms or vice-versa. I too have been using WebForms for years now and am thankful for it. It is, in major part, responsible for the developer that I am today. That being said I have shifted to MVC because of it's simplicity. I can do without all of the built in controls in exchange for control.....

Danny said on 11.11.2009 at 7:23 PM

Jeff,

I totally agree. The job boards don't show much activity for MVC.

I'm in New York City. It's a tough sell to a webforms developer. What I have to start-over ? No thanks.

It seems there's more MS hooplah about the recent Sharepoint 2010 Conference which had 7,000 plus in attendance. Yes, I

listened to Steve Ballmer's keynote speech.

It's a shame because The Gu and his excellent team have done

such great work. Pure speculation on my part - perhaps the

guy who lives on wekeroad saw the writing on the wall.

lynn said on 11.11.2009 at 10:29 PM

Jeff, I agree to a point. I have done a ton of work in Web Forms, built some large apps, and I can say from experience that MVC is becoming the hands down choice for large apps. I think after MVC 2 ships with .Net 4 there will be a much more confident push from MS. I don't think MVC 2 will be all that they hoped it would be due to time constraints, but it will be enough to deserve more press. And that press need to be more than just unit testing.

Dino Esposito said on 11.11.2009 at 11:30 PM

Jeff,

Web Forms is based on a obsolete model that was an excellent choice 10 years ago and brought to ASP.NET well deserved success. Many of us used it profithiably. Today things are different, needs are different, a slimmer runtime (oops, HTTP handler) is required and, thanks ScottGu, it can be built on top of the same ASP.NET machinery.

I disagree on the point of the grid. You may need to display grids and charts in your MVC pages. So what? Where would you go? Create them manually over and over again? Maybe not MS, but someone HAS to simplify the development of complex UI. However, MVC is simple at its core and can be made complex at will (and optionally). The opposite of Web Forms. But 10 years ago Web Forms (and its inherent complexity) were the personification of simplicity. Things change over time ...

Arnis L. said on 11.12.2009 at 3:01 AM

I like the idea K. Scott Allen wrote about. Asp.Net Mvc vs. WebForms question will die eventually. Sharepoint is the new king of 'drop-something-through-designer-and-endlessly-customize-it-until-your-eyes-pops-out'.

odetocode.com/.../mvc-or-web-form

Scott Hanselman said on 11.12.2009 at 3:56 AM

Other folks? OK...

Yes, that was DevConnections in *2007.*

I've always said, use whichever makes you happy. There's no marketing for or against either. It's just a choice. It's not like we're saying try Power Bars or Solent Green. Just pick one and be happy. ;)

Jeffrey Palermo said on 11.12.2009 at 8:21 AM

@Ben, @Scott,

Wow. my bad. I took that link out.

The "use whichever makes you happy" is great, but that's like saying to a child: eat your green beans or the gummy bears for supper. Whatever makes you happy. It's the absence of rational guidance.

Jeffrey Palermo said on 11.12.2009 at 8:22 AM

@Dino,

Yes, someone has to ship a grid. I think Microsoft should focus on framework and not features. So far, Phil Haack has been pretty good about that.

Mike said on 11.12.2009 at 11:01 AM

I have taken a peak at MS MVC. I am disappointed. Just another Microsoft hugely bloated and convoluted package. I have found ViciMVC, http://viciproject.com/wiki/projects/mvc/home, to be very simple to use with ASP.NET The templates are *.htm files which can easily be run in a browser. People working on the View portion of MVC do NOT need Visual Studio are even any knowledge of ASP.NET

Even when Microsoft sees the benefit in simplicity, they still make things needlessly complex.

Jeffrey Palermo said on 11.12.2009 at 11:25 AM

@Mike,

Wow. Thanks for the feedback. You definitely have a unique opinion.

Martin said on 11.12.2009 at 12:41 PM

It might be just me, but this post kind of come off like, "Microsoft has a new hammer called MVC, use it ... Oh look, another Nail!"

Both are frameworks, not hammers. Both have their pros and cons. I like MVC, but I don't use it for every project. I pick the one that best suits the needs of the project.

terry said on 11.12.2009 at 3:30 PM

Fact is the MVC framework means more work for me without much benefit. I like the speed and convenience of building small pages with ASP.NET Webforms. More work and less time delivering value to the customers wow MVC is simply brilliant... NAWT.

lynn said on 11.13.2009 at 3:01 AM

@terry

I agree that Web Forms is a better solution for small sites with self contained pages.

However, when you start to build larger solutions such as LOB or CMS apps and/or apps that support device dependant views you’ll find Web Forms really falls down.

Web Forms does very little if at all to connect pages together in a predictable framework supported way.

The view first paradigm means you have to hack-in front controllers and/or create runtime generated pages to support multiple devices.

Two-way data-binding in the data controls in convoluted at best.

Solutions to all of these are in the box or very easy to append in the MVC framework, which will be enhanced greatly in the 2.0 release.

Ali Dehghan said on 11.13.2009 at 11:04 PM

I disagree with you, because Asp.Net MVC is just an extension that run on the asp.net, and still it uses web forms as its view engine... you can do everything in it... I myself rewrite a asp.net control (Captcha) to use in MVC in just 10 minutes...

Sola Noah said on 11.16.2009 at 4:13 AM

In my view MVC is simplicity and the future. Also the building of complex control should be encouraged for re-usability

Vincent said on 11.24.2009 at 2:07 AM

I think I agreed with it. When ASP.NET MVC 1.0 was still in preview, I always decided that this is the right framework our company will be building applications on top of it.

Simple, clear, code looks very nice, very extensible. What else do you want?

Pierre said on 1.01.2011 at 12:02 PM

Do you really think that webforms are obsolete and that any serious programmer should start to learn MVC ?

Do you think that for example in 5 years, most applications will be written in with MVC ?