Appery.io Newsletter (March 2017) – Platform Update, Stored Procedure as an API and Sending Faxes

Posted: April 14th, 2017Author:

The Appery.io March newsletter.

April Platform Update

In early March, we rolled out a third platform update for 2017. This was a small update consisting of primarily infrastructure updates and bug fixing. Here is a short list of new benefits:

  • Upgrade to MongoDB version 3.2. This version improves stability and performance for the Appery.io Database
  • The API Express SDK test page is now using the Ace Editor instead of a plain text area. This will help with better output formatting
  • The API Express service test page has been updated with larger output areas (JSON output). It’s now easier to view the service response
  • The scheduled job execution time limit for Server Code is now the same as the regular (non-scheduled) script execution time limit
  • The Plugins tab and its content has been moved inside the Apps tab. A plug-in is always created from an app so it makes sense to list the plug-ins inside the Apps tab

How to Send a Fax Using the Twilio Fax API

Twilio launched a new API that allows sending faxes. From the very start the Appery.io platform made it very simple to connect to any external REST API. We love the Twilio API and their Fax API is just as elegant and simple to use. In this blog post you will learn how to send a fax using the Twilio Fax API from a Server Code script. It’s fun.

How to Expose a Database Stored Procedure and a Function as a REST API

Appery.io API Express makes it easy to expose a SQL query as a REST API. Just as easily you can expose a database stored procedure or a database function as a REST API. The following two blogs posts will teach you how to do that:

If you would rather watch a video on how to do this, here is an 8-minute video on how to expose a stored procedure and a function as a REST API.

Learn How Appery.io Helped Deliver: HABITat, an AI-powered Personal Change App

As the market has filled up with trackers of daily habits, Enkr8ia was looking for a cost-effective and intelligent solution to go beyond the tedious stats. Demand for a clean interface and off-line support was prioritized as well as a virtual coach that would require some tricky API integration. Learn how Enkr8ia used the Appery.io platform to build their app.

From Our Services Team: How We Try to Make Our Customers Happy

Read the blog post on how the Appery.io services team works.

Plus, learn how the services team reduced Server Code script testing by 50%.

How to Send a Fax Using Twilio Fax API

Posted: April 6th, 2017Author:

twilio_fax

Last week Twilio launched a new API that allows to send faxes. From the very start Appery.io platform made it very simple to connect to any external REST API. We love Twilio API and have an example and video on how to use the SMS API. The Fax API is as elegant and simple to use. In this blog post you will learn how to send a fax using the Twilio Fax API from a Server Code script.

Create a new Server Code script and copy the following script:

The script is simple and does a POST request to the Twilio Fax API.

Line 1 is the Twilio Fax API endpoint.

Line 2 and 3 are Twilio Account SID and Auth Token. You can get both from the console dashboard.

Line 4 is where to send the fax (number).

Line 5 is your Twilio number.

Line 6 is a link to a document you want to fax. You can set it to any PDF file accessible via a direct link (or use the sample one provided by Twilio).

Line 8 is where the POST request is invoked with all the information.

Twilio Fax API uses Basic Authentication so the Account SID and Auth Token need to be encoded as Base64. There is an out-of-the-box plug-in that you can add to your account. The plug-in has a function to encode a string as Base64.

  1. Open the dropdown list (on the left) and select Back to list.
  2. Open the Plugins tab.
  3. Find the EncodeBase64 plugin and click insert to add it to your account. The plugin will be listed in the Library section. You can now use it in any other script.
  4. One more step is to add this library as a dependency for your script. Open that script you created. Go to Dependencies tab and click on EncodeBase64_Library.

You are ready to test the script.

Go back to the Script tab and open the Run tab (on the right). Click on Save and run button to invoke the API and send the fax.

The response should look like this:

You can navigate to the URL set in the url attribute – there you will be able to see the status of the sent fax (the browser will ask you to login, use the Account SID and Auth Token values).

It can take a few minutes for the fax to be delivered, keep that in mind when testing.

To learn more about Server Code check out our YouTube playlist. Happy faxing.

 

How to Expose a Database Stored Procedure as a REST API

Posted: April 3rd, 2017Author:

In an earlier blog post I showed you how to expose a relational database function as a REST API. In this blog post you are going to learn how to expose a database store procedure as a REST API.

If you have an existing stored procedure you can use it. If you don’t have a stored procedure, I will show you how to create two simple tables and then create a stored procedure.

The database used in this example is MySQL. The stored procedure will insert the same data into two different tables. The first step is to create two tables.

Here is SQL to create the first table:

And here is SQL to create the second table:

This is the SQL for the stored procedure. The stored procedure inserts the same information into both tables – performing two inserts.

