Standards, best practices and how-tos for developing OutSystems applications
Customer
not Customers
Customer
If you’re naming entities that represent real-world facts, you should use nouns. These are entities like Employee
, Customer
, City
, and Country
. If possible, use a single word that exactly describes what is in the table. On the example of our 4 Entities, it’s more than clear what data can be found in these Entities.
For relations between two entities, it’s good to use these two entities’ names and maybe add a verb between these names to describe what that action is.
Imagine that we have entities User
and Role
. We want to add a many-to-many relation telling us that a user had a certain role. We could use names UserHasRole
, or if we want to be shorter – UserRole
.
We could always make exceptions if they are logical. If we have entities Product
and Invoice
, and we want to specify which products were on which invoice, we could name that table InvoiceProduct
or InvoiceContainsProduct
. Still, using the name InvoiceItem
is much closer to the real world. Still, that decision is completely up to you.
Id
.CustomerId
, EmployeeId
. This will tell us that this is a foreign key attribute and also point to the referenced entity.Customer
: Name
, Country
. If you expect that 2 entities will have the attribute with the same name, you could add something to keep the name unique.StartDate
and EndDate
are pretty descriptive. If you want, you can describe them even more precise, using names like CallStartDate
and CallEndDate
Is
e.g. IsActive
, IsDeleted