Vague class names: "Manager" and "Helper"

From journal.stuffwithstuff.com:

Do not use "Manager" or "Helper" or other null words in a type name.

If you need to add "Manager" of "Helper" to a type name, the type is either poorly named or poorly designed. Likely the latter.

I always agreed with this: names like ConnectionManager and XmlHelper are too vague to be useful. But I never came up with a retort as pithy as this one of Robert Nystrom's:

Types should manage and help themselves.

1 Comment

There are cases where something exists as a concept but not as a type.

For instance, I have a GUI where each view can be any kind of object, and I don't have a "View" type that they need to inherit from. In this case I need to manage the views, so I have a ViewManager, but the views themselves are of type System.Object.

Also, things are usually called "helpers" not because they help the types, but because they help the user with those types. In that sense the name makes perfect sense; they encapsulate tasks common to the type but not intrinsic to their functionality.

So no, I don't agree with this do-not.

Leave a comment

Close