views:

6750

answers:

23

For any of you that have used ASP.NET MVC (especially the Stack Overflow team), do you think it's worth taking the plunge with a technology that's still in "Preview" releases, not even Beta yet? From what I've seen on the MVC site and various blogs, it seems that a lot is still in flux, making it so that upgrading to the latest MVC version would likely require a lot of code changes.

Compared to WebForms, is it worth getting the MVC model at the expense of likely having to do re-writes later just to comply with the latest version? I ask this especially in terms of doing something that will be used, not just if I should try it out.

+1  A: 

I saw a demo lecture/discussion of the ASP.NET MVC at a local .NET User Group meeting.

I was very impressed. It looked like a good balance of all the good parts of ASP.NET but without all the session and viewstate abstraction/frustration.

I do worry that the HTML may end up too mixed with logic as was the case with all my old classic ASP web sites. Jeff called this Tag Soup in a Coding Horror article.

Zack Peterson
+2  A: 

As with any pre-release product, I do not think that it is a good idea to use MVC in your production applications yet. Like you mentioned, things are (and will be) changing in future releases of MVC. I would encourage you to do parallel development if you have the cycles: maintain your current application in WebForms and port it to MVC using the latest preview. This will accomplish two things: you have a stable base for your application and you will get up to speed quickly on MVC so that the future changes do not take long (hopefully) to implement.

I really like ASP.NET MVC and have started to port some of my sites to use MVC, but there is no way that I will go live until we have a stable release of the technology.

JeremiahClark
+3  A: 

I can't see why anyone would subject themselves to the nightmare that is webforms. I'm a long-time ASP.NET developer, a one time ASP.NET MVP, and webforms are a complete piece of shit. MonoRail has long been a better choice. I think ASP.NET MVC is an even better choice. The last release (preview 4) is reliable, fast and more than complete enough to use.

Karl Seguin
+72  A: 

@Adam:

I may sound like a killjoy, but I've learned from hard experience you should resist writing and putting into production any code that is based on preview releases.

You should definitely take portions of your existing apps and port them to MVC to gauge how useful it will be, to learn how to use, to measure performance, usability etc etc, but don't be tempted to put into production unless you can afford the time to fix breaking changes in the RC/RTM.

@Karl:

At the risk of getting a downmod from you :-), I think it's a bit unhelpful to make a blanket statement such as 'and webforms are a complete piece of shit', they solved a problem in their day and are still a perfectly acceptable solution for many web apps. The OP just asked if it was wise to invest development time in the MVC preview technology.

I've been around ASP.NET since it was called ASP+, Web Forms were a huge step forward compared to technology available at the time. MVC is the new favourite shiny thing. Who knows, in four years time MVC might also lose its lustre (e.g. because of tag soup abuse) in favour of the next big shiny thing.

Kev
"[web forms] are still a perfectly acceptable solution for many web apps."amen to that. There are a lot of apps I wish I'd had the chance to develop in MVC but a few I'd still choose to do in web forms even today
alexis.kennedy
Looking back I sometimes think my answer seems a big negative, but I'm sure MVC will be a great success. But we forget quickly how we 'ooh'd' and 'aah'd' at web forms because they removed lots of pain dealing with forms state management way back then.
Kev
Since having written this I've started using ASP.NET MVC 2. Would find it hard to go back to webforms again :)
Kev
+10  A: 

One of the interesting things about the MVC previews for me is that it feels like part of a paradigm shift for Microsoft.

The shift in emphasis towards testability is important and a massive advantage over webforms. In addition - this means that the automated testing should mitigate us all against anything that might be broken in the preview and help us transition to later previews and the final release without breaking everywhere.

And all of this without even talking about how good the framework is!

Ronnie
+1  A: 

rob conery posted his response "avoiding tag soup" on his blog. on mvc views only logic used on view pages is that used for displaying data. there is no mixing real business logic and markup in mvc views. i'd also recommend asp.net mvc for tdd and di/ioc scenarios in asp.net web apps. basis of asp.net mvc likely will not change much in next releases. changes will mostly be directed to adding new features.

