Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naming conventions #16

Open
mdrost opened this issue Apr 12, 2017 · 1 comment
Open

Naming conventions #16

mdrost opened this issue Apr 12, 2017 · 1 comment

Comments

@mdrost
Copy link
Contributor

mdrost commented Apr 12, 2017

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.

@WyriHaximus
Copy link
Member

Maybe we should set up a repo with conventions and schema how to set things up. I'll set that up and start writing things out soon. Personally I think consistency is more important then conventions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants