Transcript Document

Pocket PowerBuilder

Ian Thain

Pocket PowerBuilder Evangelist

PTOG Evangelist Team, Sybase Inc.

[email protected]

Agenda

• • • • • • • • • • Introduction Unwired Enterprise Why PPB ?

Enterprise Mobile Applications PPB Overview PPB vs. PB MobiLink Developing An Application Migrating Demonstrations

Introduction

– Over the last 11 years we have seen PowerBuilder grow and develop into the tool it is today. Originally for Client Server, then incorporating Component Development & RAD Thin Client Development. – Also over the last 11 years we have seen increasing developments in DataWindow technology that has seen it appear (or not) as a non-visual DataStore, Java DataWindow and HTML DataWindow – DataWindows EVERYWHERE? Well nearly!

Introduction

• "Don't think big…Think Small!!" • • Pocket PowerBuilder is now coming to aid corporate development of Pocket PC applications, brining all the benefits RAD 4 GL and even the DataWindow technology. • So we really can now say, DataWindows EVERYWHERE!!!!

Unwired Enterprise

Liquidity + Mobility = Unwired Enterprise

Liquidity

- Free flowing information with economic value •

Mobility

- Freedom to work anytime, anywhere

Why PPB ?

• Pocket PCs are becoming more popular and are produced by many manufactures such as – HPTM, – DellTM, – ToshibaTM • Pocket PC market leader HP - iPAQ • Many companies are starting to realize the competitive advantage that occasionally connected Pocket PCs can provide in today’s business climate.

Why PPB ?

• Pocket PCs are not as powerful or as feature rich as notebook computers or Tablet PCs but are a fully enabled computer operating within a mobile context • But their small size is proving popular with road warriors looking to reduce the equipment they take with them while traveling • Pocket PCs are also allowing organizations to provide automation in areas where computers wouldn’t fit • Thus saving money by reducing data entry requirements and eliminating data entry errors.

Why PPB ?

• While there are some development tools available for creating Pocket PC applications, no tool seems to combine the features of ease-of-use with power and flexibility quite like Pocket PowerBuilder. • With Pocket PowerBuilder and Adaptive Server Anywhere for CETM, developers will be able to quickly and easily create powerful Pocket PC applications for a variety of uses. • Ideal for Mobile Smart Client development

Why PPB ?

• Mobile Smart Client – Application where client side business logic is executed on device – Persistent data storage on the device – Application can be executed at any time, even without a wireless connection – Integration to the enterprise is typically provided via synchronization – Client application communicates data to the back end via a synchronization server

Enterprise Mobile Applications

• Identifying a candidate for a mobile application • For existing systems… • Not replace but extend • What advantage or +ve impact?

• User needs • Current inefficiencies

Not just a Port or conversion !

Enterprise Mobile Applications

• Identifying common functionality Existing System Common functionality Mobile Sysytem •

Greatest common denominators of functionality

Some functionality may not be practical for mobile users

Enterprise Mobile Applications

• Key areas for a mobile application • Usability (including intuitiveness, efficiency, ease of use & reliability) • Innovation (including New Functionality) – maybe from using mobile technologies • BPI (including extending existing systems) – it should fit well into existing business processes • ROI – As always a return on investment is a major factor

Enterprise Mobile Applications

• Potential Systems for Mobile Applications • • • • • • Data Collection Inventory Management Customer Relationship Management Event Tracking Sales Force Automation Healthcare • • • Field Force Automation Sales Force Automation Mobile Healthcare

Pocket PowerBuilder Overview

• Productive 4GL IDE – Supports complete development cycle – – Rich component set Visual development with minimal coding – Currently based on the PB8 code line • DataWindow control – Single component providing sophisticated data representation – Built in SQL for selects, updates, inserts and deletes

Current GA v 1.5

Pocket PowerBuilder Overview

• BTW – SalesDB Tutorial

Pocket PowerBuilder Overview

