• Home
  • Articles by: Stanislaw Grin

Author Archives

It is common for developers to build apps where users will have varying access to data and elements within the app based on the user’s role. Being able to limit user access is important to data security, user management, and often, the financial success of the application as user access is commonly tied to how much the user pays. In this article, we are going to show you how you can hide some object properties based on the user’s role. To accomplish this, we will be using Event Handlers.

Hiding Object Properties

An event handler is custom, server-side code that responds to an API event. For every API call, Backendless generates two types of events – “before” and “after”. The “before” event is fired before the default logic of the API implementation is executed and the “after” event is triggered right after the default API implementation logic. An event handler can respond to either one of these events. A synchronous (blocking) event handler participates in the API invocation chain and can modify the objects in the chain’s flow. For example, the “before” event handlers can modify arguments of the API calls, so the default logic gets the modified objects. Similarly, an “after” handler can modify the return value (or exception) so the client application that made the API request receives the modified value. For more about Event Handlers, you can read the documentation.

By the end of this guide, you will have a Backendless application with a custom API event handler that modifies objects received from a table and removes restricted properties based on the user’s role.

Continue reading

In one of my previous articles, I showed how to develop a custom Alexa skill using an example of a Trip Planner app  (How To Build A Dialogue Custom Alexa Skill Using JavaScript (Without Lambda). In this article I will show you a more complex example of the interaction between Alexa and the user. Today will build a  “Guess My Number” game where Alexa (or technically the skill) thinks of a number and the user tries to guess it while the skills suggests whether it is lower or higher. Here’s a sample dialogue a user may have with Alexa once you implement the skill:
guess-my-number-example1 guess-my-number-example2

Continue reading

Backendless 5 is now released (hooray!) and it offers a bunch of new powerful capabilities. One of them is support for development of custom Amazon Alexa Skills. In this post I am going to demonstrate how easy it is to create a custom skill using JavaScript. You will learn how to control the dialogue flow between the user and Alexa using Backendless and custom Cloud Code.

An example we will build a trip planner skill, albeit a trivialized version of it, which will gather from the user the departure date, the departure and arrival cities. The collected information can be used to search available fares, hotels and make any other necessary arrangements.

What You Will Need

Continue reading
Find us in facebook