Subscribe rss
Blog categories

A few posts ago I published a proposed schema for the database design for a sample app which can process mobile to–go orders. As the first step in building the application, I put together a rather simplistic user interface mockup for the future app. You can see the mockup below:RestaunrantAppScreeens - Designing the restaurant app: UI mockups

The UI is not a distant departure from the database schema. The only change I can think of is the introduction of the “cuisine type” for the Restaurant entity. See the updated schema below:restaurant schema - Designing the restaurant app: UI mockups

The next step will be a series of posts where we design the client-side of the app for Android and iOS. Additionally, we will be exploring and reviewing various Backendless features as we move along.

Posted in Examples

In my post yesterday I showed how to declare relationships between tables. Once a relationship is in place, specific objects stored in the tables may be linked with each other. This linkage may be expressed through the code, where the instances of classes reference each other through the composition method. However, there are scenarios where these relationships may need to be created directly in the storage system. Backendless console is the development tool that lets you manage it using a graphical interfaces. The types of relationships you can build by hand can be either one-to-one or one-to-many. As a result of establishing a relationship between any two or more objects, you can retrieve the related objects using the API. For instance, in the example below a restaurant object will have a relationship with one or more location. When the restaurant object is retrieved via an API call, all the related locations can be retrieved as well.

Continue reading

In my of my previous posts I described how to add columns/properties to a Backendless table/class using console. The types of properties reviewed in that post were all primitive: string, numbers, dates or boolean values. In addition to these data types, Backendless also supports relationships between objects stored in its persistent storage. These relationships are classic composition types in the object-oriented world. That means a table may declare a property (column) which references either one or a collection of objects from another (or the same) table. When these objects are materialized on the client-side (assuming the language supports object-oriented programming), the properties simply reference related objects.

Continue reading

When a user registers for your app, it is quite common to make sure he provided a valid email address. Typically this is done by sending a URL to the user’s email address and ask him to follow the link. Once the link is opened in a browser, it serves as a confirmation of a valid email address. This is rather standard functionality of an application’s backend. Backendless makes it very easy to configure this behavior for any application powered by our platform. To configure email confirmations for your app:

  1. Login to Backendless console, select an app and click the Users icon.
  2. Click the User Registration menu.
  3. Locate the Require Email Confirmation section and switch it to ON. Once enabled, Backendless will send an email to the users who register to use your app. The email contains a link which the user must click to confirm his email address. When the email confirmation is turned on, newly registered users cannot login until they confirm their email address.
    email confirmation - Feature 10: Require email confirmation for user registration

Backendless database provides a very simple, but powerful API for storing, searching, updating or deleting application objects. The “feature 1” post demonstrates how to save objects with relations in Backendless using the APIs. In this post I will describe how to add new objects in the database using Backendless console. This might be helpful if you need to set up some test data, or perhaps enter some static values which are not meant to be entered through the API in an application.

If you do not have a table, you can create it using the console as well (see the how to create data tables using Backendless console post). To add a new object:

  1. Login to Backendless console, select an app and click the Data icon.
  2. Select a table for which you will add an object and click the New button.
  3. When a new object is being created, it is marked with an exclamation point icon:
    new object data - Feature 9: Adding data objects using developer console
  4. Backendless Console displays a new row and switches it to the editing mode where you can enter data for each column ( ignore the objectId , created , updated  and ownerId columns).
  5. Pressing Enter in any column (cell) will save the object in the database.
  6. Once the object is created, the console also displays the system values assigned to it by Backendless such as objectId  and the created  column.

In the previous feature highlight I described how to manually create data tables in Backendless console. In this post I will show how to setup a data table schema. A table schema in Backendless is a collection of table columns. Each column may have the following attributes:

  • Column name – identifies the column in the table and becomes a property in the objects saved in the table.
  • Data type – determines the type of data which can be stored in the corresponding object property. Available data types are: string (up to 500 characters), text (up to 3000 characters), datetime, integer, double, boolean.
  • Default value – when an object is stored and the property does not contain a value, Backendless assigns and stores the specified default value.
  • Validator – validates data in the property using either a built-in or custom (regular expression validator).
  • Constraints – defines restrictions for the column, such as that it must be unique, contain non-null values, etc.

