Skip to content

Naming conventions #16

Open
Open
@mdrost

Description

@mdrost

I think you should think about naming conventions:

  1. When namespace should be in singular and when in plural form.
  2. Use or not smurf naming convention.

ad. 1. For example in Hydrator you have plural Annotations namespace which contains many annotations (as the namespace name impies) but then you have singular Handler namespace which contains many handlers.

IMHO if namespace contains collection of classes of shared type then name should be plural e.g ApiClients is plural because it contains many api clients. If namespace contains parts of something and each part represent something else then name should be singular e.g CommandBus in Github is singular because it doesn't contains many command busses but Command and Handler namespaces.

ad. 2. For example in Hydrator namespace Annotations contains annotations without Annotation suffix but then you have Handler namespace which contains handlers with Handler suffix.

IMHO this is a matter of debate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions