After almost a year in development, I am glad to introduce to the community a new set of backend services for mobile development called Icenium Everlive ready for use today.
Rather than wasting time setting-up a new server, configuring a secure, scalable database, and writing TONS of server-side code to expose RESTful web services, you can just focus on your app, data, users, and schema. Everlive handles all of the hard work.
Icenium provides a new template named Icenium Everlive Cloud Services. The template is a sample social app that uses Everlive on the backend. It features a number of Everlive features, including:
All data is stored in the cloud, in individual backend projects are provisioned for each app and user. In the Everlive backend portal, you can explore your data in a fast, user friendly interface.
When you create a project from the template, Icenium creates a new hybrid mobile app project in your Icenium account and provisions a new backend project for your app in Everlive. The backend project contains the built-in content type named Users, and two custom content types named Activities and Comments that are required two run the social app. In Icenium, you can see all your Everlive backend projects and their structure in the new Data Navigator pane.
When you run your project on a device or in the Icenium simulator, the starting screen of the app invites you to register a new user or log in.
After completing the registration form, the app prompts you that the registration is successful and you can log in. If you have provided a valid email address, you will receive two new emails from <your-project-name>@everlive.com. The first one welcomes you as a new user of the app.
The second one invites you to confirm your email with a link to the Everlive website.
TIP: In the Everlive backend portal, you can modify the email templates with an HTML editor or turn them off.
You can explore the Everlive portal by navigating to https://www.everlive.com in your browser. In Icenium, you can launch the Everlive portal from the Data Navigator pane. Open the Data Navigator pane, right-click your app and click Show Application.
The backend defines the structure of your app in terms of content types and fields, and lets you explore and manage the generated data from the mobile apps. In Everlive, you can define the following custom fields: Text, Number, DateTime, Yes/No, File, GeoPoint, single Relation, multiple Relation, and Array.
Next, execute the following code:
You need to initialize a new instance of Everlive with an API Key. The API Key is the unique identifier of your app. Everlive issues the API key when you create your app. To obtain the API Key of an app, you can open the Data Navigator in Icenium, right-click your app, and click Properties. The Properties panel shows the API Key.
Alternatively, you can launch the Everlive backend portal in your browser, select your app, and open the API Keys section. From the API Keys section, you can obtain all keys related to Everlive.
Set the 'type' configuration option to 'everlive' to switch to the Everlive dialect, then set the 'transport.typeName' to the name of the content type (this is a configuration option specific to the Everlive dialect), and set the 'schema.model' option (more details about it - here). Note that the 'transport.typeName' and 'schema.model' are mandatory for the Everlive dialect to work.
Once you open the cloud code, you can subscribe to a number of events located in Everlive.Events. With the Everlive.Events API, you can execute custom business logic, validate the incoming requests, modify the response of a service, make requests over HTTP, send SMS using Twilio, or send emails based on Email Templates.
Using the pre-processing events, you can easily validate your request for any custom logic. To facilitate you with this process, Everlive Cloud Code supports a number of built-in validators that help you check common regular expressions. Below is an example on how to validate user email and return an error:
The cloud code functionality also allows you to send emails in very convenient way. All emails are based on Email Templates that you can define using the Email Templates screen in Everlive. You can also use a mustache syntax to replace variables passed by the call in your Email Template, so that you can include contextual information in the actual email.
Everlive also offers integration with Twilio. You can use it to send SMSs to your users by making external calls to the API from the cloud code.
To go over the comprehensive documentation of Icenium Everlive, you need to log into the backend portal of Icenium Everlive which is located at https://www.everlive.com , select an existing app, and click on the Documentation section. Note that the Icenium Everlive documentation is contextual for each app and you can easily copy/paste code snippets from it to your code.
Stay tuned for more updates coming out from the Icenium May release and don't forget about the Icenium May release keynote coming up on May 29th where you will be able to learn a ton of cool stuff pushing the industry forward.
Subscribe to be the first to get our expert-written articles and tutorials for developers!