In this blog post I would like to shed some light on the development options at your disposal when building mobile apps. There is an abundance of use cases that dictate how an app needs to be built, and SAP offers a multitude of tools and approaches to achieve that goal. In the following sections, I am going to introduce the various pieces of technology and their strengths on a high level. Finally I am going to assume the role of a decision maker and give some guidance on when to pursue which approach. More detailed information on the individual topics can be found in dedicated blog topics, which I am going to link as they become available.
Fig. 1: Application development options around SAP Cloud Platform Mobile Services
Table of Contents
SAP Mobile Cards
Our Micro App platform “SAP Mobile Cards” (formerly known as “SAP Content to Go”) allows you to mobilize virtually any data source with little to no custom development. Each piece of information is rendered as an individual card and displayed in the personal Passbook-style iOS* Mobile Cards app. The data displayed in the app is fully offline-enabled and Mobile Services will automatically track changes and push updates to the individual users. Whenever additional context for a card is required, users can easily navigate back from the currently displayed card to its origin application. In addition, the Mobile Cards app comes with additional commonly expected features, such as the ability to share cards between users – of course only those that they are allowed to see.
In order to enable Mobile Cards in Fiori applications, no additional development is required. Building on top of Fiori Smart Templates, we provide a Fiori Launchpad plugin that allows you to easily enable Mobile Cards in your apps simply by means of configuration. And if you are looking for a more flexible means of integration Mobile Cards into your system, there are also back-end facing APIs that allows you to easily publish data in the form of Mobile Cards cards or even actions that can be performed on those cards. Last but not least, if you are not happy with the default look and feel of the cards, you can easily design custom templates in the Mobile Services administrator cockpit.
*Android support is a roadmap topic
Fig. 2: An example of a Mobile Cards card
SAP Mobile Development Kit
The resulting application models can be loaded into the Mobile Development Kit iOS application, where a native UI is rendered based on the application definition. Device-native features, such as contacts, and sensors, can be leveraged by means of platform-independent APIs that are exposed via the client application. In addition, the client implements the established Mobile Services features, such as Push and Offline.
Please note that we just released the first version of the Mobile Development Kit, so stay tuned for more features and content to come!
*Cross-platform applications are a roadmap topic
Fig. 3: Mobile Development Kit development and technology
Web apps are inherently cross-platform due to browsers being available on all major platforms, and they are very easy to build and distribute. Frameworks such as SAP UI5 even make them responsive, so that it is possible to target both desktop and mobile devices with the same app. A great example of this style of application is what we provide with our Fiori applications, which you can also build on top of the tools that are integrated with the Web IDE. While the browser largely isolates web apps from the underlying platform in a way that they can barely leverage native features, such as native Push, Mobile Services can act as a secure proxy for your internally available apps. This way you can expose web apps from your intranet to eligible employees on the internet, without putting your data at risk.
Fig. 4: High-level web app architecture. Please note that the “Mobile Web App” is only hosted on the Cloud Platform, but actually runs on the device.
In contrast to web apps, that are built to run in browsers and will, therefore, run on any platform, native applications are built to run on one specific mobile platform. While this typically makes development for multiple platforms more costly than going for web apps, native apps offer best performance and platform integration. If you need to secure your data with biometric features, access device sensors or need a blazing fast user interface, native apps are your best friend.
In order to integrate with Mobile Services capabilities such as Push and Offline, we provide the SAP Mobile Platform SDK 3.0, which is available for Android, iOS and Windows. It comes with a number of reuse components for common tasks such as authentication, enables you to transparently take your OData data sources offline, and provides a number of utilities that makes it easier to integrate with Mobile Services overall.
Furthermore, with the SAP Cloud Platform SDK for iOS, we released a modernized Swift SDK earlier this year which we developed in cooperation with Apple. It implements the same server-side features as the Mobile Platform SDK for iOS but offers additional extension concepts that enable you to build customizable standard apps. In addition, we put a lot of effort in the tooling around the Cloud Platform SDK, which includes proxy class and sample code generation based on your Mobile Services application configuration. With this SDK, we also released the SAP Fiori for iOS Design Guidelines, and implemented native UI components to enable you to easily implement native Fiori-style apps on iOS.
Fig. 5: An example of a screen implementing the SAP Fiori for iOS Design Language.
Fig. 6: High-level Cordova app architecture
Now, speaking of SAP Fiori, there is a number of additional consumption options at your disposal. First, however, I would like to introduce the notion of “packaged” and “online hybrid applications”. Cordova lets you specify from where the application should be loaded that is displayed in the container. Typically, the assumption is that your app is packaged into the Cordova container, which means that all of the application code and assets are physically on the device. However, it is also possible to specify a remote URL pointing, e.g., to a Fiori Front-end Server, from which the WebView will load the application itself. There are some implications to those approaches:
Online hybrid apps allow you to open applications from both a browser and a Cordova application. While this makes distribution very easy, it does mean that the app should be context-aware. Otherwise, the app would break if it tries to access Cordova APIs that are unavailable in standard browsers. However, it is not possible to take these applications offline, because all your users are going to see when there is a network outage, is a blank screen.
Fig. 7: Online hybrid applications, using the example of SAP Fiori Client (see below). Note how the web app is hosted on the Cloud Platform, while the hybrid container is installed on the device.
Packaged hybrid apps, on the other hand, can easily be offline enabled. For one thing, all of the application code is on the device, which means that it can handle network failures, such as users experience under bad network conditions. Secondly, the Kapsel SDK allows to take OData-based data sources offline, which can then be accessed by the application even when there is a network outage. This would not work with online hybrid apps since even though the required data is on the device, the application itself needs to be downloaded online from servers.
Fig. 8: High-level packaged hybrid application architecture. Note how the application is physically located on the device, and only data flows between the device and the Cloud Platform.
Lifecycle-wise, both types of hybrid apps are similar in that the Cordova container needs to be deployed to an app store at least once. Online hybrid apps can then easily be updated by deploying a new web app version to the origin web server. Packaged apps, however, need to be deployed via the app store again. Alternatively, there is the Mobile Services AppUpdate feature that allows you to update the packaged application contents via our cloud platform, which alleviates one of the most common issues with packaged applications.
SAP Fiori Client
The SAP Fiori Client is a freely available standard application that enables you to run web apps as online hybrid apps. As opposed to typical Cordova applications, where the origin of the web app to display is hard-coded, the Fiori Client lets you specify an endpoint URL of the application to display. As described above, that will enable any app opened in the Fiori Client to access device-native features. Since the Fiori Client comes with the most commonly used Kapsel and Cordova plugins, it is a potential way to improve the user experience of your web apps and integrate with Mobile Services without needing to implement your own Cordova container. Due to its optimized caching mechanisms, applications feel more stable and faster since UI components are reloaded less often during user interaction. In addition, combining the Fiori Client with Mobile Services enables your users to securely access applications from the intranet without resorting to VPN. The additional monitoring capabilities also make it easier to maintain control over the data and applications leaving your premises. If you require additional features or want to customize the appearance, there is a Custom Fiori Client template at your disposal in the Mobile Platform SDK.
Fig. 9: A Fiori Launchpad opened in the Fiori Client.
What to choose?
With that amount of development options at your disposal, picking the right tool for the job at hand becomes somewhat tricky. Alas, there is no silver bullet, and it depends very much on the use case which option will yield the best results. Therefore I would like to give a couple of guiding questions that will help you decide which approach to pick. I also provide a summary by means of a table below.
Are you targeting several platforms or only a single one?
Native development is fine for single-platform deployments but becomes costly when multiple platforms are targeted. In those scenarios, any of the other approaches may be preferable.
Is a native look-and-feel important to your users or is a web interface sufficient?
Native applications, Mobile Cards and Mobile Development Kit work best for offering your users what is considered a “native” UI experience. Many users consider web-based UIs alien when compared to the average app, and therefore it may not be the best option. However, web-based UIs are cheaper to develop, so when your users are fine with them, hybrid apps or web apps may be the way to go.
Are offline availability and stability a strict requirement or will online-only do?
This is one of the most underrated questions, since Mobile really is about accessing your data anywhere, under unpredictable network conditions. Failing to meet users’ expectations regarding the availability of your application even under poor network conditions puts adoption at risk. However, offline-enabling your data requires additional planning, e.g. around dealing with process-related issues such as concurrent modification in CRUD scenarios. Therefore validating the requirement is an important step, since for occasional use online-only access may be sufficient.
If Offline is required, Mobile Cards is your best bet since it offline-enables your data out of the box. Mobile Development Kit, native and packaged hybrid apps can also be offline-enabled by means of the Offline OData support in our SDKs, while giving a higher degree of freedom than Mobile Cards. On the other hand, online hybrid apps and web apps, especially when used in conjunction with Fiori Client, can provide a satisfactory online experience when offline enablement is not required.
Is the app business-critical or only occasionally used?
Business-critical apps have very high requirements concerning availability, performance, and stability of an application, whereas occasionally used apps (or “productivity apps”) do not require the same amount of meticulousness. As an example, there is little business impact if a purchase order approval app cannot be used without an active network connection. On the other hand, a failing service technician app can cost you several man-days worth of working time. Depending on the criticality of the use case, it may make sense to invest in a fully offline-enabled, blazing fast native application rather than in a cheap but unreliable web app. For anything in between these extremes, Mobile Cards and Mobile Development Kit provide you with tools to quickly mobilize data and to develop stable and fast applications.
Is a super fast user interface required or are your users okay with slight delays?
Another aspect to consider is the responsiveness of the user interface. Let’s face it, there is nothing faster than a native application, and if your users’ activities are centered around an unresponsive web app, they sure are not going to be happy. If you require response times of just a few milliseconds, consider Mobile Cards, Mobile Development Kit or native applications. You should also keep offline enablement in mind. If those aspects are not an issue, a hybrid or web app may suffice.
Is freestyle development required or will a framework address your needs?
To what degree do device-native capabilities matter?
As was pointed out in the discussion of web apps vs. native apps above, it is nigh impossible to have a web app leverage the native features mobile devices have to offer. To some extent, web standards are catching up so that it is possible to interface with the location service and even the camera. The majority of features, however, are only accessible by means of hybrid and native applications, and native apps clearly have an edge when it comes to very specific capabilities that are not commonly available across platforms. Mobile Cards gives you little flexibility but does implement some basic features such as Push and Sharing. Mobile Development Kit and Fiori Client apps can interface with whatever capabilities are exposed in the container application, and additional features can be included in custom clients.
Is time to market a driving factor?
Typically the decision is not purely user-driven, but business factors come into play at some point. Time to market is one such factor that is especially important in Mobile scenarios since the Mobile ecosystem is rather fast-paced when compared to other development areas. In order to minimize time to market, Mobile Cards and Mobile Development Kit are clearly the tools of choice, followed by web apps, hybrid apps and, finally, native apps.
Fig. 10: Comparison of the various options with respect to some select qualities. The range goes from — (least suitable) over o (neutral) to ++ (most suitable). Fiori Client and Online Hybrid Apps have been collapsed into one category. Fiori Client and Packaged Apps may increase network-related UI performance, but can not increase the execution speed of the UI as such.
1Roadmap item, currently only iOS is supported
2Fiori apps run in Fiori Client may show higher UI responsiveness than in browsers due to optimized caching
3Packaged Fiori apps may have better perceived stability due to locally stored UIs
4Time-to-market heavily reduced by tooling (SDK Assistant)