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 convension (plural or singular?) #32

Open
zztczcx opened this issue Oct 27, 2021 · 1 comment
Open

Naming convension (plural or singular?) #32

zztczcx opened this issue Oct 27, 2021 · 1 comment

Comments

@zztczcx
Copy link

zztczcx commented Oct 27, 2021

Hi, I am new to commanded and I come from the rails.
I found there are two big contexts or aggregates. one is called blog (lib/conduit/blog), another is called accounts(lib/conduit/accounts).

I am not sure if we need to keep some kind of consistency for these two naming ?

which is better or how to choose , as in rails, we normally have convention about naming.

@slashdotdash
Copy link
Owner

slashdotdash commented Oct 28, 2021

I'm not sure whether there are any rules around whether contexts need to be consistently named in either plural or singular form. For example the Phoenix documentation on Contexts defines three contexts named as Catalog, ShoppingCart, and Orders.

Naming things is hard. If you're stuck when trying to come up with a context name when the grouped functionality in your system isn't yet clear, you can simply use the plural form of the resource you're creating. For example, a Products context for managing products. As you grow your application and the parts of your system become clear, you can simply rename the context to a more refined name at a later time.

You are free to enforce any convention you like, or none at all.

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