We’re Going HTTPS: Here Is What You Need to Know

Posted: July 21st, 2016Author:

We want to let you know that after September 15, 2016 we will be moving the Appery.io platform to HTTPS protocol. This blog post explains everything that you need to know about this update.

Why the switch to HTTPS? Going to an HTTPS page (instead, of HTTP page) protects you against malicious activities, such as site forgery, content alteration, and others.

 Backend Services

All Appery.io Backend Services already use HTTPS protocol so there is nothing you need to do here. This means that when you invoke an Appery.io backend service from an app such API Express, database, or Server Code script, the REST API URL uses HTTPS. This has been supported from the very beginning of our platform.

Screen Shot 2016-07-20 at 11.54.33 AM

Secured API Express service.

Read the rest of this entry »

Streamlined Approach for Creating App Backend, New Ace Code Editor and New Docs Portal in July Platform Update

Posted: July 17th, 2016Author:

A Streamlined Approach for Creating App Backend and Connecting to REST APIs

We have streamlined our approach for creating your app backend and connecting to external REST APIs. Your app backend consists of the following components:

  • API Express – for exposing external data sources such as a relational database, external REST and SOAP services via APIs directly or via custom workflow.
  • Database – for storing any app data.
  • Server Code – for writing custom app logic with server-side JavaScript.
  • Push Notifications – for sending notification messages to app users.

Once you create your app backend using one or more of these services, it’s now very simple to import the services into your app (client)

All the services are now under Backend Services menu but more importantly, the services will be automatically imported into your app. These services are preconfigured and ready to be used in your app.

Createnew_backendservices_july16

Connecting to external 3rd party APIs is now easily done from API Express or Server Code. There are a number of benefits invoking a 3rd party API from the server:

  • Service API key or any other sensitive information is not exposed to the app.
  • Easy to update the service, or change to a different services without impacting the app. For example, you can reset the API key used without making any changes to the client. You can also switch the service provider without making any changes to the client.
  • Apply logic to the response before sending it back to the app. For example, sorting data on the server before returning it to the app.
  • Apply custom logic before and/or after the service invocation. For example, invoke two or more APIs, combine the response and return it to the app.
  • No cross-domain issues as the service is always invoked from the service.

Note: Invoking API directly from the client is still possible if your Appery.io account was created before July 16, 2016. This option is also available for a custom or enterprise plans.

New Ace Code Editor

The source code editor inside the App Builder has been upgraded to Ace editor. The new editor provides the following new benefits:

  • Better search and replace functions.
  • Improved code snippets to help you write code faster by inserting common code snippets with just a click.
  • Advanced and more powerful code assist to help you write your code faster.
  • Big performance upgrade when working with large source code files.
  • Better usage and configuration of hot keys.

We are excited about the new editor, its modern architecture and speed will allow us to introduce new benefits and features in the future.

aceeditor_july16

New Docs Portal

We are also excited about our new docs portal. The new site has a modern look and feel, better topic organization, improved search functionality, and a simple way to submit edits to the docs. There is a separate and modern API section with a large number of code examples, and new and updated quickstart tutorials. The new site will allow us to continue developing our docs, examples and tutorials in a much simpler way.

What Else

No release can be without fixing bugs. We did that, and also made a number of infrastructure improvements to ensure platform stability and performance. If you run into any hiccups with this release (hey, we are not perfect), please reach to us via on the forum or email.

Moving App Logic to the Server: How to Save and Query the Database from Server Code Script

Posted: July 13th, 2016Author:

Read our first post on moving app logic to the server.

The Appery.io Database provides storage for your mobile app data. You can store data such as users, orders, purchases, products or anything else. The Appery.io Database is a cloud NoSQL database and provides a very simple and elegant REST API to work with the database.

One of the most common cases for an enterprise mobile app is to create/save a new item/record and then redisplay the list in the app with the newly created item.

Accessing the database directly from the client is fine but requires two requests to the database.

  1. A request to save the new item/record into the database.
  2. Once the 1st request completes, on its success, a request to get the updated list to display in the app.

A better approach is to do both the create and list in a single request from the app. This is very simple to do from Appery.io Server Code script. The following script shows how to create a new record and then get the updated list:

In this simple script you first create a new Person object (line 8) and then do another query to get the updated list of people (line 14). The script response returns the updated list of people. This script automatically has a REST API which is the invoked from the app.

What’s most important, there is only a single request from the app to the Server Code script. A single request is usually better than two requests. Also, you can add additional logic to the script without impacting the app. For example, you can send an email when a new person is added. Or, you can send  Push Notification when a new person is added. All this can be done without impacting the app. That’s nice.

If you want to learn more about Server Code, check out our YouTube channel Server Code playlist.

Moving App Logic to the Server: How to Query the Database From Server Code Script

Posted: July 12th, 2016Author:

An Appery.io developer posted a question on the Appery.io Facebook page on how to write a Server Code script to query two different collections in the database. This post will show you how to do that.

In general, querying two database collections is better to do on the server-side than from the client. Doing it on the server is a lot faster and provides you with the option to update the search without impacting the client. Plus, you can add any logic when needed. Doing it from the client would require two REST API calls to the database.

Let’s jump into the example.

First, there are two collections in the Appery.io Database. They look like this:

ProductName collection:

ProductName collection.

