sybase unwired platform 2.1.x development paradigm white paper

12
WHITE PAPER www.sybase.com Sybase ® Unwired Platform 2.1.x Development Paradigm

Upload: sworna-vidhya

Post on 23-Oct-2015

23 views

Category:

Documents


5 download

DESCRIPTION

sup

TRANSCRIPT

Page 1: Sybase Unwired Platform 2.1.x Development Paradigm White Paper

white paper

www.sybase.com

Sybase® Unwired Platform 2.1.xDevelopment Paradigm

Page 2: Sybase Unwired Platform 2.1.x Development Paradigm White Paper

Table of ConTenTs 1 Sybase® Unwired Platform 2 Mobile Application Development 3 Mobile Business Object (MBO) Development 5 Mobile Business Object Development in Eclipse 5 Device Application Development 6 Hybrid Web Container–Based Development (Mobile Workflows) 7 Sap Workflow Mobilized Using Sybase Unwired Platform 8 Native Application Development 9 Summary

Page 3: Sybase Unwired Platform 2.1.x Development Paradigm White Paper

1

sybase® Unwired PlaTform Sybase Unwired Platform is a flexible, open infrastructure that helps companies create, secure, and manage mobile

applications that connect back-end datasources to mobile devices (see Figure 1). This mobile enterprise application platform enables you to respond strategically as your device type and datasource needs evolve, whether because of corporate acquisitions, or system or technology upgrades.

The main components of the Sybase Unwired Platform are:• Sybase Unwired WorkSpace, which provides a graphical environment for developing the data aspects of mobile

applications using mobile business objects• Mobile Workflow Forms Designer, which enables architects to mobilize workflows and business processes and

create hybrid apps quickly using Hybrid Web Container technology• Sybase Control Center®, which allows administrators to administer, manage, and monitor Sybase

Unwired Platform• Sybase Unwired Server, the middleware component, which provides the runtime infrastructure

The key technical features of the Sybase Unwired Platform include:• Heterogeneous native device development: iPhone®/iPad®, Windows Mobile, Windows 32 laptops/tablets,

BlackBerry®• HTML/CSS/JS-based development for hybrid applications: iPhone/iPad, Windows Mobile, BlackBerry, Android• Access toSAP NetWeaver Gateway content using standards-based OData• 4GL rapid application development (RAD) tooling and datasource integration• Out-of-the-box integration with enterprise applications (such as SAP® or databases) and a full Web services stack• Ability to mobilize multiple applications and business processes• Integrated device management and security

Platform Management

ControlDevice and server management and security

ConsumeHeterogeneous mobile devices

ConnectHeterogeneous

data sources

Create

Databases

Web Services

SoftwareApplications

Sybase Mobile SDK

MobileBusiness Objects

Data OrchestrationEngine (DOE)

HTML5/JS Hybrid App

Unwired Platform Runtime

Online Data Proxy

SynchronizationServices

figure 1.

Page 4: Sybase Unwired Platform 2.1.x Development Paradigm White Paper

2

Unwired Platform enables mobile application development by providing a feature-rich Mobile SDK (Software Developer Kit) targeting various applications types and platforms. The key architectures supported by the Mobile SDK are:

• Native Object API — This architecture caters to the traditional high-data volume, offline-capable, business-critical applications by providing a native programming model for building mobile applications

• Hybrid Web — This part of the Mobile SDK caters to business process/workflow mobilization applications that are low volume, and multidevice capable by enabling development in HTML,CSS and JS, thereby reducing mutliplatform development costs. These kinds of applications are typically push- driven for approval-like scenarios but also may also include approval-like scenarios but also include request/response patterns

• OData — This architecture type enables access to rich content from the SAP NetWeaver Gateway. This part of the Mobile SDK enables a native programming paradigm by providing native API in various languages like Objective C, and Java for building feature-rich online applications using the OData protocol

mobile aPPliCaTion develoPmenT The primary considerations you must address when developing mobile applications are data and its associated