• • • DataWindow Control – Advanced control for displaying and manipulating data Available in many formats – Freeform – – – – Graph Grid Group Tabular Reuse existing DataWindows with little effort

Pocket PowerBuilder Overview

• PowerScript – Powerful OO language • Inheritance • • Polymorphism Overloading & Overriding – – Event driven Based on Basic/Pascal – – – User Events User Functions User Objects • Visual • Non Visual

Pocket PowerBuilder Overview

• Tight Integration with SQL Anywhere Studio – Easily develop mobile “smart client” applications with ASA – Forte’ is the occasionally connected database application (necessary for wireless use) – Integration with MobiLink for data synchronization • Other Database Drivers After 1.5 GA

Pocket PowerBuilder Overview

• Rich Set of components – Command Button, – – – – – – – – – – – – – – – Picture Button, CheckBox, Radio Button, Static Text, List View, Tree View, List Box, DropDown List Box, Edit Mask, Single Line Edit, MultiLine Edit, Progress Bar, Scroll Bars, Line, Oval, Rectangle, Tabs, and many, many more!

Plus the ability to create new components!

PPB vs. PB

• • • • • • • • • • • Unsupported Functions within OLE, DDE, CORBA, Profiling, Printing, Rich Text and a few more.

Unsupported Events contain help(), closequery(), anything to do with remote (example remoteexec()), hotlinkalarm() and toolbarmoved().

PPB vs. PB

• • • • • Unsupported Features MDI applications, EAServer CORBA connections, Web and JSP targets, and Automation server.

NO PFC !

PPB vs. PB

• Unsupported DataWindow types • • • • • • Composite Crosstab Label N-Up OLE2.0

RichText

PPB vs. PB

• • • • Environment variables In both products, the enumerated types for the Environment object returned by a GetEnvironment call include the OSType and CPUType. Pocket PowerBuilder has additional values for the GetEnvironment OSType and CPUType. For a Pocket PC platform, the value returned for the GetEnvironment OSType is "WindowsCE!" and the value returned for the CPUType is "ARM!". • • ORCA Script Both PB & Pocket PowerBuilder ship with ORCA Script as of v1.5

PPB vs. PB

• • System functions for SIP Pocket PowerBuilder has system functions to control the display of the Soft Input Panel (SIP) on a Windows CE device or emulator • • Function SetSIPPreferredState the Pocket PC or • SetSIPType Description Displays or hides the SIP used on emulator Specifies the SIP panel type (keyboard or character recognizer) used by the application on a Pocket PC or emulator

New Controls

With PDA Things like Rich Ink control…

New Controls

With PDA Things like DatePicker control…

New Controls

With PDA Things like Notification Bubble…

New Controls

• • Other Native controls HP 5400 & 5500 Series Biometric Fingerprint Scanner • Symbol Barcode Scanner

Different Functionality

• • Upper-Right Corner Window Controls Changed for PDA Standards.

ok Close the window, or the entire application X Smart-Minimize, to minimize the window or entire application.

Window or Application Close

Window Title

Menu At Bottom

SIP Keyboard

Different Functionality

• • • • Window Concepts are Different NO MDI “main!” and “response!” Windows Only No Mouse – Seldom Use “drag and drop” – – Seldom Use “mouse move” Left & Right Click events mapped to “tap” & “tap-hold” gestures

Different Functionality

• • • • Menu Concepts are Different Space Limitations – Width is 6 items MAX Some Event Differences – Top level items don’t get a “menu event” – Sub Menus DO… Toolbar is a separate object – In PB toolbar is a MDI Menu property – In PPB Toolbar has a separate object ‘painter’ – Can be at top or bottom

Different Functionality

• • • Synchronization Pocket PowerBuilder also surpasses PowerBuilder with the introduction of a MobiLink wizard Generates PowerScript code (NVO’s) & Windows for within your application, to interact with a MobiLink Server. • • PPB VM pkvm15u.dll has a footprint of 3.8MB !