It’s a simple but good example. You can make the stored procedure as complex as you need but the process of exposing it as a REST API is the same and is shown next.

To expose the stored procedure as a REST API, create a custom API Express service with one SQL component:

apiexpress-storedprocedure

 

In the SQL component, call the message_and_backup stored procedure passing in the message input. That’s it.

Right away you can test the API Express service:

apiexpress-storedprocedure-test

 

In this blog post you learned how to expose a stored procedure as a REST API. You can as easily expose a custom SQL query or a function as a REST API. To learn more about API Express please visit our YouTube channel.

 

How to Expose a Relational Database Function as a REST API

Posted: March 29th, 2017Author:

Appery.io API Express provides an easy way to expose a SQL query as a REST API. You can as easily expose a relational database function as a REST API. In this blog post you will learn how to do that.

A user-defined function is created with CREATE FUNCTION statement. We will use a simple function, one the increments the entered number by 1.

Here is an example for PostgreSQL database:

And this is an example for MySQL database:

To invoke the increment function use this SQL query:

To expose this function as a REST API, create the following API Express service:

apiexpress_function

Using the SQL component

It uses the SQL component and invokes the same SQL query.

Now you can easily test the API Express service. Entering 100 will return 101:

apiexpress_function_test

Testing the service

 

As you can see, invoking and exposing a custom SQL query as a REST API is simple. Now you also know how to expose a database function as a REST API.

To learn more about API Express and how to integrate with external resources (SQL database, REST API, web service), please go to our API Express YouTube playlist where we have many videos to help you build faster.

Cutting Server Code Script Testing by 50%

Posted: March 23rd, 2017Author:

Testing your mobile app is hard. You need to test the app UI (client) and app backend.

The Appery.io Services team has built hundreds of apps for our clients and to help testing the app backed has come up with a powerful testing approach and tool.

In this blog post you will learn about this approach.

The services team has successfully developed and used a tool to streamline unit testing of hybrid mobile apps that are hooked up with Appery.io Server Code scripts. Server Code allows to develop custom server-side business logic (using JavaScript) without the need to build or maintain server infrastructure.

It is common for a Server Code script to access and query the Appery.io Database. This tool gives the benefits of testing such scripts without impacting the database. On top of that, supporting data driven testing by this tool empowers streamlining resources for regression checking. In addition, the time-consuming database “dropping and recreating” is a thing of the past.

The tool has a GUI and a set of shell scripts integrated with the Appery.io platform via REST API services.

Appery.io GUI for testing Server Code scripts

GUI for testing Server Code scripts

The testing preparation is as easy as preparing valid input parameters and verifiable output results.

Once everything is configured, testing is started by clicking the Run button and can be completed as many times as necessary.

Since all the communication is done using JSON format, updating input parameters and reviewing outputs can be easily done with a built-in text editor.

Using this tool testing is done twice as fast.

Right now this tool is used by the Appery.io Services team. If you would like to use it for testing with your Appery.io app or learn more, please email us.

How We Try to Make Our Customers Happy

Posted: March 21st, 2017Author:

Appery.io How We Try to Make Our Customers Happy

How We Make Our Customers Happy

Appery.io has a lot of cool features for developing apps, but which parts of Appery.io help our Apppery.io Services customers the most? To figure this out, we have interviewed our customers to find what made them the happiest in getting work done on our platform using our services. Here’s what our customers singled out.

Pricing

Interviewees indicated that they benefited a lot from our scaleable pay-as-you-go approach. Many thousand-hour projects start with a single Advisory Pack or Flex Pack (five- or forty-hour assignments). After working with us, they become confident enough in our professional services to move forward with us even faster. (Some of our customers have said that acquiring professional services with us is like ordering food from a menu at a restaurant.) Of course, if five hours of help is all you need, we have you covered there, too.

Process

Because of the ease-of-use support built into the platform, our customers can do the initial prototyping themselves and seamlessly hand off the project to Appery’s professionals to finish. Our clients are excited to be able to to stay focused on the business requirements for their apps while leaving the challenging implementation details to us – all within the same development environment.

Transparency

Many of our customers mentioned the transparency aspects of the platform in getting the most out of Appery Services. Many people are used to sticking notes on their refrigerator, so they find our platform’s online collaboration board very easy to use. The board consists of three columns: “to-do”, “in progress” and “done”. Moving a note from one column to another represents a developer’s progress with the task. In addition to this, enterprises can benefit from sophisticated reports to track progress, identify potential bottlenecks, and determine future performance.

More than 400,000 Appery.io customers already enjoy having the option to use our services to easily and efficiently augment their benefit from the platform. Join the club!

Appery.io Newsletter (February 2017)

Posted: March 21st, 2017Author:

