Working with objects

The App Builder is designed on the principles of Object-Oriented Programming (OOP), a meaningful paradigm that streamlines code creation, making it both easier and faster. Applying these OOP concepts empowers the App Builder to provide a straightforward method for creating extensive, complex, and individual low-code-based apps.

OOP concepts

  • A class is a blueprint defining what an object can do and the type of data it will store.

  • An object is a specific instance created from a class, containing data and able to perform defined actions.

  • An object function is a function within a class, representing actions the object can perform; often referred to as methods in OOP.

For example, the App Builder contains an HTTP/REST connector that represents a class. A specific connector instance, which is an object, can be created from this class. This object encapsulates data such as the connection URL and has object functions for executing actions. For instance, it can use the get function to retrieve data from the defined URL.

Managing objects

Essentially, there are two functions to manage objects:: create and delete. Unlike regular functions, these don't directly add features to the app but serve as essential building blocks during app development.

Creating objects

To construct a specific object from a class:

  1. Drag and drop the create function of a class to the logic board.

  2. Enter the name for your object and any required input arguments.

  3. Trigger the function manually.

The new object, along with its object functions, will appear under the respective class. If you like, you can delete the create function after execution. This action does not impact the object itself.

Objects are shared across Workspaces and thus accessible from all apps within a Workspace.

Deleting objects

Exercise caution when deleting objects, as they may be in use across workspaces and other apps. To delete an object:

  1. Drag and drop the delete function of a class to the logic board.

  2. Enter the name of the object as an input argument.

  3. Trigger the function manually.

If the object doesn't disappear immediately, it indicates lingering object functions on the logic board. Delete them to remove the object.

Be cautious about deleting objects, as they are shared across Workspaces, and their removal may affect other apps using the same objects.

Explainer video

Last updated