Learn How to Build IoT Apps with Node-RED, Watson AI Services – in this Hands-On Workshop

Workshop Social Tile-01

Learn how to build your first IoT application using Node-RED and IBM Watson Services. This workshop will begin with an introduction to Node-RED, a browser-based graphical flow editor of drag-n-drop blocks (called a node) of functionality. Node-RED (nodered.org) is an open-source community project built on top of the Node.js runtime. The workshop will dive into the Watson IoT dashboard to visualize data and Node-RED dashboard to build a UI interface.

AGENDA

12:00 – 12:50pm: Registration and Lunch
12:50 – 1:00: Intro/welcome from Max Katz, IBM Program Director, Developer Advocacy (@maxkatz)
1:00 – 1:30: Let’s Learn about Node-RED, JeanCarl Bisson, IBM Developer Advocate – Bluemix/Watson Developer Ecosystem (@dothewww)
1:30 – 2:30: IoT Starter Lab
2:30 – 3:00: Break
3:00 – 4:00: Watson IoT Dashboard
4:00 – 5:00: Node-RED Dashboard and Advanced Topics

After the workshop, stay for pizza, beer and learn about What’s New In JavaScript: Learn about Distributed Ledgers, IoT and Node-RED.

Exposing a SQL Database via REST APIs: A Video Guide for Developers

Many organizations that are building mobile apps need to connect and reuse existing (internal) systems. One of the most common system is a relational (SQL) database. The question is — how to a relational database from a mobile app.

I have prepared two short videos that will show you how to do that using Appery.io API Express.

API Express connects to a relational database and exposes the database tables via REST APIs. Once the APIs are created, the mobile app can easily consume the APIs.

There are two approaches exposing a database:

The first approach automatically generates CRUD-like APIs to work with a database table. In many apps, this is close to 80% of what an app might need. This automatic approach also comes with very sophisticated offline support. In other words, you app can work offline and sync data with a remote database when a connection is reestablished.

With the second approach, you get full control as you write the actual SQL query (or Stored Procedure) that will be executed. With this approach, you can use a visual service editor to orchestrate the REST API. In addition to the SQL component (connector), you can use connectors such as Web Service (WSDL), REST  and others.

Check out the API Express video playlist to learn more.

Ringing in 2017 With a Big Appery.io Platform Update

The Appery.io team just pushed a big platform update with exciting new features:

  • iOS 10 Support
  • Apache Cordova Upgrade
  • Automatically Sync Backend Services Changes with the App Builder
  • Organize with Folders Inside the App Builder
  • Backend Services APIs Are Now Placed in Folders for Easier Organization
  • Improved Media Manager
  • Improved Synchronization Between App and Server for Apps with Offline Support
  • New Page to Test API Express Services and Offline Support
  • New Auto-login with Offline Support
  • IPv6 Network Support
  • Improved Server Code on Demand Balancing
  • And More…

Read about this update on the Appery.io blog.

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

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:

Screen Shot 2016-05-24 at 4.42.32 PM
ProductName collection.

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

This is the ProductData collection:

Screen Shot 2016-05-24 at 4.44.33 PM.png
ProductData collection.

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

The input to the script is the product type: Android or iOS. Based on the input, you lookup the code for the product (a or i) and then run a second query to find all iOS or Android phones in the ProductData collection. Here is the script.

var product = request.get("type");
var dbId = "367e9e77......";
var params = {};
var result = [];

// Search for object with the provided 'type' (iOS or Android)
params.criteria = {
  "name": {
    "$eq": product
  }
};
result = Collection.query(dbId, "ProductName", params);

// Find all objects with code 'i' or 'a'
params.criteria = {
  "code": {
    "$eq": result[0].code // Either 'i' or 'a'
  }
};
// Run the query
result = Collection.query(dbId, "ProductData", params);
// Script response (API response)
Apperyio.response.success(result, "application/json");

This script first searches the ProductName collection to find the id for iOS or Android devices. Then it searches the ProductData collection to find the actual devices.

Moving this logic to the server is a good idea as you query two collections (or even more) with a single request from the client.

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

What is Appery.io Tester App?

The Appery.io Tester app is a core component in the Appery.io platform and makes it simple and fast to test your hybrid app without installing it on the device.

The app is available for iOS and Android.

When you are creating a hybrid mobile app you need to test the app on the actual device. Using simulators is usually slow. Installing the app directly on the device each time you make a small change is also very time consuming. To solve this problem, Appery.io provides a special Tester app. When you sign into the app, you will see all the apps that you have created in Appery.io. You tap any app and launch it directly on the device. For example, if your app uses a native device API such as the camera, then you can easily test the app and the native API.

Make any change to your app, simply tap the app again in the Tester and the updated app will be downloaded and launched.

One way to sign into the Tester app where you see all the apps you have created. Another option to share the app with anyone, even if they don’t have an Appery.io account is to create a special share code.

As a developer, you can create a special share code, send it to your customer and they will be able to run and test the app by just entering the code. They don’t need to have an Appery.io account, they only need to download the free Tester app for iOS or Android.

You can create any number of share codes and also set expiration date for the code. For example, you can create one code for your external testers and another code for your internal test team, with different expiration dates.

This video shows who to test the app using the Tester app.

Happy coding and testing.

How to Expose a WSDL Service (SOAP) as REST API

Screen Shot 2016-01-11 at 4.04.07 PM.png
API Express visual editor

Appery.io API Express make it fast and simple to connect to an enterprise data source and expose it via a REST API. With API Express you can quickly create an API for:

  • Relational database.
  • WSDL service (SOAP).
  • REST API. Connecting to an existing REST API allows you to apply logic to the response. For example, you can filter the result and only return the data needed to the client.

