Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I build my next web app in ASP.NET MVC?

My team is considering building our next web app using the ASP.NET MVC framework. I am slightly hesitant, as are some others, because it is still only in beta. I really want to dive in because it seems to be a great way of providing clear separation of concerns and improving testability.

Should I take the plunge now, while MVC is still in beta, or hold off for a release candidate?

From some of the responses, I think I need to clarify my question a bit. My primary concern is whether to go with a product that's still in beta, not webforms vs. mvc. The concern is mainly because of the fear that we end up using some functionality in the beta version that gets changed / deprecated / not supported in the final release.

However, I do appreciate the perspective on webforms vs. mvc. It just doesn't get at the heart of my question.

like image 380
Aaron Palmer Avatar asked Oct 29 '08 14:10

Aaron Palmer


1 Answers

It's a pretty simple decision tree, really.

Choose ASP.NET MVC if you...

  • Care deeply about URLs
  • Care deeply about your HTML
  • Want true separation of concerns
  • Want testability through and through
  • Want flexibility of view engines (ASPX, NVelocity, NHaml, etc)

Choose WebForms if you...

  • Enjoy the stateful abstraction of WebForms (ViewState)
  • Don't mind PostBack model
  • Prefer components that you can "drag & drop" on a page

For me, the answer will 99% be ASP.NET MVC, because I think it is a much better match for the web. I think the ajax story is much cleaner as well, and I have complete control over my HTML & URLs. On top of all of that, I can test-drive my website (controllers) quite easily.

Yes, I know you can achieve clean URLs in WebForms, and you can have clean(er) HTML through Control Adapters, and you can achieve a level of testability with the MVP pattern in WebForms, but these are all off-the-beaten path approaches. With ASP.NET MVC this stuff is core. That's just the way you do it.

And don't worry about the preview/beta status. The team has always maintained that you don't need a go-live license to deploy it (even though they now offer one). It's purely additive on the existing ASP.NET Runtime.

It's like automatic vs. manual transmission. Pick one that makes you happy and run with it.

like image 143
Ben Scheirman Avatar answered Nov 10 '22 00:11

Ben Scheirman