Attributes - Which is better First_Name or FirstName

I have a basic question, what is the best methodology to use when naming attributes in entities?

First_Name or FirstName ?




As per my understanding we should use FirstName as a attribute in DB.



Hi Otis,

By using naming conventions you make code more easy to understand by fellow developers that maybe need to read or change your code.

The OutSystems naming convention uses CamelCase.

So I suggest you use FirstName instead of First_Name.

There is another benefit, the length of names are limited in OutSystems. So with CamelCase you have more positions available for a meaningful name as you do not loose positions on one or more underscores.




Hi Otis,

There are multiple factors that you can consider to come up with what best suits your application, below are some pointers.

1. The standard naming convention used in your or customer's organisation. Usually every organisations has its own standards defined.

2. Readability - With Camel case too one can easily distinguish words from each other, however with underscores in between makes it more readable.

3. Max Length Restriciton - This could still be overcome using abbreviations which are typically defined at project or organisation level. Further you have description attribute which could be used to add more information for each entity or its attribute.

To conclude, first follow the standards defined within your or customer's organisation, and if there are none then go with what suits your project as well as your team the best. However, ensure that you follow one or the other approach consistently. 

Hope this helps!


Hi Otis,

In addition, check out the Platform Best Practices with regard to Naming Conventions.