views:

57

answers:

2

In an ASP.NET MVC application, what do you do when you have unique classes that aren't controllers, helpers or view-models?

For example, say you have a class of utilities that are useful for processing map/location data.

These utilities may be used by more than one controller.

Would you create a top-level folder/namespace for them and call it 'Maps' or something?

+2  A: 

I think a namespace named util will work here.

project.name.space.util project.name.space.domain.util

things like that.

I've seen this util domain usage a lot in the apache projects and in other areas as well so it's not a java or .net specific nomenclature.

Shaun F
+2  A: 

Maybe a new top-level folder and namespace called Utilities, and add your utility classes here: ProjectName.Utilities.MapUtility

If you have a lot of utility type classes, consider moving them into their own separate project.

cxfx
+1 because this is what i do. i don't really think that it's a 'better' solution that a different namespace.
cottsak