Transcription

Establishing naming conventions for your application early on can help make your code easier to understand for yourself and others on your team. Let’s take a look at some table names. We like to follow the convention of singular nouns for table names, as we think of records in a table as single entities, so a record in a task table is a single task.

Let’s move on to field names. We can see here that this application is following the convention of Upper Camel Case. Other conventions you might see are Lower Snake Case, or Lower Camel Case. In FileMaker, field names can contain spaces, so you might also see this.

Whichever convention you choose, the most important thing is to remain consistent. Something else you may see are field names that are prefixed with the letter Z. People do this so that when you sort by field name, you can sort fields that you don’t necessarily want to see all the time to the bottom of the list. These are things like created by, modification timestamp, modified by. Other prefixes you might see are fk, standing for foreign key. If you prefix all your foreign keys with fk, you can group them all together just by sorting by field name.

Let’s move on to the relationship graph. We can see that this app is following anchor buoy. The convention we follow for naming our table occurrences in anchor buoy is to first set our anchor’s name. It’s going to be the first letter of the anchor table name, followed by 2 underscores, then the anchor table name. Our buoys have the first letter of the anchor, followed by an underscore, then the buoy table name. Buoys further down the chain have the first letter of the anchor table, any intermediate table names, then finally the name of the buoy.

Something else you might come across on the relationship graph are table occurrences that contain a tilde, followed by some descriptive text. You typically do this when you are applying some special condition to the relationship. For example, if we were to create a sort condition, we might do this (see onscreen). Similarly, if we were to create a Cartesian joint, we might do this (follow onscreen).