How to name an subclass that add a minor, detailed thing?

Posted by Louis Rhys on Programmers See other posts from Programmers or by Louis Rhys
Published on 2012-11-20T12:14:47Z Indexed on 2012/11/20 17:19 UTC
Read the original article Hit count: 413

Filed under:
|
|
|
|

What is the most concise (yet descriptive) way of naming a subclass that only add a specific minor thing to the parent? I encountered this case a lot in WPF, where sometime I have to add a small functionality to an out-of-the-box control for specific cases.

Example: TreeView doesn't change the SelectedItem on right-click, but I have to make one that does in my application.

Some possible names are

  • TreeViewThatChangesSelectedItemOnRightClick (way too wordy and maybe difficult to read because there is so many words concantenated together)
  • TreeView_SelectedItemChangesOnRightClick (slightly more readable, but still too wordy and the underscore also breaks the normal convention for class names)
  • TreeViewThatChangesSIOnRC (non-obvious acronym),
  • ExtendedTreeView (more concise, but doesn't describe what it is doing. Besides, I already found a class called this in the library, that I don't want to use/modify in my application).
  • LouisTreeView, MyTreeView, etc. (doesn't describe what it is doing).

It seems that I can't find a name which sounds right. What do you do in situation like this?

© Programmers or respective owner

Related posts about .NET

Related posts about coding-style