IBM MobileFirst Platform Server on 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,

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: . 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 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.

  1. List the Catalog in the mobile app
  2. 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.)
  3. Then in the “Application Access” dropdown , select “Active Notifying”. Type some message in the notification message box
  4. Hit save
  5. Go back to the mobile app – and try to get the Catalog again
  6. You will see the message you added to the console. This appears only once per logged in session
missing_alt missing_alt

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.

missing_alt 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.

c:\mfpPOC>mfp create MobileFirst
A MobileFirst Project was successfully created at c:\mfpPOC\MobileFirst
c:\mfpPOC>cd MobileFirst
c:\mfpPOC\MobileFirst>mfp add api MyCart -e windows8
A new Windows8 - Universal API was added at c:\mfpPOC\MobileFirst\apps\MyCart
c:\mfpPOC\MobileFirst>mfp add adapter StoreAdapter -t http
A new http Adapter was added at c:\mfpPOC\MobileFirst\adapters\StoreAdapter
c:\mfpPOC\MobileFirst>mfp server add
[?] Enter name of new server definition: BluemixServer
[?] Enter the fully qualified URL of this server: http://***.***.***.***:9080
[?] Enter the MFP admin login id: admin
[?] Enter the MFP admin password: *****
[?] Save admin password for this server?: Yes
[?] Enter the context root of the MobileFirst administration services: worklightadmin
[?] Make this server the default?: No
Contacting server...
The following runtimes are currently installed on this server: MobileFirst
Server profile 'BluemixServer' added successfully.
c:\mfpPOC\MobileFirst>mfp push BluemixServer
Preparing for push...
Contacting server...
Runtime 'MobileFirst' will be used to push the project into.
Pushing to Server...
Deploying c:\mfpPOC\MobileFirst\bin\MyCart-Windows8native-1.0.wlapp...
Deploy complete for c:\mfpPOC\MobileFirst\bin\MyCart-Windows8native-1.0.wlapp.
Deploying c:\mfpPOC\MobileFirst\bin\StoreAdapter.adapter...
Deploy complete for c:\mfpPOC\MobileFirst\bin\StoreAdapter.adapter.
c:\mfpPOC\MobileFirst\bin\MyCart-Windows8native-1.0.wlapp has been deployed.
c:\mfpPOC\MobileFirst\bin\StoreAdapter.adapter has been deployed.
Push Completed Successfully.

Additionally using Cloudant from your mobile app

If you want to try out the Cloudant connectivity capabilities then you have to follow these steps

  1. Create a Bluemix Cloud Foundry App (of any type)
  2. Add a Cloudant DB service and bind it to the Bluemix app
  3. 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.

  1. This comes with a trial license and you cannot use this in production
  2. 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
  3. You cannot add new Runtimes – you have to work with the default runtime “MobileFirstStarter”
  4. You cannot make changes to any of the server artifacts like authentication configuration, add new libs etc.

Next steps

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

Last modified on May 01, 2016
Share this post: