Data Management

Appli offers robust data management features thanks to the many years of experience that the team spent developing LiveCloud. Appli itself is backed by the LiveCloud database. When you save your application to the Cloud, what happens behind the scene is that your app is stored in LiveCloud where it can be retrieved by the Appli Player.

The same powerful database system that powers Appli is available to you as a developer. It is easy to use and matches Appli development workflow in a way that other database systems simply can’t.

Local, Cloud, and Hybrid

There are three ways of storing data. Your choice is dictated by your applications requirements, but we believe that Hybrid storage is an ideal solution for most cases.

Storage type Description
Local The data is saved only to the user’s device. Any data sharing or replication needs to be coded by the developer.
Cloud The data is saved and retrieved from the Appli Cloud.
Hybrid The data is cached locally and synchronized with the Appli Coud.

Hybrid works best for Table Elements because:

  • It is fast because most of the data manipulation is happening locally before being synchronized over the cloud.
  • Works offline with eventual synchronization once the device is back online
  • The robust safe online storage makes it a lot easier to develop networked applications.

Both Form Elements and Layout Elements only offer choices to store data locally or on the Cloud. Hybrid storage doesn’t make sense for those elements.

Tables

Tables are what represents a collection of data in Appli. You can think of them in the same mental model you use for spreadsheets or a stack of forms. A collection of structured data that you can manipulate and query to find the information you need.

Your app can have as many tables as you need, and you can choose to store them locally, on the cloud, or use hybrid storage as described above.

Each table has a set of keys. Much like a form would have fields. A good example is a contacts table, it could look like this:

Sample contacts table

Creating a new table from scratch

The Data Manager button is a series of stacked discs on the bottom of the left-sidebar. Clicking it opens the Data Manager. Create a new table by clicking the New Table button.

Opening the Data Manager and creating a new able

Once you have the Table Setup dialog open. You can fill in your table name, chose where it is going to be stored, and add keys.

Table Setup

Using CSV files to bootstrap a database

A good way to bootstrap a table from existing data is to export that data using the CSV format and dragging and dropping it into Appli.

Appli will process the CSV file and open the Table Setup dialog pre-filled with the data from that file.

Binding data to elements

Once you have a table, you can use no-code to bind table data to elements. An obvious element to use is the table element. Using no-code you can select which table to display and which columns to use.

Displaying records using the Layout element

A Table can be connected to a Layout Element Using no-code. Once connected, the elements placed inside the layout can be bound to data from the table.

The layout can be configured in a way that it is tied to a specific record in the table or display multiple records as a list. Use the multiple rows property to change between these two modes. Once that property is set to the desired value, the interface for no-code setup will change to reflect that option.

Example of Layout no-code table setup with multiple rows.

Elements inside the layout can be linked direct to keys from the table or use template text to interpolate data from the table into a formatted text.

For more information, check the Data Management tutorial for a hands-on guide on building database-aware apps.

Manipulating data

Low-code has a category just for database manipulation. Everything is fully documented with dictionary entries for each action.

Using forms to edit and create records

Similarly to Layout Elements, Form Elements can contain other elements inside it. The elements inside a form share a database context, they can be connected to a table via no-code configuration and can be further linked to a Record ID set using a combination of low-code actions:

  • set_variable_from_context: to store the record id into a variable.
  • set_the_property_from_variable: to set the dataRecordID property of the form to the value contained in the variable set with set_variable_from_context.

Elements inside the form will have access to the data from that record. Any change to them using bound fields or low-code can be saved back to the same record.

A form that is connected to a table but doesn’t have a dataRecordID set can be used to create new records in the connected table via:

  • submit_form_to_db which picks data from the form and save to the database.

For more information, check the Data Management tutorial for a hands-on guide on building database-aware apps.