To access the schema editor tool:

  1. Login to Backendless console, select your app and click the Data icon.
  2. Select the table you would like to edit the schema for and click the SCHEMA tab:
    schema tab data - Feature 8: Create data table schema in Backendless console
  3. When you are in the schema editor tool, you can inspect the existing table columns or add new ones.
  4. To add a column, click the New button. You will see the following popup:
    new column - Feature 8: Create data table schema in Backendless console
  5. Enter a name for the column and select the data type for the Type field. If you are not sure about the default value or the validator, ignore those fields for now – we will be reviewing them in future posts.
  6. Click CREATE to create the column.

Schema management includes a lot more tasks than just creating table columns. In the future posts we will be reviewing the following:

  • Configuring validators.
  • Configuring default values.
  • Renaming/deleting columns and relationships.
  • Creating relationships with other data tables.
  • Creating relationships with Geopoints.
  • Creating relationships with Files.
  • Configuring constraints.

As we are progressing with the feature a day blog series, I thought it would be a good idea to come up with a fictional app which I could use in the feature posts. The idea for the app I will use as an example is a restaurant ordering system. Using the app a customer (who would need to register and login) can choose a restaurant, browse the menu and submit an order. A restaurant owner would be able to login and see the orders. Additionally, the owner would be able to run a report to calculate daily revenue. The design for the app will be evolving as we go, however to start with something I put together a class diagram which shows the core entities present in the system:restaurant model - Building a restaurant app using Backendless

There are plenty of things we can add to the application. I can think of restaurant/menu recommendations, customer reviews, integration with payment systems, etc. This should be fun!

The article which shows how to store objects in Backendless also demonstrated dynamic data table creation. That approach is called “code first” – where the code dictates the database schema. However, a more traditional approach where you create the tables first and then write code which works with them is also supported by our platform. Creating data tables in Backendless is trivially simple. Please follow the instructions below:

  1. Login to Backendless console, select an app and click the Data icon.
  2. Locate and click the “plus” button as shown below:
    plus button in data - Feature 7: Creating data tables to store objects in console
  3. Enter the name of the table in the popup. A name cannot start with a number and cannot contain spaces or special characters. Click CREATE to create the table.
    create new table - Feature 7: Creating data tables to store objects in console
  4. Once a table is created, the console will ask you if you would like to define table’s schema. Schema management will be discussed in one of the future posts.


This post continues the series on the Backendless User service. Previously we covered user registration API, delivery of the welcome email upon the registrationlogin API,  and the ability to enable/disable user accounts. The feature highlighted in this post focuses on changing user’s password in the Backendless console. There are several ways to change the password, including using the API or by requesting password recovery. The approach reviewed here is reserved strictly for the administrator/developer of the application. To change user’s password in console, follow the steps below:

  1. Login to console, select an app and click the Data icon.
  2. The Users table should be selected by default. Make sure you’re viewing the contents of the Users table and find the user for whom you need to change the password.
  3. Locate the password column. The contents will appear blank for the reason that console never shows user’s passwords.
  4. Click the password cell for the user’s account and type the new password. Press Enter to finalize the password submission. The password becomes effective immediately.
    change user password - Feature 6: Changing user's password by administrator

Now that you know how to register and login users for your application, you might be wondering what degree of control over your user accounts you have with Backendless. As a developer of a Backendless-powered app, the console is the ultimate tool where you can control all aspects of your app. There many features in the Backendless console (and this series will describe all of them), but this post focuses on the feature that lets you enable or disable users. To experience the feature you need to have at least one user registered with the application. You can create a user by running the code from this example. Once you have a registered user, follow the instructions below:

  1. Login to console, select and app and click the Data icon.
  2. The Users table should be selected by default. The table shows all the users registered with your application.
  3. Find the user which should be disabled (or enabled) and locate the userStatus column. The cells in the column contain a drop-down box with the Enabled and Disabled values.
  4. To change the user status, make a selection in the drop-down box. Once a user’s account is disabled, he will not be able to log in and any API operations executed on behalf of the user will be immediately suspended.

The image below shows the userStatus column and the pencil icon to save the change as described above:
enable disable user - Feature 5: Enable or disable users of your mobile application