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.
Asked
Active
Viewed 1,421 times
7
-
2This 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
3 Answers
6
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.
-
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 06:41
-
2Fat Controllers go hand-in-hand Anaemic Domain http://martinfowler.com/bliki/AnemicDomainModel.html. This isn't a problem with the framework though, just how it is used. – StuperUser Aug 15 '11 at 11:03
2
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.

Daniel Little
- 1,402
- 12
- 16
-
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 05:41
1
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.
- 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.
- 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.

Jelly Stone
- 41
- 2
-
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 05:12
-