Appery.io Updates its New HTML5 App Builder with Windows 8 Support, plus jQuery Mobile 1.2, PhoneGap 2.2, and Push Notifications

Windows 8 Support

Windows 8

Appery.io new HTML5 app builder has been the default builder for the past couple of weeks and we continue to update it with new features. One such feature is new Windows 8 support. In addition to jQuery Mobile/PhoneGap apps, you can now build Windows 8 apps with native support such as Snap View, Search Charm, Share Charm, and Live Tile.

To create a new Windows 8 app, click the “More create options” link from the Apps page and then select Windows 8 App as the app type. Try our Windows 8 app tutorial.

jQuery Mobile 1.2

We also upgraded to a much better jQuery Mobile version 1.2.

Selection_773

PhoneGap 2.2

We also upgraded PhoneGap to version 2.2. This means Appery.io cloud build has also been upgraded to PhoneGap 1.2.

If you use Appery.io Mobile App Tester for Android – go and grab an update so it also uses the latest PhoneGap version.

Push Notifications

A long requested feature – Push Notifications feature has been added to Appery.io Backend Services.

Selection_772

Want to try it? Try our new Push tutorial.

New Tutorial: Building a ToDo App with Appery.io Backend Services

Build this app and learn how the app builder is fully integrated with backend services.

Building a Mobile Search App with Appery.io Database, Part 2

Last week we put posted Building a Mobile Search App with Appery.io Database tutorial that shows you how to search a database for a particular search term. The way the search worked, is that the entire word has to be matched. For example, you could enter ‘Apple’ but not ‘Ap’ to search. In this post we are going to show you how to use a regular expression to get all objects that start with a particular letter. As for our data, are going to use US States.

Building the UI

To start, the UI that we need looks like this:

  • For input we use a search component
  • Below the input we have a grid, with one column and a label inside.

That’s all we need for the UI. Let’s now create the database.

Creating a database

  1. Create a new database by going to https://appery.io.
  2. Go to Collections tab and click Import button.
  3. Upload States CSV file to the database. Once the collection is created, it should look like this:

That’s it for the database. Let’s now add a REST service to search this collection.

Adding a REST service

  1. In Appery.io app builder, select Project > Create New > Database Services
  2. Select your database
  3. Expand States collection and check Query service.
  4. Click import Selected services button. A query search for States collection will be created.
  5. Let’s test the service. As we want to make the search a little bit more flexible, we are going to use a regular expression. For where param, enter the following:
    {"States":{"$regex":"^C", "$options":"i"}}

    The above will return all states that start with letter C or c. “$options”:”i” is what specifies the query to ignore the case.

We are done with the service. Let’s move on to mapping.

Mapping the service to the page

The input mapping looks like this:

This is JavaScript mapping:

return '{"States":{"$regex":"^'+value+'", "$options":"i"}}';

This is output mapping:

Invoking the service

The last thing we need to do is to invoke the service. Select the input search field, then Events > Add Event > Search. Add Action > Invoke Service, select the service instance.

Testing the app

To test the app, enter any letter, for example ‘n’ and click the magnifying glass inside the search input:

Building a Mobile Search App with Appery.io Database

This tutorial will show you how to build an app that searches data stored in Appery.io database.

Let’s start with building the mobile UI.

Building mobile UI

Using Appery.io app builder, create a page named Phones and build the following UI:

  • Maker name is  a placeholder
  • Below the button ,there is a grid with two columns and a label inside each column.

Creating a database

  1. Create a new database by going to https://appery.io.
  2. Go to Collections tab and click Import button.
  3. Upload Phones CSV file to the database. Once the collection is created, it should look like this:

Creating REST services to access the database

  1. In Appery.io app builder, select Project > Create New > Database Services
  2. Select your database
  3. Expand Phones collection and check Query service.
  4. Click import Selected services button. Two services will be generated under Services folder. One is a settings service that holds the database id and the other one is the query service.

Open the service and then open Request Parameter panel. It should look like this:

Click Test. As we didn’t specify anything for where parameter, you should get all the phones in the collection.