Dragan Panjkov
+5  A: 

I haven't seen anyone here telling Adam this so here goes :

A well written ASP.NET WebForms site will not take a lot of time to convert to ASP.NET MVC. Having the business layer and data access layer well defined and having a general arhitecture discipline will mean a smooth and easy transition.

All in all my conclusion is this : Yes, it's worth it. (ASP.NET MVC)

+1  A: 

If you're using MVC there is a good chance you have a good test suite for your code. That will make it a little easier to keep on the CTP bandwagon (compared to other pre-release products)....

Also, there has been allot of changes in MVC, and like you say there will be more.. But some core pieces must start to settle down? I know the underlaying HTTP routing mechanism shipped as part of .NET 3.5 SP1, so at least that "core" piece is baked (tough, I'm sure they have added lots of additional stuff on top of the built in routing framework)...

I'm always for doing leading(bleeding) edge stuff - and is currently doing production ready Silverlight 2 apps. No guts no glory ;)

Jonas Follesø
+13  A: 

I am using MVC on a production application that I am freelancing right now and got to say it's a really neat shift of mindset within the softies, at part sometimes even better than some of the dynamic frameworks available by siblings like python and ruby.

After Preview 3 it's the team's vision to build upon its foundation stability and refrain from make such big changes as they occurred from Preview 2 to 3. IMHO the change was remarkable for the sake of the architecture and having already migrated from Preview 3 to 4, it only took me to replace the old assemblies with the new ones and to recompile.

One thing to notice though is that deploying MVC-based applications in environments earlier than IIS7, will need some extra configuration and probably some ISAPI Rewrite to maintain the extension-less features that play as strengths to the approach. On IIS7, its just a snap :)

If you seek further info into support your decision, Adam Kinney recently sat down with Phil Haack to discuss the current state of MVC and what to expect from future releases.

Hope it helps.

Cheers!

samiq
+4  A: 

I'd just like to weigh in on this. I've developed PHP applications for over 8 years, I've always hated the MS alternative. I did some basic ASP about 10 years ago and my experiences of it have stuck with me.

I recently took a course in C# and I loved it, it's a great language. When I came to try out ASP.NET I thought it was an extremely poor approach for web applications. After reading about the ASP MVC approach, I truly believe this will cement ASP.NET as the future of web applications, I'm itching to give it a go.

The ASP Web Forms / ViewState model was always (IMHO) inappropriate for a web-application, the whole thing seems really convoluted. I can't comment on the current state of ASP MVC or it's practicalities, but, I can say only the implementation can let it down. As a concept it's what ASP has needed for a long time.

Andrew Taylor
A: 

Microsoft's MVC framework needs to cater for a large number of development scenarios and is unnecessarily complicated when viewed through the prism of a single project.

ASP.NET MVC is probably just for people who are intimidated by the thought of writing their own MVC framework, or for people who like having "Microsoft" on their resume.

Phil Bachmann
Dude, you took some hits on this one. But didn't delete the response ... gotta give you credit for sticking to your guns :) (or was it an ill-timed vacation?)
Charlie Flowers
Others expressing similar sentiments also got hit - but bailed out soon after their score dropped below zero.I'm not sure why I keep it here - maybe as yet another example of why Jeff Attwood needs to improve the scoring system.Or maybe as a reminder of how fragile developers' egos are.
Phil Bachmann
I didn't downvote this but I think your arguments lack clarity and reasoning. "needs to cater large number of dev scenarios": What does this mean? "unnecessarily complicated": Say I claim the same for WebForms, how can anyone favor one of us besides rolling a dice? The second paragraph is a complete Ad Hominem. I think downvotes aren't that out of place.
ssg
+2  A: 

I also think there is a major paradigm shift at Microsoft, which you can see very clearly at ASP.NET MVC. The communication between the team members and the community is much better, and you are really "integrated" in the development.

