Naming conventions for abstract classes
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
Good abstract-class names describe the role the type plays in the domain, not just the fact that the class happens to be abstract. That is why there is no single universal prefix such as Abstract or Base that you must always use. The best convention is the one that makes the class’s purpose obvious and stays consistent with the rest of the codebase.
Name the Abstraction, Not the Mechanism
If an abstract class represents a meaningful concept, prefer naming that concept directly.
This is usually better than naming the same class AbstractPaymentProcessor unless the project specifically uses that style everywhere.
A reader should understand what the type models before worrying about whether it can be instantiated.
When Abstract or Base Can Help
Prefixes such as Abstract and Base are not wrong. They are useful when the abstract class mainly exists as a shared implementation layer rather than as a standalone domain concept.
These names communicate that the class is infrastructure or a helper superclass, not a first-class business concept.
Prefer Consistency Over Style Debates
Different teams choose different conventions:
- direct domain names such as
PaymentProcessor - '
Abstract...names such asAbstractPaymentProcessor' - '
Base...names such asBaseController'
None of these is automatically best in every project. What matters is that similar abstractions are named similarly.
If one package uses AbstractRepository, AbstractHandler, and AbstractValidator, introducing BaseCache in the same layer may create unnecessary inconsistency.
Avoid Redundant or Misleading Names
Some naming patterns create more confusion than clarity.
Poor examples:
- '
AbstractInterfaceManager' - '
BaseAbstractService' - '
IAbstractParser'
These stack multiple conventions without adding meaning. They tell the reader about inheritance mechanics but not about responsibility.
A name should answer “what is this class for?” before “what language feature does it use?”
Separate Abstract Classes from Interfaces Clearly
If you have both an interface and an abstract helper, give them names that show the relationship without being verbose.
Here the interface owns the conceptual name, and the abstract helper makes its supporting role obvious.
Let Usage Patterns Guide the Name
If subclasses are expected to be extended by framework code only, a supporting name such as Abstract... often helps. If the abstract type is part of the public domain model that other developers read first, the plain domain name is often clearer. In other words, name it the way people will talk about it in design discussions.
That is often the deciding factor in API design. A class that appears in public extension points benefits from a name that communicates intent immediately, even to developers who never inspect the inheritance tree.
Common Pitfalls
- Naming every abstract class with
Abstract...even when the domain name alone would be clearer. - Using
Base...for classes that are really domain abstractions, not implementation scaffolding. - Mixing several naming styles in the same architectural layer.
- Creating names that describe inheritance mechanics instead of responsibility.
- Reusing interface-style prefixes on abstract classes and making the type hierarchy harder to read.
Summary
- Name abstract classes by their role first, not by the fact that they are abstract.
- Use
AbstractorBaseonly when that improves clarity in your codebase. - Stay consistent within the same project or layer.
- Avoid redundant names that stack multiple conventions.
- The best abstract-class name is the one that makes the class’s purpose obvious to the next reader.

