Best practice data classes

The purpose of this document is to provide best practice guidelines when developing in Version 7 native mode.

The following rules are considered ‘best practice’ when developing a data class:

Class name

Be consistent. Use the same code throughout the development process. A data class should have the same code as the main data table. For example, if the data table code is "MYCODE", use "MYCODE" for the data class code.

Class property names

Be consistent. Use the same name for class properties as used for the data table properties. This allows the trans-class between table and class and vice versa.

Even if it’s not technically mandatory, assign a single code to a property in the data table and the data class. It is easier to understand and to maintain.

Class information

A class implements standard Create, Read, Update, and Delete (CRUD) methods and custom methods on data. It must only contain data that is relevant to these methods.

Parent / Child classes

Developing a class for mobile and desktop

Unit tests

Data class best practice summary