Message:

JavaScript (15 posts)

Great news, guys! Backendless 5 is now released and it’s time to show you some new features we’ve been working on.  In this article we will talk about how to integrate the Backendless Real-Time Database into your Angular application. Meanwhile, you can check out the previous version of our Angular app in this post. In case you haven’t read the post and don’t have that app  yet, please review the previous article, because we will use that application as a starting point for this tutorial. Or, if you just want to start working with the it right away, just download the source code from this GitHub commit.

ezgif 5 83e7494ea4 - How to use the Backendless Real-Time database in your Angular App

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

All available APIs for creating, updating and deleting objects in the Backendless database operate on single objects. It means when you need to store multiple objects in the database, each object requires a separate API call. This increases the number of API calls your app makes. While it is great for us (hey, our billing is based on the API calls), it is not that great for your app as it results in longer processing times and substandard user experience. Starting today, with the release of Backendless version 4.5.0 we’re introducing the new APIs which will allow you to create, update or delete multiple objects with a single API call.

Bulk Create

Saving multiple new objects in the database is now as simple as passing an array of objects to the server. The server responds with a collection of objectId values (which, for example, can be used in the createRelation  API). The bulk create API is supported in all SDKs as well as the REST interface.

Bulk Update

To update objects in the database, the API accepts a condition (where clause) which identifies a group of objects. In addition to the condition, the client must also provide an object containing the changes which should be applies to the selected objects.

Bulk Delete

Similar to “Bulk Update”, this API receives a condition which identifies a group of objects to be deleted.

All of the APIs can be extended using custom business logic’s before/after events.

You can find the documentation for these APIs in the developer guides:

This post describes the process of developing an API Service in Backendless with JavaScript. You will learn:

  • how configure your development environment
  • include NPM dependencies
  • run the service in the debug mode and test it using the Backendless console
  • deploy the service to Backendless

The service you will develop in this guide will provide APIs for controlling a LIFX wi-fi enabled light bulb. This very service is used in the article describing how to integrate Amazon Alexa with an IoT device using Backendless. This article references IntelliJ IDEA as the IDE, however, it is not required, you can use any code editor. Make sure to create a Backendless account and create an app in Backendless Cloud (the free tier or the trial option will be plenty to proceed).

Continue reading

Performing a calculation on a group of database objects may be a complex task. For example, to calculate the sum of all orders for a customer would require retrieving all customer’s orders, iterating over them to calculate the mathematical sum of all amounts. This was yesterday! As of Backendless 4.4.0, you can use aggregate functions to calculate the average, sum, maximum and minimum values for a collection of objects without retrieving them from the server. Additionally, the system supports calculating object count for all records in the database or a record subset.

To use an aggregate function, simply request a property in a data retrieval request in the following format (the example below is for calculating the sum for the orderAmount  column):

The returned object includes the sum  property with the calculated value:

The name of the property can be modified by assigning an alias (using %20  to replace the spaces in the URL):

The result contains a value for the property named after the alias:

Grouping Results

Results can be grouped by a column. The column could be either in the same table or a related one. For example, the following request retrieves the sum of all orders grouped by related country:

Unlike the response above, the result for this query includes a collection of objects, each containing the sum for a related country:

It is also possible to apply a filter on the grouped values. This can be done using the having  clause. For example, the request below retrieves only the groups of countries where the total order amount is greater than 10000:

For more information about aggregate functions see the Backendless API documentation:

For anyone developing business logic in JS, we have put together some suggestions for troubleshooting your deployment. The page is added to the product documentation. One of the new features described in the doc is the ability to redirect console.log  messages to Backendless logging. Once your JS code is deployed to production, messages from the console.log  calls will be routed to the log file wit the SERVER_CODE  logging category.

timerlog - Troubleshooting JS business logic

BLOG typescript - Developing TypeScript apps with BackendlessOne of the goals we have at Backendless is to make the platform uniformly available for different types of client technologies. The platform is truly cross-platform and it is a matter of time/effort to make it available to a new client environment.

Since we already have a super powerful SDK for JavaScript, creating a bridging technology for TypeScript was rather straight-forward. I am happy to announce that if you are building TypeScript apps, you can start taking advantage of everything Backendless has to offer. We put together a Quick Start Guide for integrating TypeScript with Backendless to make it easier for you to get started. Please give it a try and let us know how you liked it.

Posted in JavaScript

angular2 - Backendless and Angular 2If you have been waiting for Angular 2 support in Backendless, the wait is over. We have finished the integration of the Backendless SDK for JS and now it is available for TypeScript. An important side effect of this integration is support for the Angular 2 framework. The integration enables complete support of all Backendless APIs from an Angular 2 application. To help you get started with Backendless and Angular 2, we put together a Quick Start guide. Please let us know what you think. If you run into any problems, please post to the Backendless support forum.

Posted in JavaScript

We just pushed a new release to our production servers. The release includes multiple new features and a ton of improvements. Below is a summary of what went into the release. There will be a blog post with a video providing an in-depth review of each new feature:

Continue reading

Tizen is an open source platform residing within the Linux Foundation. It includes an operating system which can run smartphones, tablets, netbooks, onboard devices in smart cars as well as smart TVs. We wanted to see what it would take to integrate a Tizen app with Backendless because the benefits of such integration would be huge. For instance, data can be easily shared between different implementations of an app: a Tizen version of the app can easily communicate with the one running on Android or iOS by the means of Backendless service APIs.

Continue reading

Find us in facebook