Getting Started with Mobile Development and IBM MobileFirst 7.1

This post is more than 2 years old.

A few days ago I blogged about the release of MobileFirst 7.1. At the time, I really didn't have a lot of time so I didn't say much outside of, well, that it was released. Now that I'm back home (for a few days anyway), I thought I'd write a bit more about MobileFirst 7.1 and how hybrid mobile developers can make use of it. This is going to stretch out over a few posts, mostly written today, so for now I'm just going to cover installation and basic setup.

Before I get into installation, I know some of my readers still don't quite get what MobileFirst is. Hitting the home page will give you a bunch of pretty pictures and good information for managers, but as developers, we typically like things a bit more boiled down. What follows is my personal take on what MobileFirst is and why it is cool. Obviously I'm not a marketer so you will forgive me if what follows is a bit more casual than typical IBM marketing. ;)

At a high level, MobileFirst is a support system for mobile apps. It is a server product that integrates with your mobile app (and to be clear, this doesn't impact offline support at all) and provides various different services. The server can run in multiple locations (more on that later) and includes a CLI for working with mobile projects. In terms of how your mobile app is built, MobileFirst supports native, hybrid (Cordova), and mobile web sites. The services MobileFirst provides includes:

  • The ability to provide proxies for HTTP, SQL, and other services. So imagine your application makes use of an API that returns weather information. In a typical mobile app, your app makes a HTTP request to the API, parses the response, and then does something with it. In MobileFirst, I can create an "adapter" that represents that API. My mobile app calls the adapter on the MobileFirst service which then proxies the call to the remote API. Right away I get some freaking cool benefits. One, if the remote API returns a bunch of crap I don't need, I can reduce the result payload to just what I want. Along with reducing the result, I can do whatever I want. Imagine the weather API only returns data in that weird format the rest of the planet uses. I could 'fix' that bug by returning Fahrenheit instead. Along with acting as a proxy, I also get reporting on the back end server so I can see how often the API is being called and how much data is going back and forth. Finally, I can completely replace my API provider on a moments notice by updating the adapter. My mobile app wouldn't need to know at all.
  • The ability to setup Android/iOS Push for your application. A REST API is also provided to so you can dynamically send push notifications to your mobile apps. Oh, and full reporting on your use of push as well.
  • The ability to manage multiple versions of your application as well as deploy new ones. So being able to deploy an update without going to the app store is pretty cool. But you can also do things like send an application message (for example, warning folks if part of your app will be down, or if a new version is coming soon, etc) as well as disable a version (imagine version 1.1 has a bad bug fixed in 1.2, you can disable and warn folks on 1.1).
  • The ability to send logs to a central server (with awesome support for handling your app being offline) so that you can search them later. So if all of a sudden folks on Android begin complaining about bugs, you can go to your MobileFirst server and begin searching on Android logs to see if you can figure it out.
  • You get a set of utilities to use within your mobile application. These utilities cover various things that might be useful. So for example, geolocation related utilities like "am I in a polygon" or "how far am I from a polygon". Or setting badge icons. Or detailed network information (like is airplane mode on). These utilities aren't something you would use on every project. They aren't "oh my god, I've waited all my life for these" type things, but they are useful items that you'll use from time to time and appreciate they exist.
  • I've already mentioned analytics in regards to the adapters, but you get more much more analytics of course.
  • Support for working with existing security systems. This lets you tie in things like adapter calls to an authentication framework. I'll be honest and say I've not yet played with this aspect of MobileFirst.
  • Finally, you can also use MobileFirst to handle your enterprise app store.

So that's what MobileFirst is to me, and to be clear, there's more I haven't covered, but these are the aspects that have most interested me as a developer. If you want to check it out, note that you can do so for free. This isn't a "trial" edition that times out, but a complete developer edition that you can use forever while testing/learning/etc.

So let's talk installation.

Installation

Working with MobileFirst requires two things - a server and a command line interface. There is one main download for MobileFirst and it includes both the server and CLI, so whether you plan to run the server on your local machine or not, you'll download the same package.

Start off here: Get the Developer Edition. You'll need to register with IBM, but this is a one time thing and we won't spam you. (In fact, I'm proud to say we seem to default the 'can we send you crap' email stuff to off, which is rare for companies.) Once past the registration you'll end up on the download page:

shot1

Click the "Command line interface" tab and then select the binary for your platform.

Once downloaded, just run the installer and you'll be good to go. When it is done, open up Terminal or CMD and ensure things are kosher by typing mfp:

shot2

Note - if you don't prefer the CLI, you can also get an Eclipse add on called "MobileFirst Studio".

The Server

Ok, now you have a choice. You can set up a local server for - well - local testing. (The local server can't be used in production of course.) Or you can use the new Bluemix support to run a server on the cloud. You would consider the Bluemix route if you wanted to demonstrate something to a client or coworker. To set up a local server, simply decide on a particular folder, and run:

mfp create servername

This is a one time command. To fire it up, you'll do:

mfp start

To stop it, do:

mfp stop

And finally, to get to the web based console, just do:

mfp console

As for using MobileFirst with Bluemix, I was planning on walking folks through that here, but we've got an excellent guide already online: Evaluate IBM MobileFirst Platform Foundation on IBM Containers. If any of my readers try this guide and have issues, just let me know and I'll flesh out any confusing bits.

What's Next

This post talked about what MobileFirst is, and discussed the installation and setup of an initial server. In my next post, I'll tell you how to build a hybrid app, and discuss how the "workflow" is handled for working on your app. I'll also discuss how you would move an existing application into MobileFirst.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Archived Comments

Comment 1 by Gary F posted on 8/17/2015 at 10:18 PM

Sounds interesting, Ray, particularly the connectors. I was looking at one of IBM's mobile services earlier today and was also frustrated by the complete lack of technical info. It was just marketing blah blah. No meat at all, no API docs or even FAQs. The only option was to email them for more info. I hope they don't email me back a white paper. There's no pricing either... possibly for a good reason. It's as if IBM rely on managers in corporates to choose an IBM solution for their developers to use, rather than the developers themselves choosing IBM. I look forward to the rest of your posts in this series.

Comment 2 (In reply to #1) by Raymond Camden posted on 8/17/2015 at 10:20 PM

If you tell me the product, I'd be happy to hunt up a tech resource for you.

Comment 3 (In reply to #2) by Gary F posted on 8/18/2015 at 2:42 PM

It's Xtify. Someone emailed me back this morning with questions so that someone else can contact me based on my answers, apparently. I'm looking for a perfect push provider that plays beautifully with PhoneGap, which is proving difficult because either they don't have PG support, don't support unlimited user-defined polygons, or they're super expensive.

Comment 4 by jcesar posted on 8/25/2015 at 7:35 AM

The first link points to the pokemon demo

Comment 5 (In reply to #4) by Raymond Camden posted on 8/25/2015 at 9:08 AM

Oops, thanks - fixed.

Comment 6 (In reply to #5) by Carlos Santana posted on 8/25/2015 at 5:53 PM

I like pokemons

Comment 7 by Bin Sand posted on 8/28/2015 at 6:09 AM

Hello,

This is really an informative blog for all the beginners as well as app developers. App demand will surely increase day by day, as it is the main reason behind the business success.

I am an app developer, I have tried most of the mobile app development platforms. I have developed more than 50 apps till today with the help of Phonegap, Telerik, Configure.IT etc. They are running successfully on app store.

As per my experience in this field, I recommend developers as well as beginners to use mobile app development platform like Configure.IT, because it provides automatic coding, app preview facility, direct API connect and a lot more features. These things save a lot more development time and provides fast and well designed app in much less time. This platform is available for Android & iOS both. Try this cross platform app development tool once, you will love it.

Read more: http://www.configure.it/fea...

Comment 8 by Safrul posted on 8/8/2017 at 9:32 AM

so sad... this link (https://mobilefirstplatform... : 404 Not Found

So how to run mfp command? :(

Comment 9 (In reply to #8) by Raymond Camden posted on 8/8/2017 at 12:45 PM
Comment 10 (In reply to #9) by Safrul posted on 8/10/2017 at 3:31 AM

okay now I manage to run mfp command.. but when I tried to run 'mfp cordova' this error will comes:

Error: Unrecognized or empty cordova subcommand:
Error: Implementation for this cordova subcommand has failed or not been provided: undefined.

Do you have any idea why this happen? Weird.. I have cordova, ionic, nodejs already..

Comment 11 (In reply to #10) by Raymond Camden posted on 8/10/2017 at 1:21 PM

Really sorry - I don't even have MFP installed anymore. Best I can suggest is posting it on Stack Overflow.

Comment 12 (In reply to #11) by Safrul posted on 8/11/2017 at 7:10 AM

It's okay Sir, many thanks.. by the way, your tutorial is very great one. God bless you :)

Comment 13 (In reply to #12) by Raymond Camden posted on 8/11/2017 at 11:08 AM

Thank you and good luck.