Skip to Content

With the release of SMP Server SP04 and SMP SDK SP05 announced a few weeks ago, it seemed like a good time to update you on the state of cross-platform mobile development at SAP. SAP Mobile Platform (SMP) developers have two options for building cross platform mobile applications: Agentry (metadata-driven applications) and hybrid web applications. Agentry applications will be covered by other posts like this blog for example highlighting what’s
New in Agentry for SMP 3.0 SP04
– in this article I’m going to cover hybrid application development using SMP.

Late last year we released the SMP SDK, and with it, the new hybrid SDK called Kapsel. Kapsel was a new type of hybrid SDK for SMP, implemented as a set of plugins for the open source Apache Cordova framework rather than using proprietary technology. I wrote about Kapsel here: An Introduction to SMP Kapsel and described the initial set of Kapsel plugins which were:

  • AppUpdate
  • AuthProxy
  • Encrypted Storage
  • Logon
  • Logger
  • Push
  • Settings

This initial set of plugins was only available for Android and iOS – that of course changed with the latest SDK update, more on that in a little while.

In June, we released the SMP Server plus an update to the SDK (SMP SDK SP04); the SDK update included some enhancements to the existing plugins plus added some new plugins. First let’s talk about the enhancements:

  • The AuthProxy plugin was enhanced to allow it to prompt users for their password when BasicAuth was enabled. Before this enhancement, an application could authenticate on behalf of the user, but hadno way to allow the user to enter the password directly.
  • Added support for Apache Cordova 3.5 as well as iOS 7.1.
  • Added a barcode scanner plugin to the SDK. It’s the existing PhoneGap Barcode scanner plugin, forked and enhanced just a little. This was added to support the SAP Fiori Client, I’ll explain why in a subsequent post.

By this time, SAP had released the SAP Fiori Client (you can read about it here: SAP Fiori Client) and customers had started requesting the ability to build a custom version of the application or to be able to deploy the application internally from an Enterprise App Store (rather than the public app stores). So, to accommodate these customers, we added the SAP Fiori Client capabilities to the Kapsel SDK as a set of new plugins customers could use to create their own version of the application. With the SMP SDK SP04 release, we added the following new plugins:

  • App Preferences
  • Cache Manager
  • Fiori Client
  • Online
  • Toolbar

It’s not really important now what these plugins do because they can only be used (today) in the SAP Fiori Client application. Our goal is to make these plugins a little more generic, so our customers can use them in other types of applications as well. I will update you once we have completed that work.

Just having the plugins wasn’t enough – we couldn’t expect customers to hand assemble a SAP Fiori Client from the plugins. So, included with the SDK is a Node application (the Cordova SDK relies heavily on NodeJS, so we felt comfortable using it for other things) that a developer can execute to create a custom instance of the SAP Fiori Client.

We knew that some customers might need to implement multiple versions of the SAP Fiori Client, separate ones for different divisions or for different business units within the company, so the script’s execution can be customized by passing in a file path pointing to a configuration file with custom settings.

With these tools at your disposal, you simply edit the configuration file then open a terminal window and execute the node application and a few minutes later (well, it takes more than a few minutes) you’ll have your own custom instance of the SAP Fiori Client. With this application, you can customize it to suit your needs, preconfigure the Fiori endpoint URL, add additional plugins and more. Since it’s your own application, you can easily make it more secure using SAP Mobile Secure or you can deploy it to users using MDM or MAM tools such as SAP Afaria.

I’ll write more about what’s happening with the SAP Fiori Client in my next post.

Kapsel leverages a few technologies (some from SAP and some from third parties), so for each release we have to make sure to update the SDK to support the latest versions of the following technologies:

  • Apache Cordova
  • SAP MAF/Logon capabilities
  • SAP UI5 (used by the Logon plugin to render its UI)
  • Google Android
  • Apple iOS

The Kapsel team also delivers some special support materials (described at the end of this post) beyond the standard documentation, so for each release we have to make sure that we update the Kapsel Getting Started Guide and, if needed, the Kapsel Kitchen Sink Application (this update is only needed if we add new plugins or if we change any of the Kapsel plugin APIs).

SMP SDK SP05

With SMP SDK SP05, released on September 12th we continue to enhance the Kapsel SDK. Let me show you the ways.

In this version, we added support for Apache Cordova 3.6; it was released late (them, not us), so this capability will come to Kapsel in a patch to SMP SDK SP05 available soon.

The biggest news for this release is that we’ve added Offline OData capabilities to the SMP SDK. For Kapsel developers, this capability is exposed through a Cordova OData plugin. As you have seen in some of the other posts regarding the latest release of SMP, this version implemented a server-side and client-side capabilities that allow an application to interact with an OData source while online or offline. This is a big improvement and will bring great value to our customers.

The way this works with Kapsel is a developer will add the OData plugin to a Cordova application then implement some code to let the plugin know what remote data sources to take offline. Behind the scenes, a lot of stuff happens to create the local offline store, pre-load it with data and make that data available to the application whether the device is online or offline. With that in place, the application reads and writes to the data source and synchronizes with the back-end data source as needed.

If an application requests some data, the plugin intercepts the request and looks to see if it has the data the application is looking for. If it does, it’s served up from the local data store (which is kept synchronized with the back-end by the application). If the data source is not available locally, the plugin redirects the application to the SMP server to get the data.  When offline, the plugin simply interacts with thedata it has in the local store; any online datasources will not be available.

