Backendless Blog

Subscribe rss
Blog categories

Earlier this year I wrote about building a sample to demonstrate various APIs of the platform. There is also a post describing the database schema and app’s storyboard. The application is now ready and I will be posting a video tutorial detailing every step of building an app, including the following:

  1. Development environment setup
  2. User registration screen and API
  3. Login screen and API
  4. Using Backendless code generation for Android
  5. Retrieving and displaying data (listing of restaurants, locations and menus)
  6. Order summary and order confirmation

At the end of the tutorial, you will know how to build a data-driven app with Backendless, how to use the User Service APIs (registration, login, email confirmation), with with the relational persistent data, use Backendless console to manage data objects.

Below is an introductory video where you can see the complete app in action.

Posted in Android, Examples

With Backendless all data accumulated on the server-side belongs to you – the owner of the application. If you ever need to extract all the data from the backend, it could not be easier – Backendless console makes it trivially simple. Data export produces a ZIP file which may contain:

  • application settings
  • data tables with data or just schema definition
  • geopoints

The export process is quite sophisticated, it takes into the considerations any relationships which may exist between the data tables as well as data-to-geo relations. The console provides a way to select the data tables you need to get an export for or with a single click you can select all available data tables. Likewise, you can select either specific geocategories or all of them for export which will include the corresponding geopoints.

The format of the exported data is JSON for application settings and CSV for data records and geopoints. The export functionality is available at Manage > Export in Backendless console. Below is the screenshot of the export user interface:

Posted in Feature-a-Day

The Backendless Geservice supports a variety of ways for geopoints. So far we have reviewed how to search for geopoints in a radius or a rectangular area. There is also a partial match geopoint search. In addition to that, Backendless console provides yet another way to search for data – the cross-category search. As the name suggest, this search let’s you run SQL based queries across multiple categories. Enabling that search is very easy:

  1. Login to Backendless console, select an app and click the Geolocation icon.
  2. Click the Cross-category search toggle in the upper right corner of the user interface.
  3. Backendless console hides the geo categories and now you can enter an SQL query to search for data. Assuming you added the sample geolocation data, enter the following query:
  4. The console finds all geo points which satisfy the query and displays them in both data table and the map. The data table also shows the category each geopoint belongs to.


Based on my research of the space we are in Backendless is the only mBaaS platform that lets you use SQL queries when searching for data. The geolocation data managed by Backendless is not an exception. A geopoint may include metadata, which is an arbitrary collection of key/value pairs. Geopoints may be searched for using SQL based queries. A query must be the “where” part of a traditional SQL statement. It can reference the metadata properties as if they are table columns.

The example below uses the sample data which can be installed into any Backendless backend. The data is a collection of geo points representing cities around the world. Each geo point contains metadata with the name of the city. The sample below runs the following SQL query:

Continue reading

Directories in the file storage can be created implicitly as a result of uploading files using the File Service API. Alternatively, a directory can be created using Backendless console. To do that:

  1. Login to Backendless console, select your app and click he Files icon.
  2. Navigate to a directory where a new directory should be created (or just stay in the root one).
  3. Click the New Folder button.
  4. Enter the name of the directory in the popup and click the Save button.
  5. The directory is created and can be used right away in console as well as the APIs.

In my previous post I introduced the publish/subscribe messaging API. The API can be used to broadcast messages which can be received by multiple client apps.

Note: it is important to distinguish the pub/sub messages from the Push Notification ones. There is a number of technical differences and the purposes where an app should use one mechanism or the other.

When developing and debugging applications which use the Backendless pub/sub API, it may be very handy to publish messages without writing additional code. For this purpose, Backendless console supports the message publishing function. To see it in action, run the subscriber code from the previous post and then:

  1. Login to Backendless console, select your app (must be the same app which the subscriber app uses) and then click the Messaging icon.
  2. Make sure the default messaging channel is selected. Enter the text of the message into the Message text area and click the Publish button.
  3. The message will be displayed in the table of messages in the Messaging screen as shown in the image below. Additionally all the subscriber apps receive the message.


Publish/subscribe messaging has been around for a long time. The concept is rather simple – a program can publish a message to a queue or a topic, while another program subscribes to the queue or the topic to receive published messages. There are a lot caveats in the model with conditional delivery, message filtering, message transformations, etc. In this post I will demonstrate the most basic form of publish/subscribe messaging. One client will be publishing basic string messages, while any number of other client apps can subscribe to receive published messages. Consider the following example:

Continue reading

Whenever a need arises to quickly create a user for your app, you can always use Backendless console as it makes the process trivially simple. This approach requires no coding at all and the created user can login and start using your application right away.

To create a new user with Backendless Developers’ Console:

  1. Login to Backendless console, select your app and click the Data icon.
  2. The Users table is selected by default. Click the Add New button.
  3. The console adds a new row to the Users table and changes the first editable field into a textbox. Enter all the required fields, scroll the row all the way to the right and click the pencil icon to save the user record.
  4. If your app is configured to send out email confirmations, an email will be sent to the user. However, you can also change the new account to the “enabled” state.
  5. If your user entity contains relations, you need to save the user record first and then create the relations between the user and other data objects.

Backendless is not just a mobile backend – it also provides hosting and runtime support for browser-based applications. Indeed, we offer a fully-featured SDK for JavaScript apps. Unless you host your Backendless-powered app in our Hosting system, you will be running into cross-origin domain requests. This occurs when an application is loaded into a browser from one host, but then it makes a request (XHR, socket, etc) to another host. In the case of Backendless, the second host would be the backend platform we provide.

Continue reading

There are plenty of use cases when mBaaS-powered applications must use centralized mechanism for incrementing or decrementing a value.There are several approaches for maintaining a counter – some apps use a database, others keep it in the server-side business logic.

Backendless offers a specialized API for working with atomic counters. The API is cross-platform – any number of different clients (including REST) can work with the same counter and update it concurrently. Every counter in Backendless has a name, which is assigned by the client application. The sample below demonstrates the API for incrementing and retrieving the value of a counter.

Continue reading

Posted in Feature-a-Day