Let’s now test the where parameter. Enter the value of {“Maker”:”Samsung”}, then click Test. You should now get only records where the maker is Apple.

Note that we don’t need to create the response parameters as the response was automatically created when we imported the services.

Adding the service to the page

  1. Select the query service and drag and drop it over the phone frame. A box will appear on the left-hand side indicating a service instance was added to this page.
  2. Rename the service instance to: query_phones

Mapping the service to the page

  1. Open Data Mapping tab
  2. Map the input component to where parameter:
  3. Click Add and enter the following code:
    return '{"Maker":"'+value+'"}';

    this means any value entered from the page will be used to search the database.

  4. Click on Response Mapping and create the following mappings:
  5. Go back to Design view.
  6. The last thing we need to do is to invoke the service. Select the button, then Events > Add Event > Click. Add Action > Invoke Service, select the service instance.

Testing the app

Run the app in the browser and enter either Samsung or Apple as value. For example entering Samsung will produce the following:

Displaying a message when no records are found

  1. Add a new label component just above the grid
  2. Rename the component to no_records and uncheck Visible.
  3. Select the button, go to Events. Add a Run Custom JavaScript action with the following code:
    Appery("no_records").hide();

    That’s to hide the label on every new search.

  4. Now select the service instance on the page, then Events > Add Event > Complete. Add Run Custom JavaScript action with this code:
    if (jqXHR.responseText == "[]"){
       Appery("no_records").text("Nothing found");
       Appery("no_records").show();
    }

    If nothing is returned, show the message.

  5. Test the app, if you enter anything other than Apple or Samsung, you should get the following:

 

 

August Release: Database Integration, File API, Project Backup, and Simplified Project Creation

We just released some really awesome features in Appery.io!

App Builder Database Integration

In early July we launched Appery.io Database where you can store app data. Now we have launched database integration in our app builder. This means you can point to a specific database, select the collection(s) you want to use and automatically generate all the REST services.  To create a services from database, select Create New > Database Services:

Next select the database:

Once the database is selected, you can select the services for which you want to generate REST services.

The first section creates REST services for User management.

The second section lists all the collections you have in current database. You can then select which actions (Create, Delete, etc) you would like to create for a particular collection:

When you click Import selected services button, the following REST services will be generated:

For example opening the service for creating a new message looks like this:

The request and response parameters are also generated.  Here is a screen shot of request parameters to create a new messsage:

Isn’t this awesome?

File API

We continue to add new features to Appery.io Backend Services by adding File API. You can now easily store files in the database. When you open any database, you will see a new Files tab:

Read more about the File API.

Project Export/Import

Our users have been asking for this feature for a long time and it’s now available. You can export and then import a project. To export a project, go to app options page (Export Backup):

To import an app from backup, click From Backup when creating a new app (you get to this screen by clicking More Options link, see next section):

Even easier way to create a new app

Last, but not least, it is now even easier to create a new app. Right from Apps page, enter a new app name and click Create. That’s it.

July Release: Better Way to Test Your App, jQuery Mobile Multi-page Template, Queries In Database Console, PhoneGap Upgrade

We got some really cool stuff out this week. Check it out.

Better way to test your app

When you open the app builder you should see a new and very nice phone frame:

The old one was more Android-like. The new one is neither Android, iPhone or Windows Phone. Just a nice phone frame.

There is an upgraded test page:

You can use the new tool bar at the top to change the phone orientation as well as change the size:

That’s not all. We also now have an option to test the app without the mobile frame. In the Test pop-up, uncheck Show in mobile frame:

When you open the app, it won’t use the frame:

The frame looks nice in the browser, but technically speaking testing without the frame is better — as you are testing the actual app (just the app code, no frame). Of course when you run the app on your device, the frame is not there as well.

jQuery Mobile Multi-page Template

jQuery Mobile supports multi-page templates where two or more pages are placed inside the same file. You can now turn on this features in Appery.io app builder (it’s turn off by default). Go to Project > Project Profile:

Queries In Database Console

