Where do you put non-controller, non-model code, like util classes, extension methods and so on in a ASP.Net MVC project? Maybe there's not a specific place to put it, you just put it anywhere, if so, any recommendation? Any best practices?
views:
82answers:
4
A:
My recommendation is to put them where they are used most. So if it is the controller that uses them put it with the controller, and so on.
Tamar
2009-07-06 15:17:34
+1
A:
According to the Kigg Sample MVC web project (You can get it from the official ASP.net), they put extension utility classes with a subfolder under root.
xandy
2009-07-06 15:18:34
+1
A:
if it's a single class i put them in a "Library" folder on the project root. If it's a bit bigger I use a specific folder and if it's something more complex i create a new project in the same solution.
Drevak
2009-07-06 15:19:07
+1
A:
Good references for ASP.NET MVC Best Practice
http://weblogs.asp.net/rashid/archive/2009/04/01/asp-net-mvc-best-practices-part-1.aspx
http://weblogs.asp.net/rashid/archive/2009/04/03/asp-net-mvc-best-practices-part-2.aspx
hadi teo
2009-07-06 15:21:50
They are interesting posts, but I can't really find the answer to my question there.
J. Pablo Fernández
2009-07-06 17:21:18