In this tutorial I’m going to show how to expose an existing WSDL service as a REST API and then build a mobile using the API.

Continue reading “How to Expose a WSDL Service (SOAP) as REST API”

Learn How to Create User Registration & Login Backend Using Server Code and Database

Appery.io platform provides a cloud database for storing any app data. The database also has a built-in user management feature. This means if your apps needs user login or user registration – this capability is available out-of-the-box.

Screen Shot 2015-12-31 at 12.56.22 PM
Appery.io database built-in user management

The Users collection has two default columns: username and password. In most cases you will need to store additional users information such as email, address, or anything else. One option is to create additional custom columns in the Users collection. Another option is to store any user information in a different database collection and then link the Users collection to that collection. In this blog post I’m going to show you how use a separate collection to store user information and how use Pointer column type to link the two collections.

Continue reading “Learn How to Create User Registration & Login Backend Using Server Code and Database”

Appery.io: 300,000 Developers Strong and Growing

appery.io_logo_600x142

As the end of the year approaches, I wanted to reflect on what we accomplished together.  It was great year for enterprise mobility and we’re proud to have led the charge, raising the bar for cross device applications.  We’re confident that our platform will build upon the success we experienced in 2015 and continue to be the top choice for developers creating powerful apps across all device types and screen sizes. We can’t wait to see what’s to come in 2016!

Let’s take a look back at some of the highlights from 2015:

  • We just announced that the Appery.io platform has surpassed 300,000 developers. The growth of Appery.io is a testament to the company’s commitment to product development, performance and to its customers. Unlike its competitors, Appery.io appeals to both enterprise IT and “citizen developers” in the lines of business. This is further proof to the value of an agile cloud-based, end-to-end platform.
  • Last month, we announced our new Automatic App Update capability, which enables developers to update an application without having to resubmit it to app stores. Prior to this advancement, developers were required to wait up to two weeks for their updated apps to be approved and available on the app store, even longer if initially rejected. Now, after initial submission, updates are made automatically.
  • In July 2015, we announced integration with Ionic SDK and Appery.io. This enabled developers to build hybrid HTML5 mobile apps with the same user experience of a native application, accelerating time to market, and nearly eliminating the need to build expensive, fully native apps in the enterprise.
  • In June we acquired Verivo Software’s major assets further cemented Appery.io’s position as a leading app development platform for the enterprise with an end-to-end solution that is agile and meets the needs of both IT and the lines of business within the enterprise.

Next year promises to be an exciting time for enterprises looking to go mobile and it’s important for them to choose a platform that is backed by a large developer community. Our team is constantly looking ahead to where the industry is going and how we can best equip our customers to compete. Stay tuned for our continued updates.

Originally published on Appery.io blog

Creating a Mobile App with Mashery/Edmunds APIs and Appery.io at Code Junkies

Amit Jotwani (Mashery) and I presented at Code Junkies meetup in NJ on how to build mobile apps in Appery.io with Mashery APIs. A big thank you to Jason Graves for organizing the event. Amit presented first by showing the various Mashery APIs, he also showed the Mashery iodocs project. With iodocs you can test and invoke APIs directly from the browser and review the results. This allows you to test the service with various parameters before starting using the APIs.

My part of the presentation showed how to build a mobile app using Edmunds APIs, one of the Mashery managed APIs. The idea behind the app was an insurance company would like its customers to request an auto quote from the mobile app. To select the right auto (make/model/style), the insurance company uses Edmunds Vehicle API. Once the auto is selected, a quote is requested (submitted to the insurance company). I used the Appery.io database to save new requests. I also added SendGrid API to send an email with the auto information, to yourself, or to a friend. I also added push notifications. Once an insurance quote is ready, the agent can send a push notification message to the user letting him/her know that a quote is ready and waiting to be reviewed.

Here are some screen shots from the app that I was building in Appery.io.

The first page uses Edmunds API to retrieve all available new vehicles for 2014:

Screen Shot 2014-08-29 at 2.52.38 PM

Edmunds service to retrieve all vehicles (the service requires an API key):

Screen Shot 2014-08-29 at 3.03.08 PM

Binding the service to the page:

Screen Shot 2014-08-29 at 3.02.52 PM

When car make selection is made, the user is shown a list of all models for that particular make (selecting Honda):

Screen Shot 2014-08-29 at 3.07.30 PM

After the model is selected, the style page for that make/model is shown (selecting Civic):

Screen Shot 2014-08-29 at 3.10.27 PM

From this page the request can be submitted (Get quote button). In this app the data (make/model/style) is saved into the Appery.io cloud database. You can also email the request. For email, I imported and used the SendGrid API plugin.

Submitted requests saved into the database:

Screen Shot 2014-08-29 at 3.13.25 PM

I have also added push notifications. This allows the agent to send a push message to the customer when his/her quote is ready:

Screen Shot 2014-08-29 at 3.14.48 PM

Push messages can only be send to an app installed on the device. I exported and built an Android binary for the app:

Screen Shot 2014-08-29 at 3.19.49 PM

When the build is complete, you can quickly download and then install the app on your device by scanning a QR code:

Screen Shot 2014-09-02 at 2.35.24 PM

With Appery.io and Mashery APIs you can prototype a simple, yet complete app in a few hours. In under an hour I built an app that uses Mashery Edmunds API for vehicle information, SendGrid API for sending emails, Appery.io database for saving data (Appery.io APIs) and enabled push notifications. To try this yourself, sign up for an Appery.io account and Edmunds Developer account.

I really enjoyed speaking with Amit and meeting the folks from Code Junkies. Thank you Jason for organizing the event. I hope to come back in the future.