ProductName collection.

This collection is simple. It has a name and a code.

This is the ProductData collection:

ProductData collection.

ProductData collection.

 

The code in this collection links the product name to the actual product (Android or iOS device).

Read the rest of this entry »

Tutorial: Building Your First Ionic Mobile App

Posted: June 3rd, 2016Author:

In this tutorial you are going to build a Hello World app with Ionic in Appery.io. This is how the app is going to look:

Screen Shot 2016-05-27 at 5.04.15 PM

Appery.io App Builder for Ionic.

You should finish this tutorial in about 10 minutes.

Read the rest of this entry »

How to Add REST API Invocation in an Ionic App with Drag and Drop

Posted: May 31st, 2016Author:

Here is how to add REST API invocation with a simple drag and drop:

1t86zXZ3Kx

How to Use Snippets to Speed Up Server Code Script Coding

Posted: May 18th, 2016Author:

Appery.io Server Code allows you to write any custom code using JavaScript that is executed on the server. For example, you can invoke any REST API, access the Appery.io Database and send Push Notification messages. The script is then invoked from the app (as REST API). Server Code allows you to write advanced app logic on the server and then elegantly invoke it from the app.

To simplify working with various Server Code APIs, we have created code snippets. A snippet is a short code sample that you insert into the script and it provides some functionality.Here is how to do it:

servercode_snippets

Check out our YouTube channel to learn how to use Server Code.

Learn How to Add Geocoding Lookup in Your App With Server-side JavaScript

Posted: May 10th, 2016Author:

pablo (12)

Let’s say you are building a mobile app where you enter an address and need to get back the location as latitude/longitude information. To do this in Appery.io Server Code is super simple. Here is a Server Code script that looks up an address and returns the latitude/longitude information for the location using the Google Geocoding API:

When you run this script, the result looks like this (using Boston as input):

The script has an API which you can invoke from your app:

Here is an example invoking the script directly from the browser:

geolocation_result

Invoking Server Code script

With geolocation logic on the server, you can change the implementation — for example use a different API without making any changes to an app and impacting the users.

Want to learn more? Check out the large collection of videos we have on our YouTube channel.

Can I Build [insert type] App With Appery.io?

Posted: May 3rd, 2016Author:

ionicapp_myapp

“Can I build [insert type] app in Appery.io?” is probably one of the most common questions that we get. The answer is almost always yes, but I want to provide you with a more detailed answer.

Appery.io provides tooling to allow you to build and run hybrid mobile apps. You can build virtually any kind of app supported by the underlaying technology stack: HTML, JavaScript, CSS and Cordova (for native device access), plus REST APIs. The platform provides tools and a runtime to make it simpler and easier to build your app.

  • App Builder – for building the app (client).
    • Apache Cordova is installed in every app and gives you access to device APIs such as the camera.
  • Cloud Build – for packing the app for iOS or Android.
  • Backend Services
    • Database – cloud database for storing any app data.
    • Push Notifications – for sending targeted Push Notification messages.
    • Server Code – for coding any server-side logic using JavaScript.
    • API Express – for integrating with external/enterprise systems.
  • Appery.io Tester app – for fast testing of iOS and Android apps built in Appery.io without installing them directly on the device.

The platform provides you with the tooling and runtime services, which you would need to build a successful app. Having said this, the actual app logic still has to be coded or developed. For example, let’s say you want to send a Push Notification and email when a new users registers, and also record the activity into an external relational database. You can easily build this flow/logic in Appery.io.

  • The app UI (pages, navigation) is built in the App Builder.
  • The Database has built-in user management capability. This means you can register a new user and do a login/logout.
  • When a new user is created, you can write a Server Code script to send a Push Notification message and use email API (such as SendGrid) to send an email notifying people about this event.
  • Using API Express you can connect and expose a relational database via REST API. When a new user registers, you can invoke the API and record this event (registration) into an external relational database.
  • Using the Appery.io Tester app you can quickly test the app on the device (without actually installing it) and test any native APIs.
  • After the testing, you can build and package the app for iOS or Android with Cloud Build.

In general, Appery.io is a perfect fit for building and running business and enterprise mobile apps. Another way to look at our platform is that it is ideal for creating content or data-drive apps. You can also find the term form-based used sometimes. We don’t recommend to build apps that are heavy on graphics. This is not a Appery.io limitation, but a limitation of hybrid apps in general.

We hope this blot post clarifies what kind of apps you can build with Appery.io. We many videos on our YouTube channel to help you learn how to build apps to check out the channel.

Here is another blog post that talks about this topic: What Kind of Apps Can You Build with Appery.io?.

 

Video Tutorial: Creating an Ionic App with a Backend and an External API

Posted: April 21st, 2016Author:

Our friends at Ionic Framework published a very nice tutorial on how to build an Ionic app with an external API. We figured it would be a good idea to show how to build the same app in Appery.io. In this 8-minute video tutorial you will learn:

  1. How to build a simple Ionic (version 1).
  2. How to create a mobile backend for the app.
  3. How to invoke an external API.
  4. How to test the app in the browser.

The final app shows a list of people loaded from an external API:

Screen Shot 2016-04-21 at 12.07.57 PM

Ionic app

Want to learn more? Check out many other short videos on how to build mobile apps fat on our YouTube channel.