Often used class name suffixes

wonderWhen you name a new class, you want that name to be meaningful and describe why this particular class exists and what it does. This is much harder than it seems. The name of a class usually consists of two components. The first part of the name is usually related to a domain, e.g. a feature name or a screen name. That one is pretty much given. The other part of the class name is related to a type of the problem it is trying to solve and it may be much harder to come up with a meaningful name for this. I found that when you’re in a “naming paralysis”, going through the list of some common suffixes is generally enough for that bulb to light up when you come across a name that you see fit.

There is one important thing to note, it’s essential to keep names meaningful, but it’s also important to get them named consistently. Some names are equal in their meaning (e.g. Controller, Manager, Service), so it’s important to decide on one and use it consistently.

This is a list of the most common class name suffixes I found:

  • Attribute
  • Base
  • Behavior
  • Bucket
  • Builder
  • Collection
  • Container
  • Context
  • Converter
  • Coordinator
  • Designer
  • Editor
  • Element
  • Entity
  • Factory
  • Handler
  • Helper
  • Info
  • Item
  • Manager
  • Mediator
  • Node
  • Option
  • Protocol
  • Provider
  • Reader
  • Service
  • Target
  • Type
  • View
  • Writer


If you liked this blog post I’d appreciate if you followed me on Twitter

Related Post

Remember to share...Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInEmail this to someone

2 thoughts on “Often used class name suffixes

    1. Hi Dominik, the suffixes are what I found commonly used in class names of projects I was part of, open source repositories, different frameworks etc.

Leave a Reply

Your email address will not be published. Required fields are marked *