Message:

Backendless Features (34 posts)

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:

Data retrieval in Backendless has gotten significantly more powerful with the release of version 4.2.0. We added support for subquery into the syntax of whereClause . The improvement allows your apps to run two queries in the context of one request. The first query identifies a set of objects which is fed into the second query. Consider the following data schema:

users blogpost comment - Announcing Subqueries - advanced data retrieval from Backendless mBaaS Database

Suppose your app needs to get all blog posts where the person who posted a comment has a specific email address (say @backendless.com ). Using subqueries, it can be done with the following whereClause sent to the BlogPost table:

Let’s review how this whereClause is processed by Backendless:

  1. Backendless detects that the query at the top level uses the in()  operator.
  2. It checks if the contents of the  in()  operator have the format of a subquery and if so, evaluates it accordingly.
  3. The subquery contains an “internal whereClause”, which is:
    author.email LIKE '%@backendless.com'
    The internal whereClause is applied to the objects in the Comment table.
  4. For all found  Comment objects, Backendless gets a list of values for the blogPost.objectId column.
  5. The resulting set is fed into the  in()  operator which fetches the final set of objects from the  BlogPost table.

General SubQuery Syntax

The general syntax for subqueries is:

How it works:

  1. If internalWhereClause  is present, it is executed in the table identified by TableName.
  2. In the resulting set of records, values must be selected for the column identified by columnOrRelatedColumnName.optionalColumnName.
  3. If internalWhereClause is not present, the contents of the IN operator have the following syntax. It represents the entire set of values identified by the specified column: TableName.columnOrRelatedColumnName.optionalColumnName 
  4. The resulting set of values is used in the  IN operator, thus the final query ends up being:
    searchColumnOrRelatedColumnName IN ( value1, value2,, valueN ) 

Additional Examples

Consider the following data schema:

customer order items - Announcing Subqueries - advanced data retrieval from Backendless mBaaS Database

  1. Get all OrderItem  objects for a customer from New York :
    objectId in (Order[customer.address = 'New York'].items.objectId)
  2. Get all Customer  objects who spent more than 1.99 on an item:
    objectId in (Order[items.itemPrice > 1.99].customer.objectId )

Please let us know if you can think of additional examples you would like us to demonstrate.

Enjoy!

 

We believe that Backendless is great. We know that many of developers building with Backendless think so too. This is why we added support for referrals. It is built right into the Backendless console and every Backendless developer got his/her own invite code. There is a convenient way to access the “Invites” page by clicking the “Send an Invite” link:

send an invite - Introducing Invites and Referrals

The Invites and Referrals page is self-explanatory. It shows your own personal invite code and lets you send out an invite to anyone. You do not have to use the invite form, simply share the invite code and ask your developer friends use it when they create a Backendless app:

invite page - Introducing Invites and Referrals

The referral system follows the rules below:

  1. You cannot send out an invite while your app is on the free trial for the Cloud99 plan. Keep in mind that every app starts with a 14 days trial on the Cloud99 plan.
  2. The developer you invite may already have an account with Backendless. If they do not, they would need to register.
  3. An invite code can be entered only at the time when an app is being created. The “New App” popup has been modified to allow an invite code.
  4. Invite codes apply only to new apps. You cannot apply an invite code to an existing app.
  5. When a developer you invited upgrades their app to a billing plan, they get 25% off the plan’s price for the first 6 months. At the same time, you will get a $10.00 credit for your app, even if you are on the free plan.
  6. The referral discount does not apply to the Marketplace purchases.
  7. You (the inviting developer) can accumulate an unlimited number of credits and they will be automatically applied when you upgrade to a paid plan or make a purchase.

That’s all, it is a pretty simple system. Spread the Backendless love!

