Skip to content

Use pattern names only if you mean them

Don’t use the names of software design patterns for classes and interfaces unless you really mean them. For example, don’t call your class file_factory unless it really implements the factory design pattern. The most common patterns include: singleton, factory, facade, composite, decorator, iterator, observer, and strategy.

Read more in Chapter 2: Meaningful Names: Avoid Disinformation of Robert C. Martin’s Clean Code

From SAP/styleguides under CC BY 3.0 — more details
Last updated on