synchronization, the device-resident presentation, and business logic. Sybase Unwired Platform provides the tools developers need to focus on each of these requirements. At the root of the Sybase Unwired Platform development paradigm is the separation between the:

• Data tier and its link with the enterprise information system (EIS), and the• User interface and business logic of the application

Sybase Unwired Platform provides tools that enable mobile application development in both these domains (see Figure 2). To address the data aspects of the mobile application, Sybase Unwired Platform supports mobile business objects (MBOs) and OData. MBO development refers to defining object data models with back-end EIS connections, attributes, operations, and relationships that allow filtered data sets to be synchronized to the device. This aspect of Sybase Unwired Platform development is supported within Sybase Unwired WorkSpace in Eclipse. In OData, the data modeling is performed using SAP NetWeaver Gateway, and then made available to the mobile application developer through the SDK.

Sybase Unwired Platform supports the development tasks associated with the user interface and logic in two paradigms. It enables developers to:

• Build native applications using programming languages native to a mobile operating system (or build the application in an integrated development environment, or IDE, using the generated API)

• Build lightweight Mobile Workflow applications using a Hybrid Web Container-driven approach, in which HTML/ CSS/JS drives the application interface and logic.

This paper will help you understand how to develop mobile applications with Sybase Unwired Platform using each of these approaches.

2

Page 5: Sybase Unwired Platform 2.1.x Development Paradigm White Paper

3

figure 2.

mobile bUsiness objeCT (mbo) develoPmenT

MBOs encapsulate business process logic and data into a reusable unit (see Figure 3). Sybase Unwired Platform includes the Eclipse development environment, which contains tools designed for MBO development and deployment. These Eclipse tools support online and offline access to data mobilization, applications, services, and processes.

figure 3.

Subset Personalize Mobilize

Enterprise System Device Representation

Develop Mobile

Business Objects

Deploy MobileBusiness

Objects to Unwired Server

GenerateDevice

Object Code

Sybase Unwired Platform Development Task Flow

Sybase Unwired Platform Development Tools

DevelopDevice

Application

Deploy and Test on

Emulator

Deploy and Test on Device

Unwired WorkSpace Workflow Development Tool (Eclipse)

Native Device Application Development Tools

BlackBerry – Eclipse JDE Plug-in

Windows – Visual Studio

Windows Mobile – Visual Studio

iOS – Xcode

iOSAndroid BlackBerryWindows Mobile

Unwired WorkSpace MobileBusiness Object Development Tool (Eclipse)

BlackBerryJava

iOSObjective C

WindowsC#

Windows MobileC#

Page 6: Sybase Unwired Platform 2.1.x Development Paradigm White Paper

4

The development approach to back-end mobile data models can be either ”top-down” or ”bottom-up.” In the top- down approach, developers use the Mobile Application Diagram and palette to launch a set of wizards that create MBOs with operations and attributes the client wants to have, eventually binding the MBOs to the datasource. In the bottom-up approach, developers drag and drop a datasource to create the MBO directly from the datasource with immediate binding. Developers either define MBO attributes and operations without immediately binding them to a datasource, or define them from and bind them to a datasource. Both methods use similar steps:

1. Connect to back-end datasources2. Connect to Sybase Unwired Server3. Create mobile application projects4. Create MBO attributes and “create, update, and delete” (CUD) operations5. Attach MBOs to back-end datasources6. Edit, rename, delete, move, copy, group, and view MBOs7. Perform additional MBO design activities—create logical roles, search, and so on8. Deploy MBOs to Sybase Unwired Server

figure 4.

There are two options for creating an MBO and binding to a datasource immediately: 1. Drag and drop the datasource onto the Mobile Application Diagram (as seen in Figure 4) which launches the

appropriate wizards and automatically creates bindings based on the selected datasource2. Create an MBO and its operations and attributes using the Mobile Application Diagram and palette, which

launches a set of wizards and allows you to bind them directly to a datasource

Page 7: Sybase Unwired Platform 2.1.x Development Paradigm White Paper

5

To create an MBO and defer datasource binding: 1. Create an MBO and its operations and attributes using the Mobile Application Diagram and palette. After you

define the datasource, bind the MBO to it from the Properties view2. Create attributes and operations for mobile business objects, create relationships between mobile business

objects, bind them to a back-end datasources and modify and test them

The final step in the MBO development process is to create a deployment package that contains the mobile application, including mobile business objects, role mappings, server connection mappings, and other MBO-related artifacts.

Once your development package is complete, deploy it to Sybase Unwired Server. Optionally, you can create a deployment profile that enables you to manage multiple deployment packages.

Using the preview capabilities within MBO development tooling, developers can test the MBOs and visualize the data that will be available on the device.

mobile bUsiness objeCT develoPmenT in eCliPse Sybase Unwired WorkSpace, which enables developers to model MBOs, is a plug-in in the Eclipse development

environment. Experienced Eclipse developers are familiar with Eclipse’s consistent use of windows, explorers, views, wizards, and preferences. Developers new to Eclipse can use the online help, samples, and tutorials of Sybase Unwired WorkSpace to become familiar with MBO and device application development.

deviCe aPPliCaTion develoPmenT Sybase Unwired Platform supports two main modes of application development when creating the user interface

and logic. These two modes are Hybrid Web Container-based development and native application development. Native application development is relevant where the back-end data models are developed either using MBO or OData.

Hybrid Web Container-based applications are appropriate for extensions of business processes or workflows such as approvals or requests and other lightweight applications and are currently supported only with MBO-based mobile data models.

Native application development makes sense when:• Complex business logic is required• Device services integration is intrinsic to mobile applications• User interface expectations depend on device-specific capabilities• No boundaries other than what is provided natively by the mobile operating system are required• Ability to evolve with mobile operating system is required

The development life cycle for native device applications, which you can perform in parallel with back-end MBOs, includes:

1. Develop device applications2. Generate code and application3. Deploy application to simulator4. Debug/test against simulator 5. Configure Sybase Afaria® device management platform to provision application

Afaria is an optional component that is separately licensed and only supported on 32-bit hosts. You can use Afaria with Sybase Unwired Server to perform advanced mobile device management, extended device security, and provisioning in your production environment.

However, because of platform requirements for Afaria and Unwired Platform, Afaria must be installed on separate hosts.

Page 8: Sybase Unwired Platform 2.1.x Development Paradigm White Paper

6

Hybrid web ConTainer–based develoPmenT (mobile workflows) In Hybrid Web Container-based development, the application is made up of HTML/CSS/JS and the device has a

single container that interprets this Web content (see Figure 5). This container must be deployed once and, from then on, multiple application metadata can be deployed automatically without having to generate any code.

Connect Data SourceIntegration

SybaseUnwiredPlatform

Server

HybridWeb

ContainerDeployMBO

DeployWorkflow

Sybase Unwired WorkSpace

figure 5.

Business processes such as alerts, time recording, and travel requests require immediate action, but these messages are generally accessible only with desktop or laptop computers and may not be fulfilled in a timely manner. However, mobile workflows allow users to complete predefined business processes swiftly (see Figure 6). Using a Web standards–driven application paradigm, Sybase Unwired Platform Hybrid Web Container enables the rapid development of mobile workflows, in which existing enterprise business processes or workflows can be extended to a mobile device relatively easily so that decisions can be made at any instant on a mobile device (see Figure 7).

Sybase Unwired Platform has primarily two kinds of workflow models — server-initiated and device-initiated. These models can coexist within one package.

In the server-initiated workflow model, for example, a manager receives a request — perhaps an approval for leave. The request is initiated by a notification from the back-end system, where Sybase Unwired Platform receives e-mail messages or notifications from a master account. Sybase Unwired Platform, in turn, delivers a message to an individual device based on configured distribution and MBO extraction rules.

In the device-initiated workflow model, the user sends a message, such as an approval for an expense report. Users can open workflow forms on their mobile devices and enter data that can be used either for kicking off an enterprise workflow or continuing a step in an already executing workflow.

Both approaches are offline enabled, but when real-time information is needed, data can be retrieved in an online model from the back end.

figure 6.

Page 9: Sybase Unwired Platform 2.1.x Development Paradigm White Paper

7

There are two ways in which developers can build applications with Hybrid Web SDK.

The first approach is by using the WYSIWYG design tool that binds the decisions and actions to MBOs. This requires familiarity with the Eclipse Designer tool that is included in the Hybrid Web SDK. Alternatively, developers can build hybrid apps using a tool of their own choosing, such as Sencha Touch, and package and manually deploy the apps using a predefined process/package format. Figure 6.

saP workflow mobilized Using sybase Unwired PlaTform

Employee Initiates

Travel Request

Manager Receives

Notification

CheckAmount

NotifyEmployee

Notify Manager

Manager Logsinto WEB UI

ApproveSmall

Amounts

ManagerApproves/

Rejects

Employee uses Mobile Workflow on

Device to Initiate Travel Request

Manager Receives a WorkflowNotification on Device

Manager Views the

Details

Manager Approves or

Rejects

figure 7.

Page 10: Sybase Unwired Platform 2.1.x Development Paradigm White Paper

8

naTive aPPliCaTion develoPmenT In native application development, the application is based on compiled code that is specific to a particular mobile

operating system. An iPhone application, for example, is developed in Objective C, a Windows Mobile application is developed in C#, and so on. Native application development provides the most flexibility in terms of leveraging the device services to their fullest potential, but each application must be provisioned individually after compilation, even for minor changes.

Connect

SybaseUnwiredPlatform

Server

MBOAPI

DeviceGUI

DeployMBO

GenerateCode

GenerateDefault GUI

SybaseUnwired WorkSpace

Data Source Integration Device-Specific Development

SDK

Customize

figure 8.

Developers use the standard IDE for native application development (see Figure 8) and can use the generated code based on the MBO, or use the OData SDK for targeting OData content. You will build the business logic and user interface pieces of the mobile application in an IDE of your choosing. iPhone will use Xcode, Windows Mobile will use Visual Studio, and BlackBerry will use the BlackBerry Eclipse plug-in. When building high-performance production applications, the recommended approach for Sybase Unwired Platform is to use native IDEs, such as Xcode and Visual Studio, to leverage the MBO and OData APIs.

Page 11: Sybase Unwired Platform 2.1.x Development Paradigm White Paper

9

sUmmary The flexible, open Sybase Unwired Platform infrastructure offers development teams many options to create

and manage mobile applications that connect heterogeneous back-end datasources to mobile devices. Sybase Unwired WorkSpace provides a graphical environment for developing the data aspects of mobile applications. Device application developers can work in a GUI environment using the Unwired WorkSpace Mobile Workflow Forms Designer, or use native tools to programmatically bind to the Object API. Compatible with Eclipse, Visual Studio, and other tools, Sybase Unwired Platform enables development teams to build mobile applications that use enterprise datasources quickly and effectively.

Page 12: Sybase Unwired Platform 2.1.x Development Paradigm White Paper

www.sybase.com

Sybase, Inc. Worldwide HeadquartersOne Sybase DriveDublin, CA 94568-7902U.S.A1 800 8 sybase Copyright © 2012 Sybase, Inc. All rights reserved. Unpublished rights reserved under U.S. copyright laws. Sybase,

the Sybase logo, Afaria and Sybase Control Center are trademarks of Sybase, Inc. or its subsidiaries. ® indicates registration in the United States of America. SAP and the SAP logo are the trademarks or registered trademarks of SAP AG in Germany and in several other countries. All other trademarks are the property of their respective owners. 06/12

iPad and iPhone are registered trademarks of Apple Inc.