Appery.io Database comes with Queries support (docs) and now you can try the queries right from the collection console:

Showing products that cost more than $30 (or any other currency):

PhoneGap Upgrade

We upgraded to PhoneGap version 1.8.1. Every new and existing app will now use this new version of PhoneGap.

Android 4.0.x

We also added build support for Android 4.0.x

As always, we want to get your feedback. You can always email us (support@appery.io) or post on our forum.

StackMob API Plug-in in Appery.io App Builder

Last weekend we participated in the AT&T Mobile Hacktathon hosted by StackMob. Just before the event we published StackMob API plug-in in Appery.io app builder so that it would be very simple to connect to StackMob. Here is how easy it is to connect to StackMob.

In Appery.io app builder, select Create New > From Plug-in, then select the StackMob plug-in:

When you click to import the plug-in, you will be asked to enter StackMob key that identifies your app:

If you won’t enter the key right away, you can always set it by going to Services/StackMobDatabseSettings file.

The StackMob service looks like this:

You will notice that the URL has [objectName] in it. Simple set it to the object schema name defined in StackMob. My object is called messages so the updated URL would be this:

https://api.mob1.stackmob.com/messages

The service does a GET by default but you can set it to do any other action.

We can now instantly test the service. Open Request Parameters panel and click Test Connection:

We get result back which means our service works (you should create a few sample objects in StackMob before testing). The service input is defined, we now need to define the service output. That can be done automatically by clicking Populate Response Structure button.

Once the service is ready, add it to the page, and bind the service to the UI:

and finally run the app:

Appery.io Database API Plug-in and Documentation

In case you missed we just launched Appery.io Database – a cloud database for your mobile app. It’s the first feature as part of our mobile backend services. We are working on really cool stuff such as Push and more!

Database API Plug-in

Creating a new service based on Appery.io Database is very simple as each collection comes with a nice REST API hints:

But there is even easier way to add a service by using Appery.io Database API plug-in. From Project tab, click Create New > From Plug-in and select Appery.io Database API plug-in:

When you import the plug-in, you will be asked to enter the Appery.io Database Id you can get from the REST API hint section (or from Dashboard tab). If you don’t set it during import, you can always set in Services/ApperyDatabaseSettings file.

As you can see the URL is already set. Just set the collection and you will be ready to go. The service defaults to GET but you can change it to any method as shown. You can switch to Request Parameters, enter any request parameters and click Test. From Test, you can automatically define the service’s response structure.

The database key is also set in Request Parameters panel:

The {apperyDatabaseId} is resolved from Services/ApperyDatabaseSettings file.

We got some really awesome integration planned very soon. Right from Appery.io app builder you will be able to browser and create new collections.

Documentation

Looking for docs? View Appery.io Database docs. We are also working on some really nice tutorials. If you have any questions, you can always email us or post on our forum.

Appery.io Database: Backend For Your Mobile App

We are super excited the announce the availability of Appery.io Database (beta). Appery.io Database is a cloud database that provides a backend and storage for your mobile app. You already know that any using 3rd party REST API is very easy in Appery.ioapp builder. Every REST API provides some specific functionality. For example, if you use Facebook API you can easily post a message to the timeline, but what happens if you need to store data specific to your app? Let’s say you are building a todo app – where can you store the list of things to do? That’s exactly where Appery.io database comes in. It comes with elegant REST APIs so you can easily show, create, edit, and delete app data. Appery.io database comes with built-in User Management. It’s powerful, scalable and easy to use. It works seamlessly with Appery.io app builder.

You can access Appery.io database today at https://appery.io. From appery.io, go to My Account, then click on Database.

On the first page you can see a lit of all your databases, you can also create a new database:

Once you select a database, you will see all the collections in the database:

A very nice feature is that you get curl command hints. This will enable you to define a service in Appery.io app builder very quickly:

In Appery.io app builder, defining a service is as simple as this:

Keep in mind that this service is still in beta. We got a lot more features we want to add, such as push, analytics and server-side code. Database docs are here. We also would love to hear your feedback. Let us know of the forum, email, Twitter or Facebook.