In general, I prefer to be verbose with .NET class and instance names, but some times (to quote Mike Woodhouse):
Over-verbosity tends to conceal syntax, and syntax is important.
The first place I felt like I really strayed into the over-verbosity regime is upon implementing the Model-View-ViewModel (MVVM) pattern in Silverlight and WPF apps.
For example, I start with an EnumerableRange model object:
public class EnumerableRange<T> : IEnumerable<T>
{
public T Start{ get; set; }
public T Stop{ get; set; }
public long Count{ get; set; }
...
}
Then, I want to create a control that will allow me to surface this class for user input. Thus, I create a pair of view-related classes:
- an EnumerableRangeControlView UserControl (in XAML), and
- a POCO EnumerableRangeControlViewModel
Now, I use this pair in the parent View and ViewModel, respectively. With MVVM the view instance doesn't need a name, but my ViewModel instance is now named something like:
IndependentVariableEnumerableRangeControlViewModel.
Things are starting to get out of hand! What would you do?