Message:

Server Code (32 posts)

backendless kotlin1 150x150 - Using Kotlin for Cloud Code development with BackendlessBackendless Cloud Code officially supports Java, JavaScript and Codeless. Since Kotlin compiles to Java byte code, it is not an exception and can be used as well to build API Services, Event handlers and Timers. Check out an article by @vvsevolodovich describing how to configure your project so you can develop Cloud Code logic with Kotlin:

https://medium.com/@dzigorium/developing-serverless-applications-with-kotlin-and-backendless-com-ebd59dac8220

 

Posted in Server Code

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

We did it! There is a new SDK in the Backendless family of libraries, please welcome the SDK for Amazon Alexa! Let’s get a few basic questions out of the way first:

Q: Can I build a custom Amazon Alexa skill without Amazon Lambda?
A: Yes, you can definitely do it by running your custom skill implementation in Backendless.

Q: Can I build a custom Amazon Alexa skill with JavaScript, Java or without any programming language?
A: Yes, with Backendless you can implement a custom Alexa skill using Java, JavaScript or Codeless, which is a visual programming environment.

Q: What is the simplest way to build a custom Alexa skill?
A: Great question! Read the announcement below:

Continue reading
Posted in Alexa, Server Code

Today we will talk about how to monitor client’s Real-Time Connections in your Angular application. This tutorial continues the guide on how to build Angular apps with Backendless. It is recommended to check out the previous article in this series before you continue for the reason that we will use the application from the previous post as the starting point for this tutorial. Alternatively, if you just want to start working with the it right away, just download the source code from this GitHub commit.

In many cases we want to see how many application users are online or offline, for example, it might be useful in a chat application. For the demo purposes,  in our application we will add a simple counter for count all connected clients. As we explore adding that functionality,  you will meet with Backendless Business Logic, Backendless Counters, Codeless and keep discovering Real-Time features:

image11 - How to monitor Real-Time Connections in an Angular app

Continue reading

Images displayed in your app often may be responsible for the bandwidth consumed by the device, which has a direct impact on the performance, battery level and the amount of memory which the app allocates. As a result, optimizing images can often bring noticeable performance improvements for your app: the fewer bytes it needs to download, the smaller impact is on the client’s bandwidth and the faster app will download and render content on the screen.

Let’s imagine you have an app where you store pictures to show them to your app’s users. But what happens if the resolution of these images is high and they are taking a lot of space? Download of these files is time-consuming and, as a result, it slows down your app making the user experience substandard.

A recommended approach is to create image thumbnails with lower resolutions relative to the original one. These thumbnails can be used to preview the image in the application.

The thumbnails can be generated using Backendless API Services (the Business Logic section). If you are not familiar with how to create your own API Service, please check the How to generate a QR code with Backendless API Service post, which describes the process of API service creation in greater detail.

In this article, we will focus on the task of generating thumbnail images with different resolutions.

Continue reading

Suppose your app logs in a user. As a result, the app gets user-token  which uniquely identifies the user’s session with Backendless. If your app uses our SDK for Android, iOS, JS or .NET, the user-token  value is managed directly by our libraries. Specifically, it is added to every API call to maintain the session and tell the server about the user’s identity. There are situations when you need to get the user object when your app has only user-token. This could happen if you used persistent login in the application, which stores user-token on the device. The implementation does not save the user object, however, there is a way to retrieve the user based on the user-token value (assuming the token is still valid). In this article, I will show you how to do this.

The technique for retrieving the user object is creating an API service which accepts a  user-token in the header and retrieves the current user. I will use Codeless to create the API service because it has an intuitive interface and allows you to solve these tasks very quickly, just by building the algorithms instead of writing code:

Continue reading

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

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

With the introduction of Deployment Models for business logic (Cloud Code), we also added support for “invocation chains”. This is an ability to chain together multiple server-side event handlers registered to process the same event. Previously, you could inject cloud code into the API invocation flow as shown in the image below:

api flow single handler - Cloud Code Event Handler Invocation Chains

For any API call, you could have only one before/after event handler with your own custom business logic. This is changing with deployment models and you can have multiple event handlers chained together:

api flow multiple handlers - Cloud Code Event Handler Invocation Chains

This is a HUGE improvement. It promotes better design for cloud code with a clean division of responsibilities between the event handlers. It is important to note that any data received as arguments for an API call is passed from one event handler to another. If an event handler sitting at the beginning of the chain makes a change to an argument (or the return value), then all other event handlers down the chain will get the modified value.

Setting up chains in console

A question you might be asking is how to configure the order of the event handlers. This is done in the Backendless Console. Consider the following example:

multiple event handlers console - Cloud Code Event Handler Invocation Chains

As you can see there are three "beforeCreate"  event handlers for the "*"  context (which means they apply to every data table). When Backendless detects you have more than one event handler applicable to a particular context, it displays the “handler ordering” icon:

chain ordering icon - Cloud Code Event Handler Invocation Chains

Clicking the icon opens up a popup where you can control the execution order for all applicable event handlers:

We’ll have a video posted to our YouTube channel with a demo of the functionality soon. That’s all for now, guys. Happy coding!

Posted in Server Code
Find us in facebook