• Save
SAP Mobile Business Objects Development
 

SAP Mobile Business Objects Development

on

  • 2,981 views

 

Statistics

Views

Total Views
2,981
Views on SlideShare
2,981
Embed Views
0

Actions

Likes
3
Downloads
24
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

SAP Mobile Business Objects Development SAP Mobile Business Objects Development Presentation Transcript

  • MBO DevelopmentA Branded Service Delivered by Customer Solution AdoptionJune, 2012
  • ObjectivesAfter completing this course, you should be able to:Understand how to use the Sybase Unwired WorkspaceUnderstand the SUP development paradigmUnderstand MBO mobility propertiesUnderstand shared-read MBOsUnderstand guidelines for data loadingUnderstand how to include attachments in you MBO modelBuild an MBO package©  2012 SAP AG. All rights reserved. 2
  • Sybase SAP Mobility Platform Apps (native, container, player) Reusable libraries Sybase development tools and lifecycle SDK* on MBO** SDK on OData+ Afaria MBO OData Sybase Unwired Platform 2.x Onboarding, monitoring Other connector Data consolidation Notifications and OData lifecycle, and technologies and distribution subscriptions connector administration Web service BAPI OData JDBC Wrapper Rest (Suite) OData/SAP: data provider (such as SAP NetWeaver Gateway) Third-party services Back ends running SAP software SAP Business Suite SAP Business ByDesign SAP BusinessObjects solutions *Software development kit ** Mobile business object +Open Data ProtocolThis presentation and SAP‘s strategy and possible future developments are subject to change and may be changed by SAP at any time for any reason without notice. This document is provided without a warranty of any kind, either express or implied, includingbut not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement ©  2012 SAP AG. All rights reserved. 3
  • Covered in this Session Apps (native, container, player) Reusable libraries Sybase development tools and lifecycle SDK* on MBO** SDK on OData+ Afaria MBO OData Sybase Unwired Platform 2.x Onboarding, monitoring Other connector Data consolidation Notifications and OData lifecycle, and technologies and distribution subscriptions connector administration Web service BAPI OData JDBC Wrapper Rest (Suite) OData/SAP: data provider (such as SAP NetWeaver Gateway) Third-party services Back ends running SAP software SAP Business Suite SAP Business ByDesign SAP BusinessObjects solutions *Software development kit ** Mobile business object +Open Data ProtocolThis presentation and SAP‘s strategy and possible future developments are subject to change and may be changed by SAP at any time for any reason without notice. This document is provided without a warranty of any kind, either express or implied, includingbut not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement ©  2012 SAP AG. All rights reserved. 4
  • Application Development•  Using Eclipse tooling and the MBO model, a developer creates a package containing one or more MBOs that can be deployed into the server runtime environment. Each package is assigned a version that is associated with the specific runtime artifacts generated by the deployment architecture.•  Once a mobile package is available, the developer can generate device-side artifacts that form the basis of mobile application interactions with SUP services and data•  Developer creates the application, using Xcode, Eclipse, Visual Studio or other design tools for a native application. For a Hybrid Application the Form Designer is used to develop jQuery based UI or a third party tool is used to bring in an HTML based design©  2012 SAP AG. All rights reserved. 5
  • SUP MBO-based Apps DevelopmentThe behavior of the MBO, and the development practices are different foreach API.•  Native Object API: MBO configures server for synchronization, client DB & objects, and generates query methods in Native Object API•  HTML5/JS Container API: MBO configures server mappings, creates HTML5 storage key-value structure, and generates request methods in JavaScript API SUP Development Task Flow 3 4 Generate Develop Native Native Object 1 2 Application 5 6 Develop Deploy Mobile Code Deploy and Deploy and Mobile Business Test in Test on Business Objects to Generate Simulator Device Objects Unwired Server Develop HTML5/ Hybrid JavaScript Application Code ©  2012 SAP AG. All rights reserved. 6
  • Native Object API MBOThe synchronization architecture is based on aCache DB that resides on the SUP Server, andreplicates and/or messages updates to the ClientDB SUP Client DB Server Synchronization Data Source Cache DB Client DB Cache Refresh Client DB©  2012 SAP AG. All rights reserved. 7
  • Native Object API MBO: OperationsOperations are staged from EIS to Cache, Cache to Client, and vice versa Enterprise Operation Replay: operations Invoke the corresponding executed in Client DB are System SUP mapped EIS Operations replayed on Cache DB Server Operations Fill Filter Client DB Load Operations (with Cache à Device Data parameters) to retrieve Operations are filtered by Repository data from EIS Cache Synchronization Parameters DB©  2012 SAP AG. All rights reserved. 8
  • Native Object API MBO: Data SchemaThe MBO maps EIS columns as attributes of an ObjectWhen the client code files are generated, they include the Class fileswith the attributes and types; the Client DB creates tables for theObjects at runtimeWhen the MBO is deployed to the SUP Server, the Cache DBcreates tables for the Objects, and a table for maintaining synch-parameter partitions Enterprise System Data Repository Client Cache DB Operations DB©  2012 SAP AG. All rights reserved. 9
  • Native Object API MBOThe MBO provides configuration for all aspects of the mobile architecture Client DB schema Object Class files Cache content Query & Operation (data filtering) methods Data Cache DB ClientSource Operations DB Cache Refresh SUP Server frequency Synchronization Parameters Synchronization Cache frequency DB©  2012 SAP AG. All rights reserved. 10
  • Demo: Creating an MBO-  Database MBO (Quick Create)-  Web Service MBO-  SAP MBO ©  2012 SAP AG. All rights reserved. 11
  • Native Object API MBOMBO Properties include:•  Attributes •  Data Source, Type, Connection Settings•  Operations •  Bind to Existing Operations, or Add New•  Relationships •  Mappings, Complex Types•  Object Queries •  Query methods generated in Object Classes•  Synchronization Settings •  Rules, Partitions ©  2012 SAP AG. All rights reserved. 12
  • Native Object API MBOMobility Properties include:•  Data Source •  Stored as a Connection Profile•  Parameters •  Name, Type, Nullability, Required •  Mapping: Variable (Personalization Key) mapping, rules for updating on device, old-value rules•  Roles •  Rules for Logical and Physical roles•  Cache Update Policy •  On Demand, Scheduled, DCN•  Synchronization Settings ©  2012 SAP AG. All rights reserved. 13
  • MBO Mobility PropertiesSynchronizationLoad ArgumentsCache GroupsOperation Cache PolicyObject Queries©  2012 SAP AG. All rights reserved. 14
  • SynchronizationRestricts amount of rows transferred from Unwired Server CDB to the deviceFilter results that have large amount of data that does not change frequentlyPersonalization keysEnables users to store their search preferences on the client, the server, or bysessionDoes not affect EIS interaction with the CDB©  2012 SAP AG. All rights reserved. 15
  • Synchronization©  2012 SAP AG. All rights reserved. 16
  • Example: Synchronization Parameter Definition: SELECT * FROM Customer Data Source Type: SampleDB (SQL Anywhere) database Fill: Data is retrieved by executing the Load Operation (SELECT …) Customer ID   Name   Address   City   State   1   Intel   1 Intel Drive   Santa Clara   CA  Cache DB 2   Cisco   1 Cisco Way   San Jose   CA   3   Ultra   1 Ultra Lane   Santa Clara   CA   4   AMD   1 AMD Ave   Santa Clara   CA   5   Oracle   1 Oracle Lane   Redwood Shores   CA   6   Qualcomm   1 Qualcomm Way   San Diego   CA   7   JPMorgan 270 Park Ave   New York   NY   Chase   Filter: This MBO has one synchronization parameter [city] Mobile application sets the synchronization parameter prior to performing synchronization to ‘Santa Clara’ Customer ID   Name   Address   City   State  Client DB 1   Intel   1 Intel Drive   Santa Clara   CA   3 Ultra 1 Ultra Lane Santa Clara CA 4   AMD   1 AMD Ave   Santa Clara   CA   ©  2012 SAP AG. All rights reserved. 17
  • Synchronization Data Flow1.  User initiates a synchronization request that includes an attribute value2.  Unwired Server filters the data in the CDBIf attribute is country and user supplied “USA” asthe value, rows that contain “USA are returned3.  Unwired Server synchronizes the device with the results ©  2012 SAP AG. All rights reserved. 18
  • Load ArgumentsControl the amount of data refreshed between the EIS and CDBCreates its own partition in the CDB based on load argument value (partitionkey)Can be paired with synchronization parametersUser will supply values for the argument(s)©  2012 SAP AG. All rights reserved. 19
  • Load Arguments©  2012 SAP AG. All rights reserved. 20
  • Example: Load and Synchronization Parameters Definition: SELECT * FROM Customer WHERE State = ? Data Source Type: SampleDB database Fill: Data is retrieved by executing the Load Operation with the load parameter set to ‘CA’ Customer ID   Name   Address   City   State   1   Intel   1 Intel Drive   Santa Clara   CA  Cache DB 2   Cisco   1 Cisco Way   San Jose   CA   3   Ultra   1 Ultra Lane   Santa Clara   CA   4   AMD   1 AMD Ave   Santa Clara   CA   5   Oracle   1 Oracle Lane   Redwood Shores   CA   6   Qualcomm   1 Qualcomm Way   San Diego   CA   Filter: This MBO has one synchronization parameter [city] Mobile application sets the synchronization parameter prior to performing synchronization to ‘Santa Clara’Client DB Customer ID   Name   Address   City   State   1   Intel   1 Intel Drive   Santa Clara   CA   3 Ultra 1 Ultra Lane Santa Clara CA 4   AMD   1 AMD Ave   Santa Clara   CA   ©  2012 SAP AG. All rights reserved. 21
  • Load Argument Data Flow1.  User initiates a synchronization request and includes an argument value2.  If personalization keys are used, Unwired server passes the query to the EIS3.  EIS refreshes Unwired Server based on the argument value4.  Unwired Server creates a partition with the results in the CDB for the validated user or updates the partition5.  Unwired Server synchronizes the device with the data in the CD partition for that user ©  2012 SAP AG. All rights reserved. 22
  • Cache GroupsSpecifies the data refresh behavior for every MBO within the groupAn MBO can belong to only one cache groupCache PolicyOn demandScheduledDCNOnline©  2012 SAP AG. All rights reserved. 23
  • Cache Groups©  2012 SAP AG. All rights reserved. 24
  • Cache Group Data FlowThe deployed MBO package triggers a cacheupdate depending on the cache group towhich it belongsCDB is updated based on the cache groupsettings©  2012 SAP AG. All rights reserved. 25
  • Operation Cache PolicyDetermines how the CDB is updated after an operationApply results to the cacheInvalidate the cache (refresh all data)No effectŸ  If a cache policy is not selected, the operation results are not applied to the cache©  2012 SAP AG. All rights reserved. 26
  • Operation Cache Policy©  2012 SAP AG. All rights reserved. 27
  • Operation Cache Policy Data Flow1.  The Device application initiates a create, update, or delete operation2.  Unwired Server passes the operation to the EIS where the operation is executed3.  The CDB is updated based on the cache policy. A subsequent synchronization reflects the changed CDB ©  2012 SAP AG. All rights reserved. 28
  • Object QueriesSQL statements associated with an MBO against the persistent store on thedeviceReturns a subset of a result setAutomatically generated for each MBO attribute identified as a primary keyIf multiple primary keys exists, an additional composite object query is generated©  2012 SAP AG. All rights reserved. 29
  • Object Queries©  2012 SAP AG. All rights reserved. 30
  • Local Business ObjectA client only objectDefined in the Unwired WorkspaceNot bound to EIS data sourcesCannot be synchronizedUsed as a local data store on the device©  2012 SAP AG. All rights reserved. 31
  • Shared-Read MBOsOptimization feature that loads multiple MBOs with a single read operationBetter performanceNo shared write or composite write operation©  2012 SAP AG. All rights reserved. 32
  • MBO and AttachmentsInline attachments are expensiveDo not embed inline with the MBO as an attributeAttachments typically do not changeŸ  Uploading and downloading a large attachment can be significantUpload of attachments is slower than downloadsŸ  Not advisable to upload attachmentsObject instantiation and resource consumption is also costlySUP uses BigString and BigBinaryŸ  Not loaded when the object containing them is instantiatedŸ  Include a special API to access only the segment the application is interested in©  2012 SAP AG. All rights reserved. 33
  • MBO and AttachmentsConsider the attachment as an MBOUse a separate MBO to hold the attachmentŸ  Provides flexibility using synchronization parameters and synchronization groupsŸ  Allows the application to subscribe to the attachment when required via a synchronization parameterBulk download all attachments during an initial synchronization in a highquality connected environmentAttachments typically do not changeCost of this approach is more complex an longer application roll-out cycle©  2012 SAP AG. All rights reserved. 34
  • Result CheckerA result checker is a custom Java class that implementserror checking for Mobile Business Objects (MBOs).Not all MBO operations use a "standard" error reportingtechnique; you may want to implement your own customresult checker. Doing so allows you to check any field for errors Implement logic that determines what constitutes an error Logic that determines the severity of the errorThe error code and message can be influenced in the resultchecker by throwing a DSException ©  2012 SAP AG. All rights reserved. 35
  • Result CheckerA custom result checker can throw errors for both ascheduled cache refresh as well as an on demand cacherefresh For a scheduled refresh Ÿ  log message to the Unwired Server log. Ÿ  transaction for the entire cache group is rolled back Ÿ  The device client user is not notified of these errors; no client log records are generated On demand refresh Ÿ  No error to the server log, but the log message is written to the Unwired Server Services handle the exception Ÿ  The transaction for the cache group is rolled back Ÿ  A client log record is generated, which is visible to the client application after synchronization©  2012 SAP AG. All rights reserved. 36
  • Result Checker - ExampleMBO representing the price of a sales order item, based ona WebService callWebService works fine, no technical errorsDue to some internal calculation and bad backend data, itoccurred that a price of 0 or less was returnedCustom Result Checker to determine the price is actuallycalculated correctly price below 0 means error ©  2012 SAP AG. All rights reserved. 37
  • Demo: MBO DeploymentFollow along as an MBO Package is deployed to the server.•  Unwired Workspace allows for development of MBOs at design time•  In order to actually consume MBOs, the model needs to be deployed to server (recall split of runtime and design time) ©  2012 SAP AG. All rights reserved. 38
  • Lab 2: Create Mobile BusinessObjects
  • © 2012 SAP AG. All rights reserved.No part of this publication may be reproduced or transmitted in any form or for any purpose Google App Engine, Google Apps, Google Checkout, Google Data API, Google Maps,without the express permission of SAP AG. The information contained herein may be Google Mobile Ads, Google Mobile Updater, Google Mobile, Google Store, Google Sync,changed without prior notice. Google Updater, Google Voice, Google Mail, Gmail, YouTube, Dalvik and Android are trademarks or registered trademarks of Google Inc.Some software products marketed by SAP AG and its distributors contain proprietarysoftware components of other software vendors. INTERMEC is a registered trademark of Intermec Technologies Corporation.Microsoft, Windows, Excel, Outlook, PowerPoint, Silverlight, and Visual Studio are registered Wi-Fi is a registered trademark of Wi-Fi Alliance.trademarks of Microsoft Corporation. Bluetooth is a registered trademark of Bluetooth SIG Inc.IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x,System z, System z10, z10, z/VM, z/OS, OS/390, zEnterprise, PowerVM, Power Motorola is a registered trademark of Motorola Trademark Holdings LLC.Architecture, Power Systems, POWER7, POWER6+, POWER6, POWER, PowerHA, Computop is a registered trademark of Computop Wirtschaftsinformatik GmbH.pureScale, PowerPC, BladeCenter, System Storage, Storwize, XIV, GPFS, HACMP,RETAIN, DB2 Connect, RACF, Redbooks, OS/2, AIX, Intelligent Miner, WebSphere, Tivoli, SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer,Informix, and Smarter Planet are trademarks or registered trademarks of IBM Corporation. StreamWork, SAP HANA, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany andLinux is the registered trademark of Linus Torvalds in the United States and other countries. other countries.Adobe, the Adobe logo, Acrobat, PostScript, and Reader are trademarks or registered Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystaltrademarks of Adobe Systems Incorporated in the United States and other countries. Decisions, Web Intelligence, Xcelsius, and other Business Objects products and servicesOracle and Java are registered trademarks of Oracle and its affiliates. mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company.UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other SybaseCitrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin products and services mentioned herein as well as their respective logos are trademarks orare trademarks or registered trademarks of Citrix Systems Inc. registered trademarks of Sybase Inc. Sybase is an SAP company.HTML, XML, XHTML, and W3C are trademarks or registered trademarks of W3C®, Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are registered trademarks ofWorld Wide Web Consortium, Massachusetts Institute of Technology. Crossgate AG in Germany and other countries. Crossgate is an SAP company.Apple, App Store, iBooks, iPad, iPhone, iPhoto, iPod, iTunes, Multi-Touch, Objective-C, All other product and service names mentioned are the trademarks of their respectiveRetina, Safari, Siri, and Xcode are trademarks or registered trademarks of Apple Inc. companies. Data contained in this document serves informational purposes only. National product specifications may vary.IOS is a registered trademark of Cisco Systems Inc. The information in this document is proprietary to SAP. No part of this document may beRIM, BlackBerry, BBM, BlackBerry Curve, BlackBerry Bold, BlackBerry Pearl, BlackBerry reproduced, copied, or transmitted in any form or for any purpose without the express priorTorch, BlackBerry Storm, BlackBerry Storm2, BlackBerry PlayBook, and BlackBerry App written permission of SAP AG.World are trademarks or registered trademarks of Research in Motion Limited. ©  2012 SAP AG. All rights reserved. 40