May, 2018 | Backend as a Service Platform

Message:

Monthly Archives

May, 2018

Backendless Marketplace is a specialized store for backend functionality. Our vision for the marketplace is to make it a community driven store for algorithms and API services. We also use the Marketplace for various  Backendless”extenders” to help developers to increase the limits of the Backendless Cloud pricing plans. However, most importantly, the Marketplace can be used for sharing your API services with other developers.

By publishing your Cloud Code to the Marketplace, you can share your business logic components (e.g.: API services, event handlers and/or timers) with other Backendless developers. Once your Cloud Code is published, it becomes a Marketplace product and will be visible to all Backendless users (developers). In the upcoming releases, we’ll add a possibility to set a price for your products allowing you to charge a fee for every successful installation.

Backendless Marketplace   Backend as a Service Platform Google Chrome 2018 05 31 21.54.32 1024x568 - How to publish a service to Backendless Marketplace

Continue reading

Today we will talk about the integration of Backendless into your AngularJS/TypeScript app. You will create a simple Address Book application where all the application data will be stored in the Backendless mobile backend. The main goal of this article is to provide step-by-step instructions and to show how to create an Angular application with Backendless mBaaS.

BackendlessAngular 10 - How To Create A Web App Using Angular And Backendless

Continue reading

In this article, we will learn how to create QR codes with a custom Backendless API Service. For the sample code reviewed later in the article we will use Java and the ZXing library (https://github.com/zxing).

What is a QR code?

A QR code is a computer generated image with some information encoded in a graphical way. The information may include text, numbers, a URL – pretty much anything your app may need to represent in an encoded manner. What makes QR codes very useful is the encoded information can be then decoded by any device with a camera.

Below is an example of a QR code with the encoded link to Backendless Console: https://develop.backendless.com:

pasted image 0 4 - How to generate a QR code with Backendless API ServiceYou can ‘read’ it with an iPhone (just use the standard camera app) or with an Android device if you install a QR Code reader app (check out Google Play, there is a ton of QR reading apps). Once the code is scanned, the encoded URL will be opened automatically in your web browser.

(For more details, click here: https://en.wikipedia.org/wiki/QR_code)

Continue reading

This series of tutorials was prepared by:

download - How to create the LinkedIn clone using Backendless

 

Ega Wachid Radiegtya
An Entrepreneur & App Developer

You will learn how to make your own LinkedIn clone on Android, using React Native, React Navigation, Redux and Backendless.
The following tutorial series is exactly what you’re looking for if:

  • You have a basic knowledge of React/Redux
  • You’re looking to learn how to make apps in the most simple way
  • You want to try using mobile backend for your apps

Technology stack:

  • React
  • Redux
  • Backendless

What you will learn:

By following the instructions in these articles, you’ll get the knowledge and skills required to build simple Android apps using Backendless mBaaS for your business logic.

Summary:

Part 1: Introduction

You will learn about the tools required for the task and how to set up the development environment to proceed.

https://medium.com/@radiegtya/build-linkedoff-using-react-native-redux-and-backendless-part-1-introduction-9575221f35db

Part 2: RN Setup 

You will do your first steps to get some basic functions for your app.

https://medium.com/@radiegtya/build-linkedoff-using-react-native-redux-and-backendless-part-3-backendless-setup-eb9c8c60197e

Part 3: Backendless Setup

You will get familiar with Backendless and start building the server side logic for your app.

https://medium.com/@radiegtya/build-linkedoff-using-react-native-redux-and-backendless-part-3-backendless-setup-eb9c8c60197e

Part 4: RN+ Backendless; Building The App

You will finalize the visual part of your app and will get a functional Linkedin clone.

https://medium.com/@radiegtya/build-linkedoff-using-react-native-redux-and-backendless-part-4-rn-backendless-c0e5645c89b5

Backendless and Firebase, both being mobile BaaS platforms, are presenting different capabilities for mobile apps creation.

Here is a list of the Backendless features which either are not supported by Firebase or just exceed it in usability.

  1. Backendless Pro (the standalone, self-hosted version of the product) can be installed on the developer’s computer, a private data center or a public cloud. No matter where it’s installed, the product has no functional limitations whatsoever
  2. With Backendless you can fully customize permissions for users, and also configure permissions for custom user roles, which is not supported by Firebase
  3. Backendless allows you to develop the server-side algorithms and business logic without actually writing any code using Codeless Programming
  4. Firebase does not support native aggregate functions in database queries. With Backendless, you can calculate average, sum, min and max values for a collection of objects without retrieving objects from the server. It is also possible to find the object count for all the records in the database or a subset of records

    For example, the aggregate function sum allows you to calculate the mathematical sum for a set of objects. For instance, you can take the Movie table from the presented database.DB - Five things you cannot do with Firebase (but can with Backendless)
    Just run the following query to get the amount of topBoxOffice of all movies:

    The output is an object with the sum property:

    Backendless also supports results grouping for a column. This column can either be found in the original or linked table. For example, the following query will display the sum of all the orders grouped by a country:

    The output for this request is a collection of objects, any of which contains the total amount of orders for a particular country:

    You can also add a filter to the grouped objects using the having condition. The following query will return only groups of countries with the total amount of orders > 10000 . The output for this request is a collection of objects, any of which contains the total amount of orders for a particular country:
  5. Since Firebase uses JSON document as a database, it becomes extremely difficult (or in many cases impossible) to create relations between objects. Backendless makes it convenient to manage the relations (create, modify, delete) both via Console and with the API. In Firebase, you need to duplicate the data for each element, which causes synchronization problems for the identical objects that have one-to-many relations.

It is worthwhile to point out the following:

  1. Backendless allows you to import data from Parse. Importing data from external databases will become available soon as well
  2. Firebase, unlike Backendless, does not allow you to make complex queries on the server, only basic filtering is supported. For more details see: backendless.com/docs/rest/doc.html#data_search_with_subquery
  3. The Backendless Console is way more convenient and has more functions, compared to the one in Firebase
  4. Backendless support is beyond comparison. Here’s what real users have to say
  5. Backendless version 5 launch happens soon! New features are described here

 

Posted in Uncategorized

In this article, we’ll talk about Backendless publish-subscribe messaging. One of the frequent questions we receive is: ‘How to get messages long after they are published.’ The default mechanism in Backendless keeps messages in the published channel for a short period of time only (around a minute). This becomes a problem if subscriber needs to have access to the messages after that time period has passed. This article describes an approach for storing published messages in Backendless database in order to keep published messages accessible even when they are no longer present in a messaging channel.

Publish-subscribe is a Backendless messaging pattern. The main idea here is to exchange data between a publisher* and subscriber** within a messaging channel***.

publisher – a program using the Publishing API to send messages to a channel.
** subscriber – a program using the Subscription API to receive messages from a channel.
*** channel – a logical intermediary “transporting” the messages.

In order to keep messages accessible for an infinite period of time – you can save messages into the Backendless database right after they were published. To accomplish this, we’ll need to combine Data service API and the afterPublish event handler which can be added to the Business Logic tab of your Backendless application.

handlerConfig 1024x565 - How to save published messages in the database

Once it’s added, just download the afterPublish handler code from ‘Download’ menu (you can select JavaScript or Java). Then open the generated project in any IDE and add the code to store published messages in a Backendless data table.

Alternatively, the afterPublish event handler can be added and deployed to cloud without any coding at all using Codeless business logic. Here are the steps of how it can be done:
1. Add new Codeless event handler Selection 143 1024x519 - How to save published messages in the database2. When the handler is saved, Codeless designer will be opened. Add the following blocks to your Codeless logic. When done – click the ‘DEPLOY MODEL’ button.
Selection 144 1024x535 - How to save published messages in the database
Voila!

To avoid nulls, every message should be published with a not null value for publisherId :

For this scenario we’ll need to create a data table (Data > APP TABLES in your Backendless application) called ‘ChatHistory’ and define the following schema in it:

  • Column publisher of type String 
  • Column messageData of type String 

dataTable 1024x557 - How to save published messages in the database

Once code for the handler is added, deploy the handler code to cloud using the following command in your IDE terminal:
./bin/Deploy.sh
Since the handler is deployed, every new message published to chatRoom channel will be stored in a dedicated data table and will be accessible at any required moment by calling an API to retrieve data from a table:

You will receive the following output:

Find us in facebook