Manager Suffixes Are A Code Smell

written by Scott Muc on Monday, June 30 2008

After attending Nothing But .Net Bootcamp I noticed none of the classes that were written in the course had a Manager suffix. I've sort had a eureka moment and have a good idea on why this is.

JP heavily emphasized the Single Responsibility Principle throughout the course. If a class is only has a single responsibility it will be pretty difficult to attach a Manager suffix to the class name.

So often have have I grouped together methods into some sort of "Manager" class and have always felt guilty about it. Having a Manager class almost corresponds to the Broken Windows story. You start thinking that since you have the Manager class it won't hurt to add another method to it, which is simply giving it more responsibilities.

I think a good real world exercise for me to do is to refactor one of my Manager classes into a set of classes that perform the same operations in a much more cohesive way.

Similar Posts

  1. I Survived JP's Nothing but Dot Net Boot camp!
  2. The Paradox of Choice in a Developers Life
  3. Choosing Mobile Golf Software

Comments

  • Paul Wolstenholme on on 7.03.2008 at 4:59 PM

    Paul Wolstenholme avatar

    Stop writing this crap and update the Knitting Club stats.

  • Paul Wolstenholme on on 7.03.2008 at 5:00 PM

    Paul Wolstenholme avatar

    I can't believe you mediate your comments. Bastard.

  • Paul Wolstenholme on on 7.03.2008 at 5:04 PM

    Paul Wolstenholme avatar

    I'm very disappointed that you are using a blog written in .Net. You have lost your way. Tempted by the dark side.

  • Paul Wolstenholme on on 7.03.2008 at 5:31 PM

    Paul Wolstenholme avatar

    Why do you ignore me?

  • Scott Muc on on 7.03.2008 at 5:50 PM

    Scott Muc avatar

    Paul, you rule...

    What's worse is that this isn't even an open source blog engine! Bad karma coming my way.

Comments are closed

Options:

Size

Colors