Of course you may need to rewrite some of your code if you are always on the cutting edge, but now as the product is nearly feature- complete there won't be that much breaking changes any more.

I am currently developing a bugtracking application using ASP.NET MVC (just for fun) and don't want to go back to ASP.NET Webforms any more...

ollifant
+1  A: 

You can work your MVC framework into your existing web site/apps without having to go down the MS MVC route. I wrote about it in my (rarely updated) blog - http://www.duncangunn.me.uk/dasblog/2008/03/02/WebFormsMVCOnTheCheap.aspx

You still get the benefits of separation of concerns and with a little Dependency Injection it means you can drive the whole thing from unit tests.

Duncan
+7  A: 

I definitely wouldn't recommend deploying any production apps in ASP.NET MVC until we see the Go-Live license.

If you're starting a new project and would like to use ASP.NET MVC, I think the best route is to build your core components/assemblies up to take advantage of ASP.NET MVC now, but make sure to strictly separate things so that new MVC code drops won't create more than a day or two of downtime to get your project updated. You may even want to try webforms or one of the MVP patterns for your web project making sure it can quickly be swapped out with MVC very quickly.

As for my opinions about ASP.NET MVC...there is no doubt that it is the future of web development on the .NET platform. For all the buzz about testability and following a stricter pattern, there's a much stronger incentive for MSFT to put all its web development energy into MVC, and that's AJAX.

Webforms were never designed to use AJAX well as the postback/Viewstate model was never a good approach to support it. While there has been a lot of great work done by the ASP.NET AJAX team, ultimately it still feels like an addon rather than the defacto way to developer asp.net websites. MVC is a chance for Microsoft to reinvent the platform to support AJAX from the get go and allow people the flexibility to build rich UIs without the hackery involved in getting it to work with WebForms.

This is all just my .02.

Karthik Hariharan
@Karthik: as far as the goodness of ASPMVC, I'm a believer. But you touched on a different issue: Microsoft's own level of commitment. Do you see indications of Microsoft making MVC the future, or is that just speculation on your part? Even though we may like it, that doesn't mean they're so sold.
Charlie Flowers
+3  A: 

Normally I'd agree with you on Beta/Preview software, but in this case it's a little different. The ASP.NET MVC team has been very open to feedback and sensitive to making breaking changes. They've listened on private mailing lists, public forums, twitter, blog posts, and actively asked people for their thoughts/suggestions/gripes. The end result is a much better framework.

The other aspect that I've truly enjoyed is the regular 6-week drops. It's not that hard to bite off changes like these and upgrade your apps.

The framework will be in Beta status soon, so you'll be able to rest a little easier on how much things will change. +1 to adopting it today.

Ben Scheirman
+1  A: 

Have to agree with Karl Seguin on his point. You will have to do odd stuffs if you wish to control your asp control id for client side scripting. ID mangling is one of the reason why you should consider ASP.NET MVC. It provides a cleaner separation of concerns.

As for early adoption. Since it's just a dll that you can copy into your site bin folder, I don't see any harm even if you deploy it to the live environment. From playing around with it so far, preview 4 is quite nice. Still have to get preview 5 and give that a try.

Jimmy Chandra
+7  A: 

I have written two MVC apps that are now in production. I started with Preview 2, and as of today I have upgraded through Beta. No upgrade has taken me more than 2-3 person hours to complete and test. The fact that we have high levels of unit test coverage -- which MVC facilitates wonderfully well -- has been an important factor in easing upgrades.

I should mention that MvcContrib has made the whole process much easier. When I found some small shortcoming or limitation, instead of adding some extension to my app, which I would be stuck maintaining forever, I submitted a patch to MvcContrib. All three patches I submitted were accepted into the trunk within 2 days. I can't tell you what a relief it is to get this code out of my app and into a library that is supported by an active community of top notch devs.

