Message:

Monthly Archives

December, 2017

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

This is Part 2 of the article about developing an Amazon Alexa skill without any coding. In Part 1 you learned the following:

  • How to create a Codeless API Service responsible for handling Amazon Alexa requests. The service completely removes the need for adding AWS Lambda functions, it also runs without any cost in the free plan of Backendless.
  • How to use the Backendless SDK for Alexa to send a response back to Alexa from a custom skill.
  • How to create a basic Alexa Skill and test it from the Amazon developer console.
  • How to invoke the skill on Alexa, process the invocation in your Codeless Backendless API service and get a response back on Alexa.

In this part of the article, you will learn the following:

  • Creating voice interaction model with “slots” – special placeholders for the “dynamic” parts of the requests for your skill
  • Processing slots in the Codeless API service in Backendless.
  • Executing codeless logic to do something useful and generate a meaningful response.

It is recommended (more like required) to go through Part 1 just so you have the basic environment setup. Also, make sure to watch the “Developing an Alexa Skill without any coding” video which shows the entire process in action.

Continue reading
Posted in Alexa, Codeless

backendless pro v4 - Backendless Pro version 4 is released

Backendless Pro, the standalone version of Backendless, is now officially released and is available for download. The new release includes the latest version of the Backendless Platform. Version 4, which was originally launched only for the Backendless Cloud product is a major improvement over the previous version.

The version 4 release includes:

  • Completely redesigned Backendless Console;
  • Support for both Java and JavaScript business logic;
  • Codeless Programming;
  • Significantly improved data querying capabilities;
  • Redesigned code generators;

The new Backendless Pro includes a free trial mode. See the Backendless Pro product page for details.

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:

Find us in facebook