Message:

Subscribe rss
Blog categories
All | Backendless features
Backendless is out of Beta with a ton of new features – custom business logic, code generation, validators, etc.
April 8, 2014 by markpiller
Spread the love

It feels amazing to begin writing this post. I have been waiting for a long time to say it and I finally can – Backendless goes out of Beta! And boy, aren’t we doing it with quite a bang. Over the weekend we pushed a new release with a ton of fixes and some amazing functionality. It took us quite a while to get to this point, but I am quite sure the wait was worth it. The new release includes support for custom business logic, code generation, data validators, multi-environment (dev, test, stage, prod) support and many more. Please see below for details:

Server-side Data Validators

As the name suggests, this feature can validate values in the data and user objects entering the Backendless system. As objects/users are created or updated, Backendless can automatically verify and validate the properties and return an error if the validation fails. You can configure validators using Backendless Console. For example, the image below shows the User Properties screen. Each user property can be configured with a built-in or custom validator. A custom validator is a regular expression entered by the application developer:
user validators - Backendless is out of Beta with a ton of new features - custom business logic, code generation, validators, etc.
Similarly, validators can be assigned to data table columns. To configure a data validator select a table in the Data section of the console, then click the “Table Schema and Permissions” button. All columns (except for relations) include the Validator column as shown below:
data table validator - Backendless is out of Beta with a ton of new features - custom business logic, code generation, validators, etc.

Localization

Backendless Console is now available in 9 languages: English, Spanish, Portuguese, Italian, French, Japanese, Korean, Russian and Chinese. Language is selected automatically based on the user’s locale or defaults to English if a translation is not available:
backendless console japanese - Backendless is out of Beta with a ton of new features - custom business logic, code generation, validators, etc.

Code Generation

Backendless’ mission is to simplify, optimize and speed up software development process. What could do it better than automatic code generation? Our console now includes the Code Generation section which makes it trivially easy to start working on a backendless app. Currently we support code generation for Android, iOS and JavaScript, but the list of frameworks and client-types we will support will be growing. What does the generated code do? Take a look at the screenshot below. It is a screenshot for the Android code generator built-into Backendless Console:
backendless code generator - Backendless is out of Beta with a ton of new features - custom business logic, code generation, validators, etc.
For each feature selected in the code generation screen Backendless creates a project with the source code and all required dependencies. You can run the project without any changes at all. The code generated for “Registration and Login” creates a registration form based on the user properties defined in the application. For Data Management, the code is a class library which can be used to build data-driven apps on top of Backendless. There is also a cool CRUD (Create, Retrieve, Update, Delete) demo project which demonstrates how to use the generated code for all Data Service API calls.

Custom Business Logic

This is big, bold and beautiful. Yes, now you can override Backendless services with you own custom application logic on the server side. The programming language in which you would need to developer custom logic is Java, and we are working on adding JavaScript, C#/VB, PHP, Python and Ruby to the list. There are two types of code blocks you can implement – service handlers and timers. A service handler plugs into API processing chain and for every single API call, you can inject a “before” and “after” handler. A timer is a program, which Backendless runs accordingly to a schedule you define. To make it easier to develop custom business logic we also built a specialized code generator. Using the code generator, a developer can focus entirely on what’s important – adding business logic. One of the most amazing features is we support local debugging. Once you complete the implementation of your Backendless event handler or timer, it can be debugged on the developer’s computer with a special utility called CodeRunner™. Even though the code (and the Java debugger) are local, CodeRunner plugs it into the Backendless API processing chain located in the cloud. Finally, once the code is ready, it can be pushed into the production environment where it is deployed to and runs on the Backendless servers.
backendless biz logic codegen - Backendless is out of Beta with a ton of new features - custom business logic, code generation, validators, etc.

For more information about Backendless custom business logic, see the Server-side code quick start guide.

Multi Environment Support (Dev, Test, Staging, Prod)

Most applications go through some well-known phases – development, testing, staging, and production. Each of these phases requires a corresponding backend environment where the application runs. The environments are isolated from each other, and an application migrates from one phase/environment to the next. Backendless now supports such migration. The concept of “environment” is represented through application versions. When you create a version, simply call it “dev” or “dev-v1”, “testing” or “production”. Deployment is available on Manage > Versioning screen. Simply click “Deploy” for the version you want to deploy and select the destination environment:
backendless deployment - Backendless is out of Beta with a ton of new features - custom business logic, code generation, validators, etc.

Relation Auto Load

Backendless supports relational object storage. For example, an object Person may have a related property “address” which references an Address object. When a client application loads a Person from the Backendless data storage, the “address” property is not initialized by default. There are ways to load related objects. You can enumerate all the relations in a “find” API call and Backendless returns them with the parent object. Or you could use a separate API call to load related properties. In addition to these options we added another alternative. Now the data browser in Backendless Console includes the “auto load” checkbox for all relations:
backendless autoload - Backendless is out of Beta with a ton of new features - custom business logic, code generation, validators, etc.
This checkbox is available for all relation properties. For the relations with selected “auto load”, Backendless automatically includes the related objects into query results. This option works recursively – any “auto load” relations in the child relations are also automatically included into the query results.

Application Reset

During the development and testing process an application may get “polluted” with dummy or testing data. Occasionally a complete (or partial) reset may be required. To do this in Backendless navigate to your application home (click the home icon in the upper left corner) and use the Reset App button:
backendless app reset - Backendless is out of Beta with a ton of new features - custom business logic, code generation, validators, etc.

Backendless Plus Enhancements

Backendless Plus is a subscription package, which can be added to any application to enhance its functionality, user and developer experience. In this release we made Backendless Plus even better with the following functionality:

  1. Script-level access for all console APIs. Backendless Console is a powerful tool, which is a frontend for one’s backend. There are many functions in console, which could be useful from the automation perspective. For example, configuring backend, setting up permissions and importing data are just a few tasks that can be done in a script.
  2. Custom business logic execution time. By default any custom business logic code has a limit of 5 seconds for the duration of time the code can run. Once Backendless Plus is added to an application, the limit is extended to 20 seconds.

Assigning Roles to Users

A user may belong to one or more roles. A role carries permissions for each available API operation. At the very minimum a user belongs to either AuthenticatedUser or NotAuthenticatedUser system roles. Custom roles may be assigned to a user account via an API call and now with Backendless Console. When you navigate to the Users table in the Data Browser screen, you can select one or more user and click the User Roles button. The user interface makes it trivially simple to assign roles to the selected user accounts:
backendless roles to users - Backendless is out of Beta with a ton of new features - custom business logic, code generation, validators, etc.

Export Schema Only

Backendless Export module lets you export your application settings, data tables and geo points. We made an improvement in this release and now you can export only schema definition for your data tables:
backendless export schema only - Backendless is out of Beta with a ton of new features - custom business logic, code generation, validators, etc.

Migrating from StackMob or Parse

The import module was also enhanced to simplify migration from StackMob (to be shut down on May 11th and Parse (no shut down notices have been published yet). To import the data, use the “single Zip file” link in the Manage > Import section of the console:
backendless import from stackmob - Backendless is out of Beta with a ton of new features - custom business logic, code generation, validators, etc.

Share this post
Tweet about this on TwitterShare on FacebookGoogle+