Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What aspects of ASP.NET MVC can be considered bad practices of Microsoft or problematic? In ASP.NET web forms, thing like ViewState, Automatically generated Id and names, single form usage and pattern like this are many times problematic. As no claim should be reason-less, so, it's better to mention why that aspect is an obstacle. Also finding any problem intrinsically means that we like to solve it. Therefore, Please also recommend ways to solve that issue.

share|improve this question

closed as not constructive by Mark Trapp Oct 22 '11 at 3:22

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

This will be a great question if the focus isn't just on pointing out the bad but also on explaining why it's bad and (if possible) how to fix it. – Adam Lear Aug 14 '11 at 15:40
Thanks @Anna, I updated the question. Please feel free to edit it. My purpose is exactly in accordance with your comment. :) – Saeed Neamati Aug 14 '11 at 17:20
up vote 6 down vote accepted

Fat controllers are the biggest obstacles that I encounter.

Rule of Thumb with MVC:

Keep your models fat and your controllers skinny.

For more background, please see this thread.

share|improve this answer
I don't have this problem any more as I make sure my application works inside tests then wrap that layer in MVC. – Daniel Little Aug 15 '11 at 6:41
Fat Controllers go hand-in-hand Anaemic Domain This isn't a problem with the framework though, just how it is used. – StuperUser Aug 15 '11 at 11:03

Html.DropDownList Because you can't override it's value if the name matches a property in the model.

Multiple forms on the same page with separate validation.

share|improve this answer
That's why I mix MVC with PHP style coding. I create everything myself and don't use HTML helpers of Micrsoft. :) – Saeed Neamati Aug 15 '11 at 5:41

Dealing with programmers who don't know MVC although they think that they do, and the problem that even a good MVC programmer can have keeping current as Microsoft gets up to speed with MVC in ASP.NET.

  1. Programmers who can draw a diagram of Model-View-Controller adequate for a job interview question and give a memorized explanation of each part, but lack actual experience with MVC. This is particularly a problem in ASP.NET MVC, because it is such a new part of ASP.NET, so someone with ASP.NET experience may convince themself they have MVC experience. No, they have ASP.NET experience and can draw an MVC diagram.
  2. Add to this, ASP.NET MVC 1, MVC 2, MVC 3 (and... MVC 4) come rolling out at the hapless programmer, who is too busy coding in MVC n to learn version n+1. (The MVC 3 books are finally coming out). Also, those great NuGet packages that you can just pop into your MVC project and perhaps solve a big problem, but you need to know and learn those NuGet packages, too.

Don't let any of this keep you from using ASP.NET MVC.

share|improve this answer
Not sure point 2 matters, your principle point is understanding MVC. Latter versions add a few helpers, a new view engine, change some of the abstractions, but its all impl detail – sa93 Aug 15 '11 at 5:12
@Jelly, +1 because of "MVCn to learn version n+1". Good note. – Saeed Neamati Aug 15 '11 at 5:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.