Hybrid Web Container Enhancements in SUP 2.1.3 David Fish Engineering Evangelist, Sybase Unwired Platform
Jan 13, 2015
Hybrid Web Container Enhancements in SUP 2.1.3
David FishEngineering Evangelist, Sybase Unwired Platform
© 2012 SAP AG. All rights reserved. 2
Agenda
•Hybrid Web Container (HWC) Overview
•PhoneGap Integration with the Hybrid Web Container
•Customization Support for Android and iOS Hybrid Web Container
•How to use the Mobile Analytics Kit (MAKit) libraries in an HWC application to create drill-down capabilities, semantic zooming, and dynamic analytic charts
© 2012 SAP AG. All rights reserved. 3
Hybrid Web Container (HWC) Overview
•HTML5/JS Hybrid Apps support simple business processes, such as approvals and requests, and also use mobile business objects (MBOs) to facilitate connection with a variety of enterprise systems
•A hybrid web container is developed and deployed to a device, then one or more applications are deployed to the container
•This approach supports mobile application enablement, which enables mobile device users to operate as workflow participants, allowing the mobile user to start and respond to back-end enterprise requests within a generic framework
© 2012 SAP AG. All rights reserved. 4
Hybrid Web Container (HWC) Overview
•With Hybrid App development, the server-side of the application is metadata-driven and the client-side of the application is a fully generated Web application package
•The focus is on how data is rendered to the device user; data is made available using a request-response pattern, without synchronization
• Lightweight applications and mobile workflows are developed to provide business logic and interaction with MBOs
© 2012 SAP AG. All rights reserved. 5
Hybrid Web Container (HWC) Overview
•A native container application is packaged with a Web Browser plug-in and built-in core application services such as connectivity, guaranteed messaging, caching, and security
•The container is provisioned to mobile devices
•Data transport and access relies on messaging protocol between the server and the container on the device, invoking either online operations to the back end, or cached MBO data on the Unwired Server
© 2012 SAP AG. All rights reserved. 6
Hybrid Web Container (HWC) Overview
•The mobile workflow package is compiled —consisting of platform-independent HTML, JavaScript and CSS resources— and can be deployed automatically to the container, without writing any code
•Device and application services include offline cache, reliable messaging, and secure store
•The container is deployed to a device and provides the runtime from which request-response decision patterns are executed
© 2012 SAP AG. All rights reserved. 7
Hybrid Web Container (HWC) Architecture
PhoneGap Integration
© 2012 SAP AG. All rights reserved. 9
PhoneGap Integration with the HWC
•Integration with PhoneGap allows you to link your own custom native code to the Hybrid Web Container and call this native code from JavaScript, as well as access native device functionality using the PhoneGap framework
•Note: This feature is only applicable to Android and iOS applications in this release
© 2012 SAP AG. All rights reserved. 10
PhoneGap Integration with the HWC
•PhoneGap is an open source framework that leverages Web technologies such as HTML and JavaScript to access native (system and third-party) functionality across platforms
© 2012 SAP AG. All rights reserved. 11
PhoneGap Integration with the HWC
•Sybase Unwired Platform comes with PhoneGap 1.4.1 libraries, which handle common tasks supported by most devices, linked in and ready to use
•Integrating PhoneGap plug-ins with Hybrid Web Containers allows you to extend the set of APIs available within a Mobile Workflow application
•See www.phonegap.com for information about the supported PhoneGap APIs.
•You can use both Hybrid Web Container JavaScript APIs and PhoneGap APIs in a single HWC application
© 2012 SAP AG. All rights reserved. 12
PhoneGap Integration with the HWC
•Some examples of the PhoneGap APIs available in HWC Applications:
Accelerometer Camera
Capture Compass
Contacts Email
File Geolocation
© 2012 SAP AG. All rights reserved. 13
PhoneGap Integration with the HWC - Example
•The MAKit library allows you to save a chart, annotate it, and send it as an email attachment:
© 2012 SAP AG. All rights reserved. 14
PhoneGap Integration with the HWC - Example
•Add some JavaScript to invoke the PhoneGap plugin to send an email:
© 2012 SAP AG. All rights reserved. 15
PhoneGap Integration with the HWC - Example
•Customize the HWC Application in Xcode or Android to create a PhoneGap plugin:
© 2012 SAP AG. All rights reserved. 16
PhoneGap Integration with the HWC - Example
•Add the plugin to the PhoneGap.plist file and build the HWC application:
© 2012 SAP AG. All rights reserved. 17
PhoneGap Integration with the HWC - Example
•When the HWC application is run, the email icon is now visible:
© 2012 SAP AG. All rights reserved. 18
PhoneGap Integration with the HWC - Example
•When the email icon is selected the chart image is captured and can be annotated:
© 2012 SAP AG. All rights reserved. 19
PhoneGap Integration with the HWC - Example
•When the Send Email button is selected the chart is added as an attachment to an email:
Customization Support for the HWC
© 2012 SAP AG. All rights reserved. 21
Customization Support for Android and iOS Hybrid Web Container
•Template source code is provided for the Android and iOS Hybrid Web Container
•This allows you to build your own Hybrid Web Container and customize it in different ways
© 2012 SAP AG. All rights reserved. 22
Customization Support for Android and iOS Hybrid Web Container
The source code for iOS can be found in the following directory:
Copy this file to a Mac, uncompress it, and open Workflow.xcodeproj in Xcode
© 2012 SAP AG. All rights reserved. 23
Customization Support for Android and iOS Hybrid Web Container
The source code for Android can be found in the following directory:
Unzip and import the contents of template.zip into Eclipse (after you have installed the Android SDK)
© 2012 SAP AG. All rights reserved. 24
Customization Support for Android and iOS Hybrid Web Container
Examples of What can be customized:
• Default Connection Information
• The HWC’s Icon
• The HWC’s Name (e.g. from Workflow to Directory)
• The Splash Screen
• The Password Screen
© 2012 SAP AG. All rights reserved. 25
Customization Support for Android and iOS Hybrid Web Container
Other Customizations available:
• Have the HWC automatically launch a workflow application when it is opened
• Filter the list of Workflow application messages so only messages meeting certain criteria are shown
• Set HTTP headers for the Hybrid Web Container to include authentication tokens
• Use Multiple Hybrid Web Containers on the Same Device
(For More information see the Hybrid Web Container Customization Section in the Mobile Workflow Documentation)
Mobile Analytics Kit and the HWC
© 2012 SAP AG. All rights reserved. 27
How to use the MAKit libraries in an HWC application to create drill-down capabilities, semantic zooming, and dynamic analytic charts
The Mobile Analytics Kit (MAKit) component provides graphical controls with analytics capabilities for mobile devices
© 2012 SAP AG. All rights reserved. 28
How to use the MAKit libraries in an HWC application to create drill-down capabilities, semantic zooming, and dynamic analytic charts
Developers can use this component to develop mobile applications that offer sophisticated and compelling interfaces that let users easily view enterprise data
© 2012 SAP AG. All rights reserved. 29
How to use the MAKit libraries in an HWC application to create drill-down capabilities, semantic zooming, and dynamic analytic charts
The MAKit component is available for HTML5/JS hybrid apps
The MAKit includes a built-in, optimized, on-device analytics engine, which avoids frequent, time-consuming queries to remote servers
© 2012 SAP AG. All rights reserved. 30
How to use the MAKit libraries in an HWC application to create drill-down capabilities, semantic zooming, and dynamic analytic charts
The MAKit library contains controls that the developer can programmatically enable:
Data Range Selector
Toolbars
Dynamic Analysis
© 2012 SAP AG. All rights reserved. 31
How to use the MAKit libraries in an HWC application to create drill-down capabilities, semantic zooming, and dynamic analytic charts
What-If Analysis:
© 2012 SAP AG. All rights reserved. 32
How to use the MAKit libraries in an HWC application to create drill-down capabilities, semantic zooming, and dynamic analytic charts
The MAKit charts are defined in XML Meta Data:
© 2012 SAP AG. All rights reserved. 33
How to use the MAKit libraries in an HWC application to create drill-down capabilities, semantic zooming, and dynamic analytic charts
The data is retrieved from a data source and loaded into a DataTable:
© 2012 SAP AG. All rights reserved. 34
How to use the MAKit libraries in an HWC application to create drill-down capabilities, semantic zooming, and dynamic analytic charts
JavaScript is used to create and load the chart:
© 2012 SAP AG. All rights reserved. 35
How to use the MAKit libraries in an HWC application to create drill-down capabilities, semantic zooming, and dynamic analytic charts
The data visualization suite of charts currently includes 5 types - column, bar, pie, line and bubble. In addition to the five charts, MAKit also supports a table control
© 2012 SAP AG. All rights reserved. 36
How to use the MAKit libraries in an HWC application to create drill-down capabilities, semantic zooming, and dynamic analytic charts
Column Chart:
© 2012 SAP AG. All rights reserved. 37
How to use the MAKit libraries in an HWC application to create drill-down capabilities, semantic zooming, and dynamic analytic charts
Bar Chart:
© 2012 SAP AG. All rights reserved. 38
How to use the MAKit libraries in an HWC application to create drill-down capabilities, semantic zooming, and dynamic analytic charts
Pie Chart:
© 2012 SAP AG. All rights reserved. 39
How to use the MAKit libraries in an HWC application to create drill-down capabilities, semantic zooming, and dynamic analytic charts
Line Chart:
© 2012 SAP AG. All rights reserved. 40
How to use the MAKit libraries in an HWC application to create drill-down capabilities, semantic zooming, and dynamic analytic charts
Bubble Chart:
© 2012 SAP AG. All rights reserved. 41
How to use the MAKit libraries in an HWC application to create drill-down capabilities, semantic zooming, and dynamic analytic charts
Table Control:
RunBetter
© 2012 SAP AG. All rights reserved. 43
Resources
SUP Documentation:
http://infocenter.sybase.com/help/topic/com.sybase.infocenter.pubs.docset-SUP-2.1.3/doc/html/title.html
MAKit HTML5 HWC Code Examples and Tutorial:
http://scn.sap.com
PhoneGap and HWC Customization White Paper:
https://cw.sdn.sap.com/cw/docs/DOC-149428
SAP Rapid Deployment Solutions (RDS):
• In July, SAP will be releasing a rapid-deployment solution for mobile analytics visualization
http://www.sap.com/rds
© 2012 SAP AG. All rights reserved. 44
Highlights of RDS for mobile analytics visualization
Software
Implement Sybase Unwired Platform’s Mobile Analytics Kit Library
Content
SAP best practices and mobile app samples accelerate creation of mobile analytics applications end-to-end
Enablement
Step-by-Step guides speed up user adoption of mobile analytics application development methods and tools
Service
Fixed scope and price provides maximum predictability and lowers risk in the rapidly changing mobile world
Accelerate ROI of your Sybase Unwired Platform and leverage its new visualization capabilities with this RDS to
•Out-innovate your competitors with mobile analytics apps for all your staff
•Capitalize on your SAP Business Suite data for business insight anywhere
© 2012 SAP AG. All rights reserved. 46
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.
Java is a registered trademark of Sun Microsystems, Inc.
JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.
© 2011 SAP AG. All rights reserved
Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company.
Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase, Inc. Sybase is an SAP company.
All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, or transmitted in any form or for any purpose without the express prior written permission of SAP AG.
This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This document contains only intended strategies, developments, and functionalities of the SAP® product and is not intended to be binding upon SAP to any particular course of business, product strategy, and/or development. Please note that this document is subject to change and may be changed by SAP at any time without notice.
SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy or completeness of the information, text, graphics, links, or other items contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement.
SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. This limitation shall not apply in cases of intent or gross negligence.
The statutory liability for personal injury and defective products is not affected. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages.