Gianluca78
Gianluca78

Reputation: 784

Symfony2, Doctrine and data domain

In a Symfony2 project with Doctrine as ORM, I have many entities dedicated to store data domain.

According to your experience:

  1. which is the best naming convention for this data domain entities (for instance, is good to name "ProvinceDomain" the entity that will store all the province values)?
  2. do you put data domain entities in a specific folder (for instance "Entity/DataDomain")?
  3. do you prefer a prefix (for instance "domain_") or a suffix (for instance "table_name_domain") to name the domain data tables? Or do you use some other naming convention?

Thank you very much.

Upvotes: 0

Views: 63

Answers (1)

Lisandro
Lisandro

Reputation: 73

1) I think that the correct name is Province. "Domain" is like a role. IMHO it doesn't have to be in the name. So, the full name could it be: CoreBundle/Entity/Province or xxx/Entity/Core/Province.

2) In some projects I placed that kind of entities in a folder "Entity/Core". At other times I have solved it in a specific bundle, for example, "CoreBundle/Entity".

3) I see well that you call tables like "table_name_domain". Note that table is data, and it is not bad to categorize information as "domain"

Upvotes: 1

Related Questions