Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
ole-andr_haugen
Explorer

The world is moving towards an online reality, but offline is still a requirement for several mobile projects. Customers in the shipping industry are often limited to a satellite connection once or twice a day, field service workers often work in conditions without network access and for some apps like travel expense it is crucial that you don’t need to roam to be able to enter your data and even images while abroad.

So we decided to improve our already existing capabilities with a UI5 model based solution. It was delivered with service package 1 of our 2.20 release, and the performance of the end result totally exceeded all of our expectations.

You now have the option to choose local storage or webSQL, and if you need even more local data you can also add a Phonegap/Cordova plugin that will give you capabilities up to 2 TB (not that your device has that amount of storage capabilities in the first place).

Now for the Neptune Developer, you only need to decide which internal tables and structures to store locally and we have of course provided you with helper scripts that should make development of offline handling of data easier than ever before.

Now let me try to describe the way our framework has evolved from a standard web server approach much like the one you are familiar with from the SAP Business Server Pages (BSP):

Here the server side coding was often stateful and had issues with session timeouts and loss of network connection.

After the emergence of SAPUI5 and a proper Model View Control framework, we changed to a new architecture with the state being handled by the client and only JSON data passed between the server and client.

For the ABAP developer the structures and internal tables are now represented as models in the UI5 framework making the transparency between ABAP and JavaScript easy to comprehend.

In our latest Support Package we took it one step further and added a choice to store these models in local cache or in the client webSQL database.

In the Neptune Application Designer you can simply choose the type of local cache you want in the attributes of an object bound to SAP data:

Neptune functions have been added to these objects to make coding a lot simpler:

  • getOnline+objectName(value);
  • getCache+objectName();
  • setCache+objectName();
  • model+objectName -> JSON Model Object
    • setData and getData commonly used to change the data content in the model

And to work with the data in offline mode easy we also added a helper JavaScript with the following methods:

  • ModelData.Find(obj, key, val);
  • ModelData.Delete(obj, key, val);
  • ModelData.Update(obj, key, val, rec);
  • ModelData.UpdateField(obj, key, val, updKey, updVal);
  • ModelData.Add(obj, rec);

We have tested this framework with larger datasets (1 Million Records) - no problem regarding the performance on the device.

So, if you are in need of offline functionality in your Neptune Apps, don’t hesitate to upgrade to the latest SP and be amazed by the performance of the framework, I know I am.

Like to test it out, try our Sales Order app from our experience site.

Best Regards

Ole Andre Haugen

7 Comments
Labels in this area