Our February 2017 newsletter.

Learn What’s New in Our March Platform Update

In early March we rolled out a second platform update for 2017. The update includes these features and benefits:

  • Improved Autocomplete in App Builder for Ionic
  • New Ace Editor in Server Code
  • Instantly Import Any Database Service into an App
  • Better Developer Experience for Testing APIs inside the App Builder and API Express
  • API Express Autogenerated Services Now Support Sorting by Multiple Parameters
  • API Express Database Connection Now Supports Custom Properties
  • Cloud Database Upgrade

Learn more about these new features and benefits in our blog post.

22 Things You Need to Know about Appery.io Server Code

Appery.io Server Code allows you to write app logic with JavaScript that is executed on the server. Custom app logic is placed inside a Server Code script which is than invoked as a REST API from a mobile app. In this post you will learn everything you should know about Appery.io Server Code.

Video Tutorial: How to Call the WordPress REST API

Watch this short video to learn how to call the WordPress REST API from an Appery.io app. The video shows two approaches invoking the API. First, it shows how to invoke an API using API Express. Second, it shows how to invoke an API from Server Code.

New Step-by-step Tutorials

Our friends at WEALL published two great step-by-step tutorials on how to build apps with Appery.io. Check them out:

Learn How Dyjit Launched Their App for a New Hospitality Platform Using Appery.io

Dyjit’s vision is to make life better by introducing digital experiences where they do not yet exist. Dyjit’s first product, knowye (know what you eat), is a hospitality platform that transforms the traditional paper menu into a digital marketing channel and enables restaurants to cater to and market to shifting consumer needs. Learn how this app was built.

Learn How Appery.io Helped Deliver: HABITat, an AI-powered Personal Change App

Posted: March 15th, 2017Author:

Appery.io, HABITat, API, API Express, Case Study, Database, Mobile Backend, Server Code
Enkr8ia was formed with the purpose of developing technology to enable people to achieve their personal goals. The name is derived from the ancient Greek word “enkrateia” that stands for “In power of self”.

Read the rest of this entry »

March Platform Update: Improved Autocomplete, Ace Editor in Server Code, Improved API Testing and More

Posted: March 6th, 2017Author:

Learn about our March platform update.

Improved Autocomplete in App Builder for Ionic

Autocomplete is one of the most-loved developer features. You don’t need to remember the variable name, can quickly insert it from the autocomplete list and more importantly it reduces errors. The App Builder for Ionic now has an improved autocomplete feature, it is now available for any property in the Property panel. Simply click Ctrl+Space to see the available values.

appbuilder_ionic_codeassist

New Option to Specify Custom Database Connection Properties in API Express

New Ace Editor in Server Code

Appery.io Server Code source editor has been upgrade to the poplar Ace editor. The new editor provides the following benefits:

  • 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 error reporting.

servercode_aceeditor

Read the rest of this entry »

Learn How Dyjit Launched Their App for a New Hospitality Platform Using Appery.io

Posted: March 3rd, 2017Author:

Appery.io, App Builder, Case Study, Database, Server Code, Knowye

 

Dyjit’s vision is to make life better by introducing digital experiences where they do not yet exist. Dyjit’s first product, knowye (know what you eat), is a hospitality platform that transforms the traditional paper menu into a digital marketing channel and enables restaurants to cater and market to shifting consumer needs.

  • Filter the menu to items that meet your preferences. For example, if you are a vegan or looking for a gluten-free dish, your personal menu with additional ingredient related details will be shown.
  • Select items for your order.
  • Estimate your bill, calculate the tip, split with your group.
  • Add items to your wishlist or favorites.
  • Keep your menu and selection history.

The Dyjit team selected the Appery.io lowcode platform to build and launch their first mobile app.

The Appery.io visual App Builder allows building the app UI 3-4 times faster than using traditional tools.

The Appery.io platform also provides out-of-the-box, integrated backend services such as a cloud database, Server Code for app logic and Push Notifications. This means you don’t need to look for any other backend services and can build and test the entire app quickly and with less resources. The platform enables building a complete mobile app fast, without needing to have a traditional development team.

The app UI was quickly built using the Appery.io App Builder for jQuery Mobile. On the backend, the app leverages the Appery.io Database and Server Code for custom app logic. Running the app on the Appery.io platform will enable the Dyjit team to easily scale the app to any number of backend API calls without lifting a finger. And that’s precisely the reason why the Dyjit team selected the Appery.io platform – it enables them to spend time building their product without worrying about app infrastructure and tooling.

Knowye is available in the Apple and Android app stores and piloting at Heartland Brewery in New York’s Port Authority. Follow knowye’s progress on their Facebook page.

Bon appetite!