7

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.

Saeed Neamati
  • 18,318

3 Answers3

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.

Jim G.
  • 8,035
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.

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.

  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.