Question

I am building a class that represents a US State or Canadian Province. What should the class be called?

Some ideas:

  • Region: Problem with this is that .Net has a RegionInfo class that uses the term Region to represent a country (and not a State or Province).
  • State: Problem with this is that it could cause confusion with Application State, or Session State, etc...
  • Province: Could work, but very Canada-centric. Just doesn't feel right.

EDIT: GeographicalRegion seems like the way to go. It could even be used as a base class for other geographical region types (ie: Country) and still make sense.

Was it helpful?

Solution

GeographicalRegion would be my choice. Its pretty short and totally unambiguous, and it has no connotations with real types of area such as Province or State.

OTHER TIPS

Definitely don't go with "State" - way too confusing, and "Territory" has .ca implications too. Wikipedia suggests "Subnational" or "SubnationalDivision" would be good.

A more generic name for State, that is applicable anywhere in the world, is CountrySubdivision, or just Subdivision.

Google uses the term administrative_area_level_1 in their geocoder.

administrative_area_level_1 indicates a first-order civil entity below the country level. Within the United States, these administrative levels are states. Not all nations exhibit these administrative levels. administrative_area_level_2 indicates a second-order civil entity below the country level. Within the United States, these administrative levels are counties. Not all nations exhibit these administrative levels. administrative_area_level_3 indicates a third-order civil entity below the country level. This type indicates a minor civil division. Not all nations exhibit these administrative levels.

REF: http://code.google.com/apis/maps/documentation/geocoding/#Types

I see no problem with State; in the context you're using it in, I don't expect any confusion with application state. Everywhere you use it, you'll also be referring to Country, StreetName, and PostCode, right? Likewise if you choose to name it Region.

I don't like Region, though, because it's rather vague. All kinds of things are regions. If someone asked me what region I lived in, I might say the Midwest. Or the Western Hemisphere. Or Ramsey County. It all depends on context.

You and those working on your project should already know the context, so use a word that makes sense there. Don't worry about whether the word has meanings in other contexts; you're not working with those.

StateOrProvince

After some consideration, I realized that in my case the requirement was to specify a region to search, so I went with IAreaLocator. The idea is that the implemented area locators will allow specification of non-finite regions. They could be geo-fences, states, provinces, countries, etc..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top