tags:

views:

204

answers:

9

I find myself on the edge of trying out ASP.NET MVC but there is still "something" holding me back. Are you still waiting to try it, and if so, why? If you finally decided to use it, what helped you get over your hesitation?

I'm not worried about it from a technical point of view; I know the pros and cons of web forms vs ASP.NET MVC. My concerns are more on the practical side.

  1. Will Microsoft continue to support ASP.NET MVC if they don't reach some critical threshold of developers/customers using it?
  2. Are customers willing to try ASP.NET MVC? Have you had to convince a customer to use it? How did that go?
  3. Are there major sites using ASP.NET MVC (besides SO)? Could you provide links if you have them?
  4. Did you try ASP.NET MVC and found yourself regretting it? If so, what do you regret?

If you have any other concerns preventing you from using ASP.NET MVC, what are they?

If you had concerns but felt they were addressed and now use ASP.NET MVC, could you list them as well?

+3  A: 
  1. I believe ASP.NET MVC has reached that critical threshold, as evident by VS 2010 tooling, ASP.NET, MS employee blog and the extensive effort Microsoft put into the framework thus far. I don't see this framework perishing in the next decade (or two).

  2. By customers, I assume you mean people that I build websites for? The only issue I find with ASP.NET is the hosting solutions. However, this issue is becoming moot as more affordable hosting solutions are found. But usually, if I believe in the technology and that it will work for my customer, my customer trusts me and agrees on it. The customer is also usually comforted by the fact that ASP.NET-MVC is a Microsoft product. Having a big company behind a technology is always a nice thing to have, since you can rest assured it will be supported for quite awhile with frequent updates.

  3. ASP.NET MVC is a relatively new framework, and slow adoption of new technology is expected. But this is what I found: http://weblogs.asp.net/mikebosch/archive/2008/05/05/gallery-of-live-asp-net-mvc-sites.aspx . I think you'll see a big influx of websites using ASP.NET-MVC this year when VS 2010/.NET 4 are released with built-in support for ASP.NET MVC.

  4. I never enjoyed developing with C#/ASP.NET more than when I started using ASP.NET-MVC. To a certain extent, ASP.NET-MVC forces you to write good code more so than WebForms due to ASP.NET-MVC inherit separation of concerns and easy customization. And the ability to control HTML output is essential, a feature that was difficult with ASP.NET-WebForms (pre 4.0).

Baddie
Thanks for pointing out that Microsoft blogs are using ASP.NET MVC. I hadn't noticed, but it's obvious now that I look at them.
Jason
+1  A: 

I have not yet actually tried coding up some ASP.Net MVC(looked at a few examples though) but the main thing holding us back from using it is that all of our code is currently written using Webforms.

Earlz
+2  A: 

Why not? The rest of my team doesn't want to.

Larsenal
A: 

Did you try ASP.NET MVC and found yourself regretting it? If so, what do you regret?

I do not regret trying out MVC in fact I love it. When I started it out I hated it I kept looking for the code behind file and was unsure at first how to get values out textboxes and stuff without going textbox1.Text;

Now I cringe every time I go back to webforms and wish I could write it in ASP.NET MVC because I just love how your working with html instead of using drag and drop controls that usually make your life alot harder if you got to customize them to much. I love how ASP.NET MVC likes to focus on good code like design patterns such as the Repository pattern and how to do unit test using TDD.

I have not picked up a book yet in MVC where they talked about how to make good code. I am not saying you can't write good code in Webforms but in the books and classes that I seen teach ASP.NET this never seems to be a main focus.

Like for instance I hate the datasource controls I am tutoring some people in WebForms and they love to drag a datasource in and then write their SQL statements in that datasource. Then in the code behind they use these datasorces to insert their records.

So every time they need to make a new SQL query a new datsource is dragged on and made. So now you all your logic is all mixed together. It makes it so much harder to find out whats going on, switch to different things if needed then of course it is limiting.

chobo2
A: 

Something that revolves around the name "controller" can only mean problems.

I tried following the Nerddinner http://www.asp.net/mVC/ tutorial this morning. I'm comfortable in webforms, but nothing in that nerddinner tutorial made sense, just an outdated, hardcoded recipe from mvc1.0 that dosent even compile with the current mvc2.0, probably Wrox made this tutorial, only they can come up with only formating and no content.

I didn't see anything in there that was good; a bunch of hardcoded conventions I didn't need.

I certainly didn't see anything in there that would make me say I'd want to move from webforms, although this seems to be all the propaganda I read.

They put this tutorial based around wizards, on http://www.asp.net/mVC/ main page, while claiming the model is lean, all of it is generated code they don't explain, the default mvc template project has something like 15 references.

This 2 page website managed to be slow to build and to load.

Was 30 minutes in it until I realized my data model didn't match the one from the tutorial and many things that had been generated using the create controller and create view wizards were now failing.

With what I was provided in the rushed tutorial, I wasn't able to recover the project. I'll just pass until I find better documentation.

