views:

535

answers:

5

I watched this webcast recently, and I got the sense that a lot of the "cool stuff" from ASP.NET MVC is getting pulled back into the ASP.NET framework.

At the moment I'm setting the ground-work for a project at my company using ASP.NET MVC, but after watching this, I'm beginning to wonder if that's the right choice, and whether it would behoove me to wait for ASP.NET 4.0.

I realize ASP.NET MVC 2.0 is getting close to an actual release.

If High-Testability, loose coupling, and having Full control of our HTML are top priorities, which should I choose, ASP.NET 4.0 or ASP.NET MVC?

+4  A: 

If your application will be released after the March release date, then it's a no brainier. Go with ASP.Net 4.0.

If it's not, then it not quite as clear. My current company is facing the same issue. Do we go with .Net 4.0 or not. For us, our solution is hosted, so we don't have the problem of releasing a product on a unreleased platform. Our biggest concern is the changes from beta2 to RTM.

As a developer I'm always wanting to move to the newest platform. A company has to consider it's clients and the risk to move to a new platform. Most of the time caution is more prudent then being the first to jump.

ASP.MVC 1.0 is supported and released. It's a great web framework. If you are not looking for specific features in ASP.MVC 2. Then use ASP.NET MVC 1.

Chuck Conway
I guess this IS a no-brainer. And since the architecture is loosely couple and very well thought out, switching the UI out won't be the most trouble-some of jobs.
CodeMonkey
Even with improved HTML control in 4.0, I think MVC still has higher testability (and loose [looser?] coupling comes with that).
mgroves
No offense Charles, but how was this marked as the correct answer? MVC and Webforms are completely different approaches to solving a problem. For someone who wants code written to match the stateless web environment, rather than abstract that away, MVC will always be a great solution. For someone who wants the web to feel like winforms programming, then webforms will be better. If the two converge, then it's a failure on Microsoft's part to fully leverage each product's strengths.
Andrew
+1  A: 

Go with whichever makes the most business sense. We always feel like waiting for the next best thing...but if we did we'd never get anything accomplished.

mezoid
+4  A: 

If your criteria include this:

We are aiming for high testability, loose coupling, and "controlled HTML" -- to me that meant ASP.NET MVC.

Then ASP.NET MVC is a must. Even with ASP.NET 4.0, you can't get around the fact that ASP.NET is hard to test for without a lot of extra leg work that just isn't there for MVC.

I use ASP.NET in my 'day job', but at night time I'm ASP.NET MVC all the way. ASP.NET 4.0 still hangs on to the legacy "Code-Behind" and the View/Controller coupling that goes on with ASP.NET Controls. These are things that make it much harder to test, and are 'tightly coupled' by definition.

George Stocker
I think it also makes it harder to understand. MVC is VERY easy to understand ... the framework matches the way the web works. I get so lost with the page model and control hierarchies in ASP.NET that MVC is just refreshing.
Andrew
+19  A: 

Well your question doesn't really make sense to me.

You're asking whether or not to go with ASP.Net MVC or ASP.Net 4.0 - do you mean WebForms?

MVC 2.0 will be shipped in the box with VS 2010 and as such same time as .Net 4.0 AND ASP.Net 4.0 - also ASP.Net MVC is a part of ASP.Net.

If you wish to use the .Net 4.0 runtime and all the features of ASP.Net 4.0 - what's wrong with doing it WITH MVC?

Also, I'd suggest building onto the MVC 1.0 now and structure your app in a such way that you can easily migrate to and embrace the new features in MVC 2.0 as you already know how most of these will work that shouldn't be too much of an issue. Or if your release is after the release of ASP.Net MVC 2.0, simply start using it now - unless that poses other issues.

kastermester
+1. I like the answer.
George Stocker
+1 i like it too
Feryt
Agreed, this is a far better answer than the accepted solution.
Andrew
I find it awesome that my best answer in here so far has been to tell someone that they live in an ideal world where they can get both candy and ice cream at the same time :D - what a wonderful world that would be if that was always the case, eh?
kastermester
Accept was moved :-) It was a better answer
CodeMonkey
A: 

Choosing a presentation pattern for a new or enterprise web development on the Microsoft platform is a daunting task, in my opinion there are only three; View Model, Model-View-Presenter (MVP) or ASP.NET MVC (a Model2 derivative).

You can read the full article here ASP.NET MVC Patterns

MetalLemon