Different Functionality

• • Adaptive Server Anywhere mobile database – Uses full data storage capabilities of Adaptive Server Anywhere on Windows CE client – Database access via ODBC MobiLink data synchronization – MobiLink bi-directional data synchronization used to integrate with other enterprise databases (Sybase ASE and ASA, Oracle, MS SQL Server, IBM DB2) – New component to manage synchronization properties & maintenance of synchronization

Different Functionality

• Integration with POOM – Pocket Outlook Object Model – POOM is the key to the Pocket Outlook object managers repository – This repository is the object store for the Pocket PC contact manager, appointment manager & task manager. – So with the POOM object & Pocket PowerBuilder we can now enquire, access, create, update & delete contacts, appointments and tasks programmatically from within Pocket PowerBuilder applications in a very 4GL way.

POOMContact FirstName LastName Address1 Address2 etc POOMRecipient Name Address POOM FindApointment FindNextAppointment RemoveAppointment GetAppointment GetAppointments etc SameForContacts SameForTasks POOMAppointment Start Duration Recurrence Subject Body etc POOMTask Subject Body DueDate Reminder Recurrence etc POOMRecurrence DayOfMonth DayOfWeek Interval EndDate etc

Different Functionality

• Today Item – In PPB, the custom Today item and its parameters are part of the Application object, and you can use the Application painter to set Today item properties. – The Today Item means several things from being a way of displaying data from a Pocket PowerBuilder Application onto the Display screen, to being a glorified shortcut to a Pocket PowerBuilder application, as well and even a combination of the two.

Different Functionality

• Today Item – Two types of applications are needed for Today Items, they are the Display Application & the Run Application. – If you have both a Display Application and a Run Application that each will have its own instance of the Pocket PowerBuilder VM loaded as the Today Screen has its own memory space and no communication can take place.

Developing an Application

• • Design & Develop with the Pocket PowerBuilder IDE on a PC. Test on the PC with the – Pocket PowerBuilder IDE, – Pocket PC emulator (especially if you’re not the lucky developer with a Pocket PC device) – Pocket PC device itself. • Deploy to the Pocket PC device via ActiveSync for final testing, user acceptance etc. • Distributed finally as CAB files

Application Deployment

• Pocket PowerBuilder applications can be run on the mobile device in two ways: – 1) Using the ‘stub’ application that is installed into the Pocket PC start menu as Pocket PowerBuilder 1.0

– 2) By clicking directly on the application .exe (which is put into the ..\windows directory by default) • Deployment Platforms – ARM based Pocket PC devices • This covers all devices coming out with Pocket PC 2002 & Windows Mobile 2003 operating systems – MIPS, SH3 chipsets are not supported as device manufacturers have all but stopped making these devices

• • • • •

Application Deployment

With Pocket PC Development… Distribution!

Achieved by the Pocket PowerBuilder interface to Microsoft's CABWIZ, in the project painter. This enables the automatic creation of your .EXE & .PKD's into distributable .CAB files. The CAB generation process also generates an .INI file for creating a setup.exe. This uses the OpenSource EZSetup The distributable Pocket PowerBuilder files (VM etc) are installed with the IDE and can be distributed separately from your application.

PPB Application Architecture

Device SOAP (Web Services) Pocket PowerBuilder Virtual Machine Sample Application) ASA ML TCP/IP HTTP HTTPS ActiveSync (wired or wireless) Enterprise App Server MobiLink Consolidated Database (Sybase/Oracle/ Microsoft/IBM)

Demonstrations

• Basic Pocket PowerBuilder App – Use the wizard to generate an application – – – – – Build a DataWindow Object Place objects on the window Code PowerScript Deploy Run

Migrating PowerBuilder Applications

• Basics – PPB provides a wizard to import an existing PB application into the PPB environment. – – – Objects developed in PPB can be exported for import into PB. Migration from PB to PB is very easy Make sure your PB code conforms to PPB before opening it in the PPB IDE, as it may not open! – Don't worry too much as those nice guys in engineering have given up a facility to change & compile source code in PPB