If MVC were a heavy, leaky abstraction like WebForms I would agree that you should wait. But it's so strong on testability and separation of concerns that you can pretty much forget worries about pulling your hair out over intractable breaking changes. There have been breaking changes, and there might be more, but they have been quite easy to spot and deal with cleanly.

On the other hand, I would drop any notion of developing a WebForms app and "converting" to MVC later. Even if you planned for that, it would be hard to develop a WebForms app in such a way that you would not have to largely rewrite it.

By the way, the MVC source code is available to you, so you need never feel stuck and helpless, hoping and praying that someone will just respond to that forum post you made last week. True, none of us wants to dig into framework code very often, and you might never have to. The point is that there is no dead end.

Tim Scott
+1  A: 

Phil,

I actually find coding things a lot faster with the MVC Framework, and it works out that my code is a lot leaner as well. Take a look at Scott Gu's latest article on MVC Framework and RC1, tons of automation features added to make your life easier. I get the feeling phil that you aren't a big Microsoft guy and that is ok, a lot of us have to focus on the meat and potatos business of making business applications rapidly and do not have the time to build our own massive frameworks that nobody else will be able to support. Just some food for thought.

Al Katawazi
+1  A: 

MVC has its place, the reason why there are so many early adopters is because its got a lot of really cool features. Of course these features are still developing, and if you want to wait till a full release by all means.

The reason I took the plunge was because I needed the features offered by MVC immediately, and I don't mind making code modifications. What are these features you may ask.

  1. Seperation of the UI from the DAL and the BLL. This is seriously a big deal because I can unit test my applications with confidence.
  2. RESTful URLs, thank god
  3. ASP.NET Webforms were kind of a huge hack requiring all sorts of javascript to make the vents work right. With the MVC Framework you are going back to a more simplistic model of using straight HTTP Posts and Gets to handle your information.

I can talk till I am blue in the face about this issue but I really suggest you take a look at some of the open soure community projects out there. A great one that I assisted with is TheBeerHouse.

Al Katawazi
+3  A: 

Before I answer your question, let me say, I worked my project from all phases of MVC, from preview 2 to RC, and my opinion it is great framework. For me, best sign for that when I back to mvc project after one or two months and I need to rewrite/refactor something, everything is so nice suited, every part of code is where it should be, so I don't have trouble at all to find bugs, or to rethink where I need to place new features.

On the other hand, mvc is in early phase, so lots of things that you can do very rapid on other frameworks like asp.net, you have to write buy hand(user interface, javascript,..)

So

if you don't have time and the project is not so big, go for asp.net if you have time and project is relativly big, go for mvc, you wan't regret.

cheers

Marko
Sorry for following serbian:Upmod -> za nekoga ko iz Beograda koristi ASP.NET MVC. Nema nas mnogo :)
Jox
thank you Jox, glad we are living in the same city :)go ahead, tell us your experiences with MVC ;)
Marko
+3  A: 

Scott Hanselman thinks ASP.NET MVC is great. He told me this once.

"Stackoverflow.com does 14million page views a month and is running MVC. I can get you dozens of other references as well. I don't think frameworks should be judge as "young" or "old." The MVC pattern is 35 years old. ;)"

I think a framework should be tested, but since it is built on a well-reckoned pattern, that should count for something.

Check out his post about security on the NerdDinner tutorial.

http://www.hanselman.com/blog/ELMAHAndExceptionDrivenDevelopmentFTW.aspx

Greetings

greendaale
+1  A: 

just try it Yourself and check! For me works perfectly!

mike
+1  A: 

Even though it is "new" to ASP.NET, MVC has been around for a while in other technologies and is well established. There are a few rough edges to 1.0, but overall I really like the separation it forces you to consider when creating a web site. The ability to create unit tests for each independent component/piece of the site is immensely valuable.

Be prepared for a significant paradigm shift from a traditional ASP.NET site, so plan accordingly from a time perspective. You'll likely be refactoring your first site for a while.

I've been using it for a high-volume production site and it works great.

ChrisP