Other big news for this release is that we have added support for Microsoft Windows 8.1 to Kapsel. From the beginning, Kapsel has supported Android and iOS, but many customers have implemented Microsoft Windows tablets and Windows Phone devices and needed to be able to run their Hybrid applications on those devices. With this release, we’ve added support for the following plugins on Windows 8.1:

  • AuthProxy
  • Encrypted Storage
  • Logger
  • Logon
  • Push
  • Settings

Support for additional Kapsel plugins on Windows 8.1 will come in future releases.

It’s important to note that I’m only talking about Windows 8.1 here, not Windows Phone 8.1. In Windows development, Windows 8.1 applications use a different architecture than Windows Phone 8.1 applications. Because of this, when working with Apache Cordova, plugin developers have to implement different code for Windows Phone plugins. Microsoft, and correspondingly Apache Cordova, are migrating to a Universal Apps approach for Windows applications – allowing a single application (or plugin) to work for Windows 8.1 as Windows Phone 8.1. After the Cordova team has full support for Windows Universal apps, we will add support for Windows Phone 8.1 with Kapsel.

For your reference, Table 1 summarizes mobile operating system support for the Kapsel plugins.

Table 1 – Kapsel Plugin OS Support Summary

/wp-content/uploads/2014/09/kapsel_plugin_matrix_550639.png

More detailed information about our support for the Windows platform is available here.

There are some limitations affecting our ability to deliver a SAP Fiori Client for Microsoft Windows, I’ll cover this topic in my next post.

We also added some additional capabilities to the Kapsel SDK:

  • Logon plugin support for SAML
  • New logging API
  • End to End trace
  • Mobile Place integration

And of course, additional capabilities, additional plugins and more are planned for future releases.

At SAPPHIRE NOW, SAP announced a new web design and development tool for web applications called River RDE (recently renamed to SAP Web IDE, a much better name). SAP Web IDE is based on the open source Eclipse Orion project and allows developers to more easily design and code web applications using SAP UI5. SAP Web IDE is the tool SAP uses to create Fiori applications. It’s beautiful and pretty easy to use.

As SAP Web IDE is for designing web applications and hybrid applications are essentially cross-platform web applications running within a native application container, it makes sense that the two work together, right? Well, part of the team working on SAP Web IDE is the same team that created AppBuilder, and AppBuilder had some pretty cool integration with Kapsel, so we have the experience to do that. We have been working very closely with the SAP Web IDE, Fiori and UI5 teams to identify how SAP Web IDE and the Kapsel SDK can work together.

The first step is to give SAP Web IDE awareness of the Kapsel plugin APIs so that auto-complete and syntax checking works correctly for Kapsel applications. Next we know we want to give customers an easy way to take a web application from SAP Web IDE and deploy it through a Kapsel application. I’ll tell you more as soon as I have something I can share with you.

Kapsel Resources

There are a lot of great resources available to you to help you get up to speed on the cross-platform hybrid development capabilities of SMP. There are a lot of sessions on this topic scheduled for the 2014 TechEd&&d-code conference, you can read more about the scheduled sessions here.

Here are links to the SMP documentation:

The documentation is helpful when you need to understand how to accomplish specific tasks or get a detailed overview of a particular topic, but often developers need more. To accommodate this, the Kapsel development team and others within SAP have created a whole catalog of materials you can use to get up to speed.

The most thorough coverage of the topic is in the Kapsel Getting Started Guide which is available on SCN at http://scn.sap.com/docs/DOC-49592. Written by one of the Kapsel developers, this massive tome covers the whole Kapsel SDK start to finish. It’s not documentation for the Kapsel SDK; instead it’s a step by step guide for developers, written by a developer, for developers. The guide walks you through all of the server setup for the different features plus provides the code and instructions you need to use these capabilities in your applications.

For developers who want to learn more about the Kapsel APIs and see them work in a functioning application, we’ve created the Kapsel Kitchen Sink application. The Kapsel Kitchen Sink is a free web application available today from the SAP Store. When you run the application inside of a Cordova container (with the Kapsel plugins added), it shows you detailed information about each of the plugins and the plugin APIs and, when configured to connect to an SMP 3 server, provides functionality which allows you to quickly execute the different APIs and immediately see the results. Developers can use this application to test out each of the APIs to see exactly how they work before trying to use them in their own applications. I wrote the initial version of this application, so of course I think it’s pretty cool.

Another excellent source of information on the SAP Mobile Platform can be found in the SAP Mobile Academy: http://www.sapmobileacademy.com. The academy contains a suite of videos that introduce developers (and others) to the SAP Mobile Platform and some developer-specific topics. I expect the catalog of available videos to grow over time.

Lastly I hope you are all signed up for SAP TechEd && d-code, I will be there in person so would be happy to see you in my sessions. Here is a link to all the action we will have around SAP Mobility.

John M. Wargo is a software developer and the SAP Product Manager for the SMP Hybrid SDK (Kapsel) and the SAP Fiori Client. John has written many books on mobile development, including his most recent Apache Cordova 3 Programming and Apache Cordova API Cookbook books cover Apache Cordova development in great detail.

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

      1. saurabh shrivastava

        Hi Midhun,

        Thanks for your reply. can help me in android application development for native app as i am refering to your link SMP 3 – Develop App and Test…but i am facing error like Could not find class ‘com.sap.mobile.lib.request.RequestManager’, referenced from method com.example.smp3android.AppInfo.getRequestManage. could u please help me .

        BR,

        saurabh

        (0) 
    1. John Wargo Post author

      Apple does not allow Windows systems to be used to build iOS applications.

      Kapsel is just a set of plugins for Apache Cordova, it can have no impact on mobile device platform requirements.

      (0) 

Leave a Reply