GenEric35
Made me smile. Can't resist to upvote this. :D
Arnis L.
HA! spot on with the Wrox analogy. The best use for those books so far has been a monitor stand.
StingyJack
What "generated code?" What are you talking about? ASP.NET MVC doesn't even use code generators, but *WebForms **does**!* This answer makes no sense. This all seems to boil down to "It was taking me too long to figure out and I messed a bunch of things up by using a tutorial for the wrong version, therefore it sucks." It's like following a tutorial on Office 2000 and claiming that you had nothing but problems getting things done in Office 2007.
Aaronaught
ha ha, nice post. The first project I did in MVC was full of !@!#WTF. Once I realized how it all works together it made sense. It's an elegant solution. It's a paradigm shift.WebForms attempts to shield you from HTML, Javascript and the HTTP Protocol. ASP.NET MVC embraces HTML, Javascript and the HTTP Protocol. I can tell you it's much easier working a framework that embraces HTML than one that works against it.
Chuck Conway
@Aaronaught: right click the controllers folder, or view folder from a default mvc template provided by visual studio, and it generates the classes, I downloaded mvc and the tutorial from the same page, http://www.asp.net/mVC/ do you have a more 'official' page? maybe it has different documentation? The question was asking for concerns about not using it, those are mine.
GenEric35
@Chuck: yes, once I get through the paradigm shift I hopefully will be able to enjoy the good sides, closer to html and javascript sounds like a good thing indeed.
GenEric35
Eric - what, you mean the code *templates* for controllers? What's wrong with them, and how are they worse than the code templates for WebForms pages, which are several times larger and more cryptic but happen to get shoved away in a "designer.cs" file?
Aaronaught
+5  A: 

Will Microsoft continue to support ASP.NET MVC if they don't reach some critical threshold of developers/customers using it?

They will for sure.

Are customers willing to try ASP.NET MVC? Have you had to convince a customer to use it? How did that go?

Customers care about high quality products and price. Just convince them that Mvc will help to raise quality and lower price. Shouldn't be hard.

Are there major sites using ASP.NET MVC (besides SO)? Could you provide links if you have them?

Isn't it enough with SO? :)

Did you try ASP.NET MVC and found yourself regretting it? If so, what do you regret?

I did try and didn't regret it at all. It kills me being forced to work on web forms project again.


Go for it!

Arnis L.
+1 "It kills me being forced to work on web forms project again." I agree completely!!!
Dustin Laine
@durilai most odd realization was that applying single responsibility principle on user controls more (otherwise they become huge and hard to use), eventually you end up having partial views. :D
Arnis L.
I agree. I've done 5 MVC projects. Going back to web forms is painful.
Chuck Conway
+1  A: 
  1. Regarding Microsoft support ASP.Net. First Scott Guthrie, the VP of Development at MS is behind it, so that's one feather in its cap. Second its open source now so even if for some strange reason MS decides not to support it going forward you can still tweak it on your own if you need to. In addtion the MVC pattern is somethign that more and more web development platforms are using. It is a great pattern for web development and as a result I can't think of any reason MS wouldn't continue to support it.
  2. If by customers you mean end users, honestly they shouldn't care how you implement the site. If by customers you mean consulting clients, if you can develop faster and they have the servers that can host it, I would think they would be open to it. On top of that youre MVC sites should use less bandwidth than a typical Web Forms web site (IMHO) mainly because there is a lot of additional stuff put into a Web Forms page (for example extra attributes in the HTML htat are tailored for web forms, ViewState) so that should be seen as a positive by them. Now if by customers you mean people integrating with you, then its also a plus since MVC makes it very easy to implement REST based web services (not that WFC doesn't but MVC works very nicely as well).
  3. Hmm major sites using MVC, so far I've found a list here I also know of a number of apps at different companies where large scale MVC apps are in development. I wish I could give more detail, but unfortuantely I can't at the moment.
  4. When I first started out with ASP.Net MVC I thought I was going to hate it. I wasn't a huge fan of Web Forms either, but MVC just felt like a step back to ASP development back before .Net came out. Then I started really getting into it and really finding the pattern is clean, concise, extensible, maintainable, and easy to pick up. Honestly I don't want to ever go back to Web Forms, and anytime I find myself doing a .Net web app I make a point of making it an MVC project.
Arthur C
A: 

You need to choose what's more appropriate to your product. Webforms has a few things to recommend it over mvc in some situations.

The big one is a developer working on in-house tools at small to medium shops. In these circumstances:

  • Large viewstates are not likely to be a problem, because your users typically have 100Mbit upload to your web server rather than a measly 128Kbit or less.
  • Javascript is likley to be supported by everyone
  • Development time matters more than widespread cross-browser compatibility or even nice design.
  • You're likely stuck working with inherited devs who used to do desktop/forms style development, or have a lot of churn among junior devs who don't really know web development.

All of those things together mean that webforms is still a very good fit. And let's be honest: a lot more programmers work at these small to medium in-house shops than do public internet work. So webforms isn't going anywhere.

That said, one of the big things coming up among these small shops is likely to be taking their internal tools and making them available offsite for telecommuters. In that situation, you need to start worrying more about WAN performance odd browser issues where MVC might be a better fit.

Joel Coehoorn
I agree with almost everything you said, but I do have to add that I'm in one of these small shops and have found most web development to be much more productive *without* the ViewState and visual designer swamp. There's obviously friction moving from WebForms to MVC, just as there is friction moving from WinForms to WPF/MVVM, but if you write off the learning curve as a fixed cost then I think the "development time" argument disappears.
Aaronaught
Just as there is friction moving from asp.net mvc to RoR. ;)
Arnis L.
+1  A: 

Dell is hiring masses of ASP.NET MVC developers in Texas and India for major work on many of their websites.

According to The Gu, ASP.NET MVC will have it's own product and development cycle. It is now 100% detached from ASP.NET WebForms and it's not going away.

cottsak
Hmm, Dell doing the switch over is very interesting. Thanks for the link.
Jason