Skip to main content

Subnames

Introduction to subnames

Subnames are a way to create a consistent format for the names of your model objects. They help ensure that all developers use the same names in the same context.

A subname group contains all the approved and disapproved subnames for a particular model or branch. Typically, a generic subname group is used. It is possible to deviate from this if you are creating an application that uses context-specific terminology (for example, financial jargon).

Subnames can be maintained outside the model context to allow different models and/or branches to use the same source (for example, because there are several models in the company that need to be developed based on the same naming conventions). See Manage subname groups.

Validations are available to show where a subname is used. For most objects, you can also update these subnames there if necessary.

We recommend to use only approved subnames and explicitly approved new subnames.

Naming conventions

Follow these naming conventions to get an accurate data model within the Software Factory:

  • Define table names in the singular.
  • Avoid defining tables in the plural and columns in the singular. Using both singular and plural names leads to an unnecessarily large set of subnames and translation objects.
  • Use lowercase for id columns.
  • Use underscore characters instead of spaces in composite words.
  • Only for models developed with Dutch names: do not use an 's' connection, but write the words separately with an underscore (for example, use 'gebruiker_naam', not 'gebruikersnaam').
  • Repeat the table name in an ID and description column of a table, not in the other columns. This is very important because the name of a primary key field is passed to the foreign key by default. It prevents a table from having multiple foreign key columns named id, which is impossible because a column name must be unique within a table.

Example of using naming conventions

The sales order object is written in the Software Factory as sales_order and consists of the subnames sales and order.

It is agreed in the model that sales is always used and never sale; sale is therefore a disapproved subname. The plural orders is also a disapproved subname, since the singular order must always be used.

The example follows these conventions.

Subname groups

Set a subname group for a branch

You can select one of the existing subname groups to use in your branch.

To set a subname group for a branch:

menu Models > Model overview > tab Branches > tab Model settings

  1. In the group Subname group, select the subname group from the drop-down list. If no subname group exists, an empty subname group is added automatically. You can also first create a new subname group.

Create a subname group

To create a subname group:

menu Models > Model overview > tab Branches > tab Model settings

  1. In the group Subname group, click .
  2. On the tab Form, add a new Subname group name.
  3. Proceed to Manage the subnames in a subnames group to populate the subname group.

Manage the subnames in a subname group

You can manage the subnames in the subname group that is selected for your branch (see also Set a subname group for a branch):

menu Quality > Subnames

Here, you can:

  • Execute the task Approve selected subnames approve.
  • Execute the task Generate subnames generate to create a list of subnames that are currently used in the branch.
  • Add a new subname.
  • Select an existing subname in the list of subnames and edit it.
  • Remove a subname.
  • Filter the list of subnames to only see subnames with status Not approved hide or Object exists hide.
  • Use the tab Similar subnames to check if there already is an approved subname similar to the one that you have selected in the list.
  • Use the tab Object names to view which objects use the selected subname.

Using the tools on this screen, you can, for example, validate if a new subname is correct. A new subname could be the result of a typo. The correct subname is already available, according to the tab Similar subnames. In that case, you can use the tab Object names tab to check where the subname is used. The names of the objects in which the incorrect subname is used can then be corrected.

Manage subname groups

To manage subname groups:

menu Advanced > Model management > Subname groups

Select the Subname group that you want to manage in the list.

Here, you can:

  • Execute the task Approve selected subnames approve.
  • Select an existing subname in the list of subnames and edit it.
  • Add a new subname.
  • Remove a subname.
  • Copy an existing subname group to use it as a starting point for a new subname group. To do this, execute the task Copy subname group copy from the ribbon or the context menu.
  • Use the tab Object names to view which objects use the selected subname.
  • Directly edit object names that use the selected subname on the lower-right tab.

Was this article helpful?