The core of the Codeless technology we released last week is the Codeless Logic Designer. It is a visual environment for composing logic of your API/IoT services, Event Handlers, and Timers. The system uses “blocks”, a jigsaw puzzle-like UI components placed into categories. When you create a codeless service, you snap blocks to create the logic. As you do it, Backendless automatically generates the source code which will be executed once the logic is deployed. Check out the video below for an overview of the Codeless user interface:

With the recent update of the Backendless service (version 4.0.8) you can now add your app’s icon and the appstores links in Backendless console. This is done so we can make it easier for you to identify the app and also to help us build a gallery of apps powered by Backendless. We are also planning to provide templates for your app’s web-based home page to help you market your Backendless apps.

When you login to console, you will see a form where you can upload the icon and enter the URLs for Apple’s and Google app stores.

app icon in backendless - Add your app icon and appstore links in Backendless Console

Backendless 4 is a powerful platform that can instantly turn your JS code into an API service. Every declared method (unless it is excluded) gets a dedicated API endpoint accessible via REST and native libraries, which Backendless automatically generates for you. As a developer, you can easily specify what the REST route must look like for every method and you can define the schema for the arguments.

Generated services can be used for multiple purposes. For example, they make it very easy to centralize the business logic for your Backendless app. IoT apps can use the services as the integration points.

Backendless Console gives you a test drive for invoking the services and inspecting requests and responses. Best of all the service code can be written and deployed right from the console. Check out the video below for an overview of Backendless API Services written in JS:

The service code shown in the video is:

Enjoy!

One of the new features we added in Backendless 4.0 is support for custom code generators. We already have multiple code generators which can create complete client-side projects for Android, iOS and JS with just a few button clicks. Ability to add your own custom generators greatly expands the possibilities.

The Backendless code generator system uses XSLT. A code generator is a combination of XSLT scripts and some static content. The scripts are responsible for the dynamic content. To demonstrate how to create a code generator I put together an example which creates a diagram for the data tables in your Backendless app. You can see a demo of the example as well as the process I followed in the video below:

Continue reading

backendless and lambda - Integrate AWS Lambda into your Backendless apps

Backendless version 4 has a lot of magic. An example of this is our integration with AWS Lambda – Amazon’s version of “serverless” programming. With Lambda you define your server-side code without any association with a physical machine where it runs. A lambda function can be developed in node.js, Java, C#, etc. The integration we included in version 4 provides a way to invoke lambda from your mobile or web application via Backendless. With the integration in place, you can easily apply permissions for your app’s users and roles for the referenced lambda functions. Check out the video below for an overview of this awesome functionality:

Up until now the only way to experience and build apps with Backendless was our online service. Anyone can register with it for free, download client-side SDKs and build the best of the breed mobile apps. Things are going to change as we expand the reach of our platform so it can run right on your own machine, in your data center or a private cloud. So starting today Backendless is everywhere and Backendless is one. The standalone version of the Backendless Platform is also known as Backendless Enterprise comes in a variety of installers, virtual machines and cloud images available for free download today.

The Backendless Enterprise packaging and the free-to-download format allow on-premise or private cloud installation. Application developers and organizations can take full advantage of the Backendless Platform power with the total control of the application infrastructure, data, workflows and IT procedures. And all these benefits are obtained by Backendless Enterprise users without any dependency on the public cloud!

The Backendless Enterprise feature-set is identical to the Online version of Backendless. Your applications can rely on the powerful data persistence and app user management APIs, leverage file storage, deliver push notifications, exchange publish/subscribe messages and deploy custom business logic.

To get started with the product see the Backendless Enterprise Quick Start Guide.

For licensing inquiries, contact Backendless Sales.

Enjoy!

I am very happy to report that we released a new version of Backendless. The new release is tagged as version 1.9.0, which is a new numbering scheme for us – we used to label releases with names attached to various events.

The new release is packed with features, improvements and bug fixes. I’d like to review  the most significant ones and will be writing more in detail about each in my feature-a-day blog series.

Continue reading

Find us in facebook