Class
The class editor within the class designer allows the user to customize their classes and database structures. This section dives into how to properly set up your class in your application.
Last updated
The class editor within the class designer allows the user to customize their classes and database structures. This section dives into how to properly set up your class in your application.
Last updated
Navigate to your Workspace > Apps and click on the gear icon to activate the configuration mode of your applications. Next, click on the gear icon of the application you wish to configure. In the Data section you click on Classes to access the Class Designer.
Next, select New Class in the toolbar of the Class Designer and choose a Base Class for the new class.
Base classes allow your class to be preconfigured with some properties through inheritance. Custom base classes can be created by defining a class as an Abstract Class.
A class contains Common, Mapping, Advanced and Permissions configurations. These properties are used to define how the class is stored and how it can be used in your application.
The Common section contains general properties of a class. In this section, you can specify how the class is presented in your application by setting the name, description and icon. The class type can also be defined based on how the class will be used in the application.
The class key acts as a unique identifier for the class in your application. This allows the class to be identified by other designers on the platform - e.g. the Query Designer.
The Key field is compulsory when creating a class.
The class name is a user-friendly name to help users easily identify a class. It can be defined in several languages by selecting the globe icon (on the right side of the text box).
The Name field is compulsory when creating a class.
The class description provides additional information that can be used as help text.
An image can be assigned to the class to further customize it.
This defines the color assigned to the class icon in the class designer.
The class type specifies how the application should treat the class. The options available to customize the class type are Is Abstract, Is Independent and Autosave.
Is Abstract
An abstract class is one that cannot be instantiated. It can be used as a Base Class when during class creation, allowing the new class to inherit all its properties.
Example: An abstract class can be created for new classes to use as Base Class - inheriting preconfigured fields such as Created Date, Modified Date and Deleted Date.
Is Independent
An independent class can exist on its own without any dependency on other classes in the application. This is closely related to how links work on the platform.
Autosave
By activating autosave, objects of the class are automatically saved to the database by the application when created or edited.
In case a class is not defined as Autosave, the application layouts should include a button to manually ensure that data is being saved to the database.
Classes are stored as tables in the database. The Mapping section defines how the class is identified on a database level by the platform and your application.
The mapping key specifies the name of the table for your class in the database. The platform caters for two different scenarios when mapping a class.
Creating applications from scratch
In this scenario, a new application with new classes is being created. The tables are generated when the classes are defined and saved in the Class Designer.
Legacy systems
In this scenario, an application is using a class that reads data from an existing database. This approach allows you to model existing (legacy) systems on the platform.
The Advanced section allows you to control how the platform and the application uses the class.
This field allows you to specify additional logic related to your class by linking it to a controller file that contains the required code.
Generally, the controller should be left as Default and only customized in unique circumstances.
Classes can be initialized from a document on the platform by specifying a document source.
This field defines which class field should be used to sort the elements of the class in a list.
The elements can be sorted in ascending or descending order based on this configuration.
This section allows you to specify which users or user groups can access the elements of this class or its data fields for reading or manipulating.