IBM Bluemix Cloud Foundry hybrid mobile app tutorial

Nowadays every website or business is creating mobile apps.It is need of time.In this tutorial we will see How you can use Bluemix platform to power your Mobile Apps? Bluemix offers option to create web app (which can be enabled for mobile), Hybrid Mobile Apps and iOS 8 apps.

Bluemix mobile app platform helps you create Client Server Architecture app.Bluemix acts as a server in this case and your mobile app acts as Client.You can store app data on Bluemix.You can protect your data from access using Bluemix service as shown in below image.


Bluemix Mobile App Architecture

You do not have to code Server part.In normal Client and Server architecture mobile apps you have to write server part.The server part coding involves created API (URL’s which are accessible from your mobile app). Protecting your API interface and accessing data from API should be taken care of.

Along with API development you may want to enable analytics to see consumption details of API.Push notification implementation will take extra effort from your end.All this heavy lifting is taken care of by Bluemix.You will only have to focus on development of Client part.

The server part is easily taken care of using Bluemix front end and services created by Bluemix as part of first mobile app.Below I have discussed steps to create mobile app and brief idea of each services created.You can use RESt API calls from your mobile app to access them.

I have covered web app in a separate tutorial.Before reading this post you can read web app post.Some of the initial steps are covered in web app post.I will not be covering those steps here.I would start from the steps after that.

Step 1 : Select Bluemix Mobile App Type

After initial steps mentioned in Bluemix Cloud Foundry web app you will see below screen.You need to select type of mobile app you want.Currently Bluemix gives two options Hybrid and iOS8.If you are creating for Android or cross platform mobile app using Cordova then you should select Hybrid option.If you are creating for iOS8 then select iOS8.I will cover iOS8 mobile app in a separate tutorial.

Step 2 : Name your Bluemix Mobile App

After selecting the option Hybrid click on continue.On this screen you need to mention your Hybrid mobile app name.I have used Hybrid Mobile.Note the name you give here becomes part of your URL.Though you can change it later.Since this is test app I have given Hybrid Mobile.You can give it any name.

Step 3 : Bluemix Mobile App Dashboard

After giving the App name if you click the button you are directed to Hybrid Mobile App Dashboard.The dashboard looks similar to that of web app except few more details.By default Bluemix creates four services for every Hybrid mobile app.So far you have created the app.Now you can access the URL.If everything is right then you should see below message

hello from the cloud code application - please read the following pages for more information: Extending Node.js to use Mobile Cloud applications

Bluemix Hybrid Mobile App Dashboard

Step 4 : Understanding Bluemix Mobile App services

So far you have created Hybrid Mobile App.The App is live on a URL but does not have any logic.Bluemix creates four services along with default app.We will not discuss these services.Understanding these services is very important for creating successful apps.The four services created are

Mobile Application Security service


Bluemix Mobile Application Security Services

Mobile Application Security is to protect your Bluemix app from unauthorized access.You do not want your Bluemix app to be accessed by apps other than yours.Using Mobile Application Security service you can make your Bluemix app accessible from

  • Mobile Apps (Android Apps and iOS Apps)
  • Web Apps
  • Users based on their user id
  • Devices based on their device id

All the access control heavy lifting can be done from Mobile Application Security Bluemix frontend as shown in the image.The service provides Application id and Application secret using which your client devices can authorize themselves.

Mobile Data service


Bluemix Mobile Data Services

Data is critical for every app.Mobile Data service is interface to Cloudant database.You can store data into this database.You can import files such as image, video or JSON database files.The data is available to your mobile app using API’s.You can also work on the database from your App.

Mobile Data service also gives details about API usage from different clients for example Android App,iOS app and web app.All basic data operations are available through REST apis.You can select data,update data,insert data and delete data from your app.

Push Service

The Push service is used to send notification to mobile devices.Bluemix supports both Android and iOS platforms.It supports Apple Push Notification Service (APNS) for iOS and Google Cloud Messaging for Android.Through Push service Bluemix interface you can configure Apple Push notification service as well as Google Cloud Messaging service.


Bluemix Push Services

Along with it you can create messages for registered mobile devices.Bluemix allows Production mode as well as Sandbox mode.You can also create Tags.You can club similar notifications under one Tag.This way you can send messages to all devices clubbed under one tag.You can also see devices which are subscribed to a particular tag.

It currently does not support Microsoft Push Notification service.We may see support for Windows platform in future as well.Apart from that it does simplify task of sending push notification to mobile devices.

Mobile Quality Assurance Service

Mobile Quality Assurance service is very important for enterprise app.Small App owners may not get too much benefited with this service.Mobile Quality Assurance service helps you analyze user sentiment,bug reporting and crashes to improve your app.


Bluemix Mobile Quality Assurance Services

Successful Apps do update them as per user expectation.They come up with initial version according to their understanding of user need and business case.But initial version of app is then modified with time in small and big releases.These release requirement is fueled by Bugs reported as past of internal testing,user feedback in App stores and crash reports.

Conclusion

Above I have given brief idea about different services created by default Vanilla Mobile App created on Bluemix platform.The services fulfills requirement of most app developers.Bluemix Hybrid mobile app looks promising.It is easy to setup and configure.Also all basic needs of an enterprise app are covered.

The only complexity level is making API calls from your app.But that is one of the basic tasks of App development (Client and Server model).Once you get that figured out you can easily leverage Bluemix platform to power your App.I may plan to use Bluemix platform for my future app.

What is your opinion about Bluemix hybrid mobile platform? Would you consider it for your next App.

Leave a Comment