IBM MobileFirst Platform Server on Bluemix.net in under 5 minutes
You may have already heard about IBM MobileFirst Platform Foundation and its capabilities. Some of the industry-grade features like security framework that it provides may have appealed to you and you now want to try it! You can do this in under 5 minutes, without downloading any software and without running around to find a machine to install it on!
Typically when you build a POC or demo of a mobile app with MobileFirst Platform,
- You first download the MobileFirst developer Studio or the MobileFirst CLI.
- Then you build the app and demo it from your laptop.
After this the fun begins. What if your boss or client wants to try the app for themselves and show it to their teams? This means you had to keep your laptop running or find a desktop where you could install the developer studio. When was the last time you looked for a desktop? And it gets more fun if you are a remote worker working off a mobile internet dongle and the clients cannot get into your base office intranet.
IBM Bluemix to the rescue!
Now you can get a fully configured (with a trial license ofcourse) IBM MobileFirst Platform server on the IBM cloud platform: bluemix.net . In under 5 minutes you can get a internet accessible server in a Docker container. The MobileFirst Platform server comes with a sample Runtime/project, MobileFirst Adapters and source code for a demo app that you can start using instantly.
The MobileFirst trial server uses the newly introduced capability on Bluemix.net called IBM Containers which lets you host your own Docker images. With IBM Containers, you create Docker containers from Docker images in the IBM Container registry (if you did not understand that - don't worry). The MobileFirst trial server is available as an image in the registry. However you do not need to learn Docker or any other additional technology to use this trial version of MobileFirst Platform server.
Running the sample
The server is a full featured MobileFirst Platform server that contains the MobileFirst runtime service, Analytics service, the Cloudant data proxy and the Mobile browser simulator - all installed on a liberty server. This server is configured with a local database (Derby) inside the container itself.
Once you have created the container and downloaded the demo app source code, you can use it right away. The sample uses app configuration and adapters that are pre loaded in the container image. You can find the detailed steps of creating the container in the tutorial as well as a companion video.
Just to demonstrate one of the basic capabilities follow the steps below.
- List the Catalog in the mobile app
- Go to the Operations console in the browser and Click on the App you are connecting (IOSWishList if you are using a native xcode app or AndroidWishlist if using a native Android app etc.)
- Then in the “Application Access” dropdown , select “Active Notifying”. Type some message in the notification message box
- Hit save
- Go back to the mobile app – and try to get the Catalog again
- You will see the message you added to the console. This appears only once per logged in session
Viewing Analytics Console of the MobileFirst server
The IBM MobileFirst trial server comes with inbuilt analytics. This helps you in analyzing various metrics around your app. You can read more about it here. For example you can see the various usage statistics.
Adding your own apps and adapters
If you are developing a POC and want to host your own app and adapters, you can do so by either uploading them thru the console.If you are using the MobileFirst CLI, then you can also add them via the newly introduced capability of pushing apps and adapters to a remote server.
Additionally using Cloudant from your mobile app
If you want to try out the Cloudant connectivity capabilities then you have to follow these steps
- Create a Bluemix Cloud Foundry App (of any type)
- Add a Cloudant DB service and bind it to the Bluemix app
- Create a container and bind it to the Bluemix application (You cannot seem to bind a already created container)
This will activate the configuration in the eval MobileFirst server to make the Cloudant access available to the MobileFirst client SDK so that the app can start reading and writing from the Cloudant DB. The Infocentre has more information you might want to look at.
However this capability exists only for iOS and Android as there is no Cloudant SDK available for Hybrid JS or Xamarin yet. You can however use an Adapter to talk to Cloudant from a mobile app in any platform.
There is more information on the Cloudant capabilities in MobileFirst in the Infocentre
There are a few limitations to the trial server image on Bluemix.
- This comes with a trial license and you cannot use this in production
- Any changes you make to the server like adding apps and adapters are non persistent. If you re-create the container again– those changes are lost
- You cannot add new Runtimes – you have to work with the default runtime “MobileFirstStarter”
- You cannot make changes to any of the server artifacts like authentication configuration, add new libs etc.
If you want to run a customized MobileFirst server on the container service, you can find more information in the getting started guide on creating your own images