Skip to main content

USE common consumer class naming convention

Developers should follow common consumer class naming conventions to ensure consistency and clarity across their codebase. By adopting a standardized naming convention, developers can make their code more readable and understandable, especially for new team members or external contributors.

In the case of the convention where the action is written first, followed by the "When" keyword, and then the passive event name, such as "SendWelcomeEmailWhenUserCreated," the convention clearly identifies the purpose and function of the consumer class. The convention makes it easy to understand what action the consumer will perform and under what circumstances it will be triggered.

Moreover, by following common consumer class naming conventions, developers can reduce confusion and minimize the likelihood of naming conflicts. When naming conventions are consistent, team members can easily locate and understand the intended function of a consumer class, without having to spend additional time and effort deciphering unfamiliar or inconsistent naming schemes.

Overall, adopting common consumer class naming conventions such as the "action-when-event" convention can help developers write cleaner, more understandable code, leading to increased productivity and more efficient collaboration among team members.