Hello and welcome. My name is Christopher Manciero and I will be giving a presentation on Building HANA mobile products with the Sybase Unwired Platform.
The sessions in the Analytics track are organized into four topic areas at DKOM. They are: BIEIMEPMAnd GRCEach of these topic areas are focused on native SAP HANA integration and support.This session today will cover … [choose one: BI, EIM, EPM, GRC]
Today I am going to Educate you on the Sybase Unwired Platform, get you Excited about using the Sybase Unwired Platform with HANA and then Empower you with the tools needed to create successful Sybase Unwired Platformapplications.
What is SUP – Well as the name suggests the Sybase Unwired Platform is a platform and can be broken down into 4 categories.
Create – which enables developers to create enterprise grade applications including lightweight web-based applications or native custom applications using a single development platform
Connect – where you can exchange data from traditional backend systems including databases, web services and applications such as SAP to multiple mobile devices via graphical modeling of a Mobile Business Object. A Mobile Business Object will cache the data retrieved from the data source onto the Sybase Unwired Platform’s Cache Database which is intended to minimize the amount of traffic to the SAP backend. Another way to connect data to the Sybase Unwired Platform is by using OData. The Sybase Unwired Platform to SAP Gateway product works with OData.
Consume – which empowers enterprise workers to consume enterprise grade applications on either corporate or personal devices including BlackBerry, Windows Mobile, iOS and Android
Control – where you can ensure that your enterprise data is under control using secure transports for end-to-end encryption and enhanced application securityYou will probably hear about Afaria and you may be wondering what is the difference between Afaria and the Sybase Unwred Platform.Typically theSybase Unwired Platform and Afaria are used together. TheSybase Unwired Platform allows developers to create the applications and provides runtime connectivity. Afaria manages the distribution of the applications to devices.
With theSybase Unwired Platform there are 2 types of applications a developer can create. One type is called a Hybrid Web Container application.A Hybrid web container application consists of HTML5, JS and CSS and are typically designed for simple business logic solutions. Examples of hybrid web container applications are expense reporting, filling out time sheets and flash forecasting.There are 2 ways to develop a Hybrid Web Container application.The simplest way is using the Mobile SDK. Which provides the ability to drag and drop controls to create the UI.The other way to develop a Hybrid Web Container application is to hand code the HTML5, JS and CSS files. Based on forum discussions this is non-trivial.In either case a Hybrid Web Container application must use Mobile Business Objects to connect to a data source.The other application type is a Native applicationNative applications are designed more for an application that is looking for a rich UI and has complex business logic.A developer creates the application using the required IDE, Xcode for iOS, Eclipse for Android/BB or Visual Studio for Windows phone 7. The Sybase Unwired Platform provides functionality to generate native code that can be copied into your development landscape. The code generated assists the developers in connecting to theSybase Unwired Platform.A native application can connect to Mobile Business Objects and it can connect to the Sybase Unwired Platformusing the OData SDK.The OData SDK is a collection of libraries that handles the parsing, caching, persistence, connectivity and supportability in your application. Libraries are available for iOS, Android and BB.I will go into more detail about the OData SDK in a few moments.
When creating an application you need to decide what data type you will use.With the Mobile business object data type you have the ability to create a Hybrid Web Container application and a native application. For an application that uses Mobile Business objects, the mobile device makes a call to the Sybase Unwired Platform server where the Sybase Unwired Platform server checks authentication and then passes the request to the Cache Database inside theSybase Unwired Platform. The cache database stores the Mobile Business objects and their data, basically making a copy of the data from the backend and stores it here. If the cache is still good the data is sent back to the device, if not a call to the backend is made to get fresh data which is then stored in the cache database and then sent to the device. This is inconsistent with a thin middle-tier which is the intent of HANA based applications.Now with the OData data type you can only create a native application. Hybrid Web Container applications are expected to support OData by theSybase Unwired Platform version 2.5 (ETA is tentatively Q3)For an application that uses OData the mobile device makes a call to the Sybase Unwired Platform server where theSybase Unwired Platform checks authentication and then passes the request to the backend where the data is then sent back to the mobile device.OData is the protocol for mobile applications as per SAP’s strategy.
A challenge for the Sybase Unwired Platform and HANA to work together is that of Authentication.Here is the available authentication types between the Sybase Unwired Platform and HANA.You can see that the Sybase Unwired Platform offers X.509 certificate and SSO2 Token authentication. Where as HANA supports Kerberos and HANA authentication.
By using a thin Java tier with the Sybase Unwired Platform and HANA we can bridge the gap.The diagram shows the flow of the application.The mobile devices access the Online Data Proxy (which is a lightweight version of the Sybase Unwired Platform, I will explain more about the Online Data Proxy in a moment) which then accesses the Java stack. The Java stack makes a request to Kerberos to obtain a token. This token is then passed to HANA for validation. If the token authenticates then data is returned back to the user.With this littlesnippit of Java code we can setup Kerberos authentication between the Sybase Unwired Platform and HANA.This solution only works if you have control over the OData service.
So if you are still questioning “Why use the Sybase Unwired Platform?”The answer is because it standardizes access to your corporate data for all mobile developers and applications as well as being the mobile strategy for applications at SAP.
Ok time to get excited, enough of the learning let’s do some doing. Now I am going to create a Hybrid Web Container application that connects to a HANA database.
This application should take no longer than 5 minutes, but since I will be explaining what I am doing it will take a little bit longer. The sections in blue indicates the development path this demo will be taking.A little background on this demo. I have already configured my Sybase Unwired Platform server to communicate to my HANA system and I have registered a device for my Hybrid Web Container application to be deployed to.(Open up Mobile SDK and create an app OR show video)** Continue Here after demo **Depending on the application you are going to create, the sample I showed may be a solution for you. But for those developers who are adventures, yearning to create more complex solutions, even the developers that want to create a beautiful rich UI experience application there is another solution.
I present you with the Online Data Proxy. The Online Data Proxy is a light-weight version of theSybase Unwired Platform. With the Online Data Proxy you use theSybase Unwired Platform as a proxy to check authentication and communicate to your backend services using the OData SDK. The OData SDK provides static runtime libraries that can be used independently in your native application.Let me give you a brief overview of the OData SDK libraries.
OData Parser - Parses and generates valid OData Protocol messages to and from native objects.
Cache Management– Is responsible for storing and accessing OData related objects in the memory of the device for quick and easy access.
Persistence – Implements a convenient and secure storage of data on the device.
Supportability – Implements standard SAP logging, tracing and error handling to enable end-to-end supportability from client to back-end.
Connectivity - Handles all network related tasks, hides the complexity of the network communication, and provides an easy to use API to the applicationsI have some sample code that I can show after the presentation in a more 1 on 1 environment that demonstrates how the OData SDK can be used in an iOS application. If anyone is interested please feel free to talk to me after the presentation.Ok so moving on.
Ok so now I will show you some code samples in Objective C that use the OData SDK to retrieve data in HANA
The sections in blue indicates the development path this demo will be taking.
First thing we do in the application is check to see if the device is authorized to access the OData service using through the Sybase Unwired Platform.
After a successful authorization we start our process on accessing the OData service.This method uses Basic Authorization to access the OData services.
After successful authentication the metadata information for the OData service is requested.
After the metadata was successfully retrieve we now make a request to retrieve values to be displayed in our app. You can see in the highlight section I am adding an OData filter to only retrieve data that are equal to the device username.
Now that we have our data from the OData service we just need to display it on the screen.This function just loops through the results and adds them to an array that will be displayed on the screen.
Here is an example of the results.
In a nutshell the Sybase Unwired Platform allows you to create and manage enterprise grade mobile applications.It’s easy to use - If you know how to create applications for iOS, Android/Blackberry great, you just have to add the libraries to communicate to the Sybase Unwired Platform or you can build your applications using the Mobile SDK where you get drag and drop UI creativity.And last – You are not alone.The Sybase Unwired Platform is not a splash in the pan. It has a growing community of developers just like you that want to create beautiful enterprise grade mobile applications and are willing to help others as well as post their findings.So don’t be afraid to get dirty.
How to add QR Codes to your slides:Copy your QR code from the word doc and paste it in the grey box.Add your session name and your personal info.There is only one StreamWork Activity (QR Code) per session regardless of the number of presenters/locations.
Research On Hybrid Mobile Platforms for HANA Applications
Madhav Annamraju/EPM Planning
Building SAP HANA mobile products w/Sybase