Mobile’s Toughest Challenge

I have just finished reading an excellent article by Forrester’s Michael Facemire who clearly ‘gets it’ with regard to Mobile Offline challenges.  Much of what he writes in “Analyst Watch: Mobile’s toughest challenge” concerns two distinct but closely connected topics – Offline CRUD and Conflict Resolution.  Over the years we have seen an evolution in this area from a very basic engine to those of today where individual fields on a mobile table can have different conflict behaviours (latest, platform always wins, device always wins and so on).

Around 4 years ago I remember receiving a call from a field engineer who was about to start on his 5th job of the day but could not mark the job as ‘started’.  He was using an app developed in Flash Builder for Force.com and was viewing a popup offering him a choice of his record vs a new platform version of this record.  He had marked a job record as ‘complete’ when he had no connection.   Shortly after, an administrator had corrected the postal code on the platform record.  Clearly the business did not wish to interrupt the field engineers (there were a dozen in the field running app) to think about postal codes or any other such changes and definitely did not want to give the field engineer the ultimate decision on what to do with the records.  It was at this time that we started seriously thinking about improving Conflict Resolution!

Michael mentions 3 flavours of offline support.  First of all  ‘Client side read only cache’.  This describes applications where the mobile device does not need to create/update data such as the Sales Rep producing quotes that is suggested in the example.  We have seen similar apps in the field where engineers view parts and publishing house sales representatives view alternative titles to academic books.  To achieve this using the MobileCaddy application you set all mobile tables to ‘Refresh Only’ as in the example below.

2014-11-15_1859

Michael then discusses the ‘Last Write Wins’ technique and its usefulness to applications such as Chatter.  Clearly where new records are being created or updates (such as to Chatter status) aren’t critical then this is a useful technique.   In MobileCaddy we can set fields to be the latest system modstamp as shown below – the system mod stamp is a Salesforce field that keeps track of the last update on the record at record level.

2014-11-15_2032

Because Salesforce records the system mod stamp at record level, this approach would still not help out our field Engineer.  Clearly he would no longer be interrupted with a popup, but the latest created record (either his or the person in the office) would be recorded wiping losing the ‘loser’s’ changes!

Complete Transaction Synchronisation is then discussed.  This is where true robustness is introduced and where a great deal of our effort at MobileCaddy has been placed.  As can be seen from the screenshot above, we can give priority at field level to ‘Use Device Value’ or ‘Use Platform Value’.  Then, on a conflict’ the value (at field level) is taken from the appropriate ‘side’.  Harking back to our field engineer example, the postal code is set to ‘Use Platform Value’ (and is read only on the devie) and the status is set to ‘Use Device Value’.  This completely solves the issue we had.

In a follow up article we will look at the special field modstamp which, we believe, provides even more control in the conflict resolution process.

As Michael says ‘Building a robust offline solution may be the most difficult development challenge in mobile.’   We feel he has hit the nail on the head there – we have enjoyed every step of the way building a solution that tackles these issues head on.


MobileCaddy Startup

So you have installed the MobileCaddy Salesforce application and need to install the setup data and get a sample app running ?  This video shows you how.

Alternatively you can follow our step by step guide.

After this you may like to head over to check out our CodeFlow editor – we really think this is awesome!


MobileCaddy Platform Setup

So you have installed the MobileCaddy Salesforce application and you just want to get going.  You want to get any boring data setup out of the way and see a mobile application running.  Well fortunately we at MobileCaddy understand what a nightmare it can be data loading and configuring so we have some tools to make this very simple indeed ..

The application has a ‘Startup’ tab.

 

startuptab

Click this tab to start the MobileCaddy startup wizard.  The first screen you will see will be a confirmation dialogue.  This is a reminder that you will need to add users of MobileCaddy to the MobileCaddy permission set.  At this point click ‘Confirm’ to confirm that you have read this and understand it – it is just a reminder.

 

welcomescreen

The next screen invites you to install the MobileCaddy component data.  Click ‘Install’ to do this.

 

mccomponents

The installation is quite an intensive process under the bonnet here.  This doesn’t matter to us at this point save to point out that the operation may take several seconds.  Once complete, a dialogue similar to the following is displayed.

 

sysdataversion

The messages show that data has been successfully inserted.  Click on ‘Install’ to install MobileCaddy System Data Version records.  On success a dialogue similar to the following is displayed.

 

seeapp

At this point the MobileCaddy setup has been done and we are moving on to the seed application installation – let’s install it and then run it up!  Click ‘Install’.  After a few seconds a successful install will produce a screen similar to the following.

 

sampledata

Next is the final installation – the seed applications actual data.  Click ‘Install’ to run this data in.  On success we now exit the wizard.  A MobileCaddy ‘Application User/Device’ record is displayed for our Demo application.  Note that there are ‘Emulator’ buttons that will run up the app in the MobileCaddy platform emulator.  In essence the Application User/Device record represents a combination of mobile user, application they are running and the device they are running it on.  Feel free to glance over the details of the record but at this point we don’t need to delve into the detail.  Let’s click the ‘Emulator (Portrait)’ button…

 

audemulator
runningapp

A popup is displayed with a fully working application.  It is fully functional and will behave as if it was running on the device.  At this point feel free to click around the application.  Here I have clicked into a project record.

 

fullyworkingapp

 

It is probably best to stop this post here – you will want to have a play with the application!  Feel free to fire the app up in Landscape or in Debug (full screen) mode if you wish.  Enjoy!