Migrating PowerBuilder Applications

Migrating PowerBuilder Applications

• • • • • • • File Extensions that differ File type PB extension Workspace Target PBW PBT Library PBL Dynamic library PBD Resource file PBR PPB extension PKW PKT PKL PKD PKR • • • The file name for the Pocket PowerBuilder initialization file is PKU.INI. The U stands for Unicode. PowerBuilder supports ANSI character sets. Pocket PowerBuilder primarily supports Unicode, although it does allow you to import and export files with ANSI character sets

Migrating PowerBuilder Applications

• • From PPB to PB PPB provides a wizard to export an existing PPB application into the PB environment.

Migrating PowerBuilder Applications

• • With Pocket PC Development… size matters !

Pocket PC devices has 80 - 85% less viewable area than a 1024 x 768 average screen. PPC screen size is 320 x 240 pixels

Migrating PowerBuilder Applications

• • • • • With Pocket PC Development… watch out for the differences !

Some events/actions that we take for granted on PC are not part of the Pocket PC platform, such as right click. There is no MDI support, so developers tend to code one window with TAB controls as a way of getting around this problem. Menu's are also on the bottom of the screen, but act as menus in Windows. Window persistence will be an initial design challenge to the Pocket PowerBuilder developer, as when Pocket PC apps are closed, via the window like X in the top right hand corner of the application, they are actually minimized and stay resident in the device memory

Migrating PowerBuilder Applications

• • • • • With Pocket PC Development… watch out for Performance!

Intel XScale processor is the fastest CPU being used by PPC Next generation of StrongARM processor ARM v5 instruction set compatible with StrongARM 200 – 400 MHz, better than MIPS, SH3 & ARM • • • • Limiting factors for Pocket PC development No Math Co-Processor – Stay away from heavy computations !

Pocket PC 2002 - OS not optimized for Xscale Windows Mobile 2003 lean & mean !

Migrating PowerBuilder Applications

• RAM, which is 32-128 MB (dependant on the device & model purchased) is not only used for storage of the data on your device but also for the memory whilst running applications. • Trade off on storing a lot of information & applications with how many you can run. • Pocket PC devices can extend their storage capability by using Compact Flash or Secure Digital Memory cards. • Information and applications can be stored on the Memory card, freeing up the RAM for running programs on the device.

With Pocket PC Development… watch out for Performance!

• TechWave Application

Demonstrations

View all sessions Filter by Instructor, Product Focus, Track & Day View conference maps Add sessions to your own agenda Originally had facility for session evaluation

Does not use Synchronization First mass deployed PPB application

• Pocket myPortfolio

Demonstrations

Create Portfolios, Details, Alerts & Shares View current Portfolio Values View current Share Prices & History Alert notification Update Share prices via PocketSOAP & XMethods webservice

Uses Synchronization & has PB client

• Pocket Waiter

Demonstrations

Allocate table to customer, take order & order payment View Menu, Specials & Reservations •

Uses Synchronization & has PB client

• Biometric App

Demonstrations

Train 10 fingers to represent 10 presidents Information stored in ASA Random fingers matched to President

Uses HP’s Biometric API & Scanner

Conclusions

• • Pocket PowerBuilder is the smallest, err … I mean biggest thing to happen in the realm of PowerBuilder & Pocket Device Application development in a long while. Never has such a highly productive 4GL, with the additional strength of the DataWindow, been made available for developers of hand held mobile applications.

Pocket PowerBuilder Code Examples

• Pocket PowerBuilder code examples can be found on the CodeXchange, http://pocketpb.codexchange.sybase.com

Ian Thain Questions

and

Answers

Pocket PowerBuilder Evangelist

PTOG Evangelist Team, Sybase Inc.

[email protected]

Check out PBDJ for Pocket PowerBuilder articles