If I create a custom routing class, what's the typical convention for where it's located in an ASP.NE开发者_JS百科T MVC project?
(Note that these are not domain-specific libraries as they are implementations of ASP.NET MVC's interfaces to hook the lifecycle.)
For me, best place for those kind of classes is kind of separate Infrastructure
-named project. Those Infrastructure-projects contain general helper libraries. Web knows about Infrastructure, but not vice-versa. Even Microsoft has that kind of naming convention. Namespace for custom route class may be *.Web.Infrastructure.Routing
I preder to keep them in a separate project with folder for every kind. For example for an MVC projects I usually do:
MyCompany.MyApp.Web.MVC
and then the helpers
MyCompany.MyApp.Web.MVC.Helpers
AttributeHelpers
RoutingHelpers
HtmlHelpers
精彩评论