guest editorial: a brighter future for powerbuilder and sybase

44
Page 1 Contents Guest Editorial: A Brighter Future for PowerBuilder and Sybase by William B. Heys on Page 1 The Big Question: Is Your PowerBuilder Application Ready for Windows 2000 ? by Roy Kiesler on Page 3 COM Knowledge: COM+ Features by Alan Walsh on Page 8 Distributed Ways: Developing Jaguar Business Components by Sean Flynn on Page 12 EASy Does IT: Migrating Applications from Distributed PowerBuilder to Enterprise Application Server 3.0 by William B. Heys on page 16 The Real World: Datastore Update Problem and Solution by Gene Steiker and Alan Staub on Page 21 PFC Place: Multi-Select Treeview by Boris Gasin and Roy Kiesler on Page 25 Share Aware: ‘Share’the Globals by Jon Credit on Page 30 Little Helpers: EncryptX 1.3 by InnerDynamics Software reviewed by Arthur Hefti on Page 33 Advertiser Index on page 34 User Group News beginning on page 36 A BRIGHTER FUTURE FOR POWERBUILDER AND SYBASE by William B. Heys The single most important event in my career was learning PowerBuilder 1.0 almost eight years ago. Since that time I have focused my career almost exclusively on Powersoft (and subsequently Sybase) technologies. I have experienced many emotions: pleasure, challenge, frustration, and disappointment. For the first few years I believed PowerBuilder was truly the “best of breed” tool for developing client/ server applications. Technology is changing at a rapid pace. Not that long ago, nobody was thinking about Y2k or developing applications for the Web. What a difference two or three years can make. Like many of you, I have been disappointed in Sybase’s marketing message and technology over the last couple of years. I thought the “adaptive component architecture” message was too abstract and not focused enough on solutions that clients want and need. More recently, the message seemed to be “wait for the next release”. I jumped on the Distributed PowerBuilder bandwagon in PowerBuilder 5 only to discover it wasn’t ready for prime time. The message was “It’s a first step, wait until the next release”. When Jaguar was introduced, I desperately wanted to switch from DPB to Jaguar. But you couldn’t deploy PowerBuilder components to Jaguar in PowerBuilder 6.0 or 6.5, and Jaguar 2.0 couldn’t run native PowerBuilder components. The message was “wait until the next release”. Well the next release is here. PowerBuilder 7.0 has a (Continued on page 2) JULY /AUGUST 1999 PRICE: US$ 7.50 VOL. 6 / ISSUE 4 JOURNAL FOR PEOPLE INTERESTED IN CLIENT/SERVER AND INTERNET / INTRANET DEVELOPMENT WITH POWERBUILDER, POWERSITE, POWER++ AND POWERJ

Upload: leo-vasquez-blas

Post on 18-Jan-2016

86 views

Category:

Documents


8 download

DESCRIPTION

A Brighter Future forPowerBuilder and SybaseDistributed Ways:Developing Jaguar Business Components

TRANSCRIPT

Page 1: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 1

Contents

Guest Editorial: A Brighter Future forPowerBuilder and Sybaseby William B. Heys on Page 1

The Big Question:Is Your PowerBuilder Application Readyfor Windows 2000 ?by Roy Kiesler on Page 3

COM Knowledge:COM+ Featuresby Alan Walsh on Page 8

Distributed Ways:Developing Jaguar Business Componentsby Sean Flynn on Page 12

EASy Does IT: Migrating Applicationsfrom Distributed PowerBuilder toEnterprise Application Server 3.0by William B. Heys on page 16

The Real World:Datastore Update Problem and Solutionby Gene Steiker and Alan Staub on Page 21

PFC Place:Multi-Select Treeviewby Boris Gasin and Roy Kiesler on Page 25

Share Aware:‘Share’ the Globalsby Jon Credit on Page 30

Little Helpers:EncryptX 1.3 by InnerDynamics Softwarereviewed by Arthur Hefti on Page 33

Advertiser Index on page 34

User Group Newsbeginning on page 36

A BRIGHTER FUTURE FOR

POWERBUILDER AND SYBASEby William B. Heys

The single most important event in my career waslearning PowerBuilder 1.0 almost eight years ago.Since that time I have focused my career almostexclusively on Powersoft (and subsequently Sybase)technologies. I have experienced many emotions:pleasure, challenge, frustration, and disappointment.For the first few years I believed PowerBuilder wastruly the “best of breed” tool for developing client/server applications.

Technology is changing at a rapid pace. Not thatlong ago, nobody was thinking about Y2k ordeveloping applications for the Web. What adifference two or three years can make.

Like many of you, I have been disappointed inSybase’s marketing message and technology over thelast couple of years. I thought the “adaptivecomponent architecture” message was too abstractand not focused enough on solutions that clients wantand need.

More recently, the message seemed to be “wait forthe next release”. I jumped on the DistributedPowerBuilder bandwagon in PowerBuilder 5 only todiscover it wasn’t ready for prime time. The messagewas “It’s a first step, wait until the next release”.

When Jaguar was introduced, I desperately wanted toswitch from DPB to Jaguar. But you couldn’t deployPowerBuilder components to Jaguar in PowerBuilder6.0 or 6.5, and Jaguar 2.0 couldn’t run nativePowerBuilder components. The message was “waituntil the next release”.

Well the next release is here. PowerBuilder 7.0 has a

(Continued on page 2)

JULY /AUGUST 1999 PRICE: US$ 7.50 VOL. 6 / ISSUE 4

JOURNAL FOR PEOPLE INTERESTED IN CLIENT/SERVER AND INTERNET / INTRANET

DEVELOPMENT WITH POWERBUILDER, POWERSITE, POWER++ AND POWERJ

Page 2: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 2

completely new user interface designed to makedevelopment easier. The real good news is howeasy it is to create and deploy PowerBuilder customclasses as native components in EnterpriseApplication Server 3.0

The future is the World Wide Web. There will be atremendous demand for business-to-business andbusiness-to-consumer applications for the Web.Applications for the Web require an applicationserver.

Sybase’s Enterprise Application Server 3.0 offersmany important features not available from othervendors such as Microsoft’s MTS. EAS is morescaleable, has better support for failover protection,and supports Java, CORBA, COM, and nativePowerBuilder components. MTS is a Windows-only solution that is less scaleable and onlysupports COM.

For the first time in a few years, I am beginning tofeel excited about Sybase again. Superiormarketing and a marvel of technology known asthe DataWindow made PowerBuilder king of themountain. Today we can have DataWindowseverywhere. We still have the familiar client/serverDataWindow, but now we have the DataWindowActiveX, the DataWindow Plug-in, the JavaDataWindow, and the PowerSite DataWindowdesign time control for HTML.

In recent issues of PowerTimes, Carson Hagercontributed a column called EASy Street. In thisissue, I have written an article called “EASy DoesIT!” You can draw several inferences from thistitle. Building a distributed PowerBuilderapplication is EASier with Enterprise ApplicationServer than with Distributed PowerBuilder. Themessage is no longer “EAS will do it”, but ratherEASy Does IT Now!!!. Try PowerBuilder 7 andEnterprise Application Server 3.0. I think you willlike them.

Bill HeysWhittman-Hart, Inc.Lexington, MAUSA

(Continued from page 1)

PowerTimes is an international PowerBuilder Journalpublished 6 times a year mainly destined to PB UserGroups worldwide. If your User Group does not sub-scribe to PowerTimes and you would like to receive it,then you can subscribe to it on an individual basis.

Contact addresses: Editor: Rolf André Klaedtke

Bächlistrasse 21CH-8280 Kreuzlingen / SwitzerlandFax: ++41 - (0)71 - 670 01 71e-mail: [email protected]

Co-Editor: Mark A. LansingEichmatt 17CH-6343 Rotkreuz / SwitzerlandFax: ++41 - (0)41 - 790 74 79e-mail: [email protected]

On the web: http://www.powertimes.com

Column responsibles :Little Helpers: Arthur Hefti

[email protected]

PFC Place: Boris [email protected]

Know How: Bernie [email protected]

Distributed Ways: Sean [email protected]

COM Knowledge Alan [email protected]

Subscription rates: Individual: US$ 45 per yearUser Group: US$ 750 per year

For user group subscriptions, the group has the right todistribute PowerTimes to their members in an electronicor printed form at no extra charge ! PowerTimes isproduced as an electronic document in Adobe Acrobatformat.

Disclaimer: Articles or opinions published in PowerTimes do notnecessarily reflect the opinion of the editorial team.They reflect the opinion of the submitter. We assumethat the copyright of all submitted articles is owned by orgranted to the submitter. We must decline every re-sponsability regarding technical correctness or truth ofsubmitted articles and opinions.

Impressum

Page 3: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 3

IntroductionOn Tuesday, June 15, Microsoft announced thefinal release of the Application Specification forWindows 2000, dubbed the Windows 2000 LogoProgram.

Ladies and Gentlemen of the Class of ’991:

Wear sunscreen!

If I could offer you only one tip for the future,sunscreen would be it. The long-term benefits ofsunscreen have been proven by scientists, whereasthe rest of my advice has no basis more reliable thanthis specification document, which is subject tochange until Windows 2000 (SP1?) ships. I willdispense this advice now.

Thin Is In…… But fat isn’t out yet. Windows applications arestill created every day, with a richer set of featuresthan ever before. Surprisingly, though, these richclients have a significantly smaller footprint.Thanks to tighter integration with new operatingsystem services, some of which are already availableunder Windows 98/NT, these applications are trim-med down, leaner and meaner than their ancestors.

Take the newly released Office 2000 suite for exam-ple; after migrating from Office 97, I was pleasantlysurprised to find out that a standard installation ofWord, Excel, PowerPoint, Outlook and FrontPagenow consumes only 137MB of my disk space. Theprevious installation of Office 97 used more than200MB of disk space.

If you are serious about Windows programming,you should familiarize yourself with the new appli-cation specifications, regardless of your intention toobtain the logo for your application. The MicrosoftWindows Logo Program has nothing to do with thestrategy behind the application or its feature set. Ithelps developers do a good job of implementingfunctional specs, keeps them informed about thelatest innovations and provides a checklist for pro-ducing cutting-edge software. It also offers practicalsuggestions on writing good Windows applicationsthat provide a consistent user experience and reducesupport and training costs.

There are currently two Windows 2000 logo classes:Windows 2000 Professional (for client applications)and Windows 2000 Server (for server and distribu-ted applications.)

Figure 1, Windows 2000 Certification Logo

In this article, I will review a few of the areascovered by this new design guide for building bu-siness applications.

The Basics

To begin with, your application should consist of32-bit-only components. Special circumstances mayexist, which mandate the use of 16-bit code, howe-ver, for the purpose of this article, we will assumenone exist.

Is your application making changes to win.ini orsystem.ini files? Perhaps to dynamically change thedefault printer, or to perform some other shellrelated action? This common practice that started inthe days of Windows 3.x, is no longer allowed.Changes to the shell or system settings can only bemade through appropriate API calls or by accessingthe system registry.

If you haven't done so yet, you should start conver-ting your RTF-based WinHelp system to the newHTMLHelp format. The HTMLHelp Workshop tool

(Continued on page 4)

IS YOUR POWERBUILDER APPLICATION READY FOR WINDOWS 2000?by Roy Kiesler

Windows FundamentalsProvide 32-bit-only componentsDo not add to or modify win.ini, system.ini, auto-exec.bat or config.sysProvide HTML-based help system

Page 4: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 4

is freely available from the Microsoft MSDN website. Other commercial tools, such as RoboHELPfrom BlueSky Software are also up to the task.

User Interface

The UI standards have not changed much with thenew version of Windows. The same rules of thumbstill apply: maintain consistency with the operatingsystems UI, integrate with the system shell as muchas possible and be usable and friendly.

• System Fonts – Windows 2000 uses Tahoma asits system font, instead of MS Sans Serif whichis used by Windows 95/98 and NT. Tahoma isa Unicode-compliant font, which had its firstdebut in Microsoft Office 97.

• System Colors – use the following table as aguide:

• High Contrast Display Compatibility – thisoption increases screen legibility for users withvision problems. As Figure 2 illustrates, thePFC Examples application correctly uses sy-stem colors, which allow its interface to remainconsistent in high contrast display.

Notice, on the other hand, that the PFC drop-down calendar in Figure 3, is using black fontsfor the weekdays display, instead of using theWindowText system color (see table above).The result is that the font color remains un-changed on the high contrast black back-ground, thus rendering the text invisible.

• K eyboard S hortcuts – should be used acrossyour application, including in free-form Data-Windows. Users who perform intensive dataentry tasks will thank you. While you are at it,double check your menus to make sure thateach menu item is assigned a shortcut.

User Settings and System Policies

It is recommended that your application defaults tothe MyDocuments folder for saving documentscreated by the user. For example, if you have areport window that enables the user to save theDataWindow contents to a file, you should providethe MyDocuments folder path to the GetFile-SaveName function. Note, though, that the My-Documents folder is a system folder, whose actualpath may change from one user to another. In orderto get the exact path of this folder, you will need tocall the following API function:

FUNCTION boolean SHGetFolderPathA( & ulong hWnd, & long nFolder, & ulong hToken, & ulong dwFlags, & REF string lpszPath &) LIBRARY "shfolder.dll"

CONSTANT long CSIDL_PERSONAL = 5CONSTANT ulong SHGFP_TYPE_CURRENT =

String ls_mydocs, ls_filenameUlong lul_token

SetNull( lul_token )ls_mydocs= Space( 260 )IF NOT ShetFolderPathA( & Handle( this ), & CSIDL_PERSONAL, & lul_token, & SHGFP_TYPE_CURRENT, & ls_mydocs )THEN // handle the errorEND IFls_mydocs += "myreport.psr"GetFileSaveName( "Save", ls_mydocs, & ls_filename )

Policies are collections of system and user-levelrestrictions, used by network and system admini-strators as part of the Zero Administration Windowsinitiative. They include such restrictions as disk andfolder quotas, registry access rights, removing theRun command from the Start menu, etc. Yourapplication should handle all these restrictions andgracefully degrade when necessary.

Power Management

The Advance Configuration and Power Interface

(Continued from page 3)

(Continued on page 6)

User Interface FundamentalsSupport standard system size, color, font, and inputsettingsProvide documented keyboard access to all featuresEnsure compatibility with the High Contrast displayoption

Use Do not useWindowText,33554432 (225)

Black,0, RGB(0,0,0)

ButtonFace,67108864 (226)

Light Gray,RGB(192, 192, 192)

AppWorkspace,268435456 (228)

Dark Gray,RGB(128, 128, 128)

WindowBackground,1073741824 (230)

White,RGB(255,255,255)

User Settings and System PoliciesDefault to the MyDocuments folder for saving docu-ments created by the userAdhere to all system policies

OnNow/ACPI SupportRespond to operating system sleep and wake re-quests and notifications properly

Page 5: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

GET YOUR WEB APPLICATIONS

ROLLING, WITHOUT ALL THOSE

PESKY IN-BETWEEN STEPS.

©1999 Sybase, Inc. All rights reserved. All trademarks are the property of their respective owners.

Introducing PowerBuilder 7.0 and Enterprise Application Server 3.0. Togetherthey offer the fastest, easiest way to assemble, test, and deploy scalable, thinclient applications for the Web. You not only take advantage of a highly productive development environment that leverages your existing skill setsand technology. You’ll also deploy more scalable, more secure applicationsfrom Web to N-tier architectures. It all adds up to the most powerful wayto take your business to the Web. For details on EAServer and PowerBuildercall 1-800-8-SYBASE, or visit www.sybase.com/sdn.

,-

,

,

Page 6: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 6

(ACPI) reduces power consumption, whether powercomes from a wall outlet or a battery. When thecomputer is turned off, it goes into a lower powerstate and can then be wakened by a device in thesystem, such as the network card, modem, or key-board.

Windows 2000 compliant applications must partici-pate in the power management process mandated bythe operating system. Applications must be able to

respond to system or user requests to support alow-power state, and then they must also respond towake notifications, preserving data appropriately.

From a programming perspective, this means thatyour PowerBuilder application must be able to sus-pend and resume on demand. Windows 2000 passesa sleep request to an application using theWM_POWERBROADCAST message.

(Continued from page 4)

(Continued on page 7)

Figure 2, High Contrast Display Compatibility

Figure 3, High Contrast Display Incompatibility

Page 7: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 7

WM_POWERBROADCAST dwPowerEvent = wParam // ulong dwData = lParam // long

// Power Events// ------------// Battery power is lowCONSTANT ulong PBT_APMBATTERYLOW = 9// OEM-defined event occurredCONSTANT ulong PBT_APMOEMEVENT = 11// Power status has changedCONSTANT ulong & PBT_APMPOWERSTATUSCHANGE = 10// Request for permission to suspendCONSTANT ulong PBT_APMQUERYSUSPEND = 0// Suspension request deniedCONSTANT ulong & PBT_APMQUERYSUSPENDFAILED = 2// Operation resuming automatically// after eventCONSTANT ulong & PBT_APMRESUMEAUTOMATIC = 18// Operation resuming after critical// suspensionCONSTANT ulong PBT_APMRESUMECRITICAL = 6// Operation resuming after suspensionCONSTANT ulong PBT_APMRESUMESUSPEND = 7// System is suspending operationCONSTANT ulong PBT_APMSUSPEND = 4

In most cases, your application should always ac-cept this request, unless, for example, it is right inthe middle of a transaction. Unfortunately, Power-Builder does not yet have a pbm_power-broadcastevent mapped to this message.

Installation

In one word – InstallShield. Windows 2000 has anew feature called the Windows Installer Service.The Installer engine replaces the current setup APIfunctions. For more information on Windows In-staller, visit http://www.installshield. com.

ConclusionIn this article, I introduced you to some of the basicguidelines for developing PowerBuilder applicati-ons that are Windows 2000 compliant. Windows2000 packs a slew of new and exciting features,which undoubtedly, keep the members of the Po-werBuilder developers team very busy, as they workto make the next major version of PowerBuilderWindows 2000 compliant.

If I was a betting man, I would venture to say thatyou should be able to get a sneak peek at the Alphaversion of PowerBuilder 8.0, this coming August atthe Sybase users' conference in Orlando, Florida.

… But trust me on the sunscreen!

ReferencesThe latest drafts of the Microsoft Windows 2000Application Specification can be found on theMicrosoft web site at http://msdn.microsoft.com/winlogo/win2000.asp.

For more information about the OnNow initiativeand other power management related issues, see:http://www.microsoft.com/hwdev/onnow.htm andthe Microsoft Platform SDK Power ManagementReference at: http://msdn.microsoft.com/library/sdkdoc/winbase/power_3v6t.htm._____________________________1 From a column by Mary Schmich for the Chicago Tribune, theseword were the basis for the song Everybody's Free by Baz Lhr-mann. The original column can be read at http://chicagotri-b u n e . c o m / n e w s / c o l u m n i s t s / s c h m i c h / 0 , 1 1 2 2 , S A V -9706010178,00.html.

(Continued from page 6)

Install/UninstallInstall using a Windows installer package that pas-ses validation testingIdentify shared componentsInstall to Program Files by defaultSupport Add/Remove Programs properlyEnsure correct uninstall supportPublish program information properly in the StartMenu

?Roy Kiesler is a Senior Lead Consultant atNoblestar Systems in Cambridge, MA, a leadingprovider of strategic information technologybusiness solutions. Roy has been working withPowerBuilder since version 4.0, developing client/server applications for the Pharmaceutical,Financial Services and Tele-communicationsindustries. He is a member of Team Sybase – agroup of highly proficient Sybase/Powersoftproduct users, who volunteer their time to answerquestions in various support forums. Contact Royvia e-mail at [email protected].

Roy at the Special Event during the Sybase Conferencein Los Angeles, 1998...

Page 8: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 8

IntroductionAs I sit here getting ready to load Windows 2000Release Candidate 1 on my machine, it occurs to methat it might be high time to talk about COM+, thelatest version of Microsoft's architecture for compo-nent development. Many of you out there are nowon the COM and component bandwagon, and thenewest member of the Windows family brings manychanges in this area. Come with me as we take abrief tour of these changes and what Windows 2000has in store for application developers.

Some Things Never ChangeWell, almost never. Actually there is a lot in COM+that has not changed - and that's good news fordevelopers. If you take a close look, you'll see thatthe basic conceptual model is the same: compo-nents, interfaces, and classes are still a part ofCOM+. You'll also find many of the familiar servi-ces that actually implement COM are still there.This is good because it means we still have familiarsupport for things like remote interfaces. I evennoticed that DCOMCNFG is still there. And ofcourse MTS is still in there. In fact, MTS is a bigpart of COM+ - although you'll have a tough timefinding any mention of it. More on that later. Inshort, Microsoft has done a lot of work to make surethat the investments we have made in learningCOM are not wasted or lost. So take a deep breath,be comfortable in the knowledge that you alreadyknow a lot of what you need to know to use COM+,and let's move on....

Get It TogetherMore than anything, I think COM+ is aboutbringing together a bunch of stuff that has kind ofbeen floating around separately for a while. Perhapsthe biggest change in COM+ is the merging ofCOM and MTS into one cohesive programmingmodel. Today we really have two models: the COMmodel, which gives us the basic stuff like interfaces,and MTS which adds an API and the plumbing tosupport nifty things like distributed transactions, aswell as better support for security and componentmanagement. COM+ has merged the two and we

now have a single API for component developmentin Windows 2000. There was a time when the COMteam and the MTS team were actually two separategroups. Microsoft has since changed that and thereis now one gigantic COM+ team working to providedevelopers and administrators with the tools theyneed to build DNA (Distributed interNet Applicati-ons Architecture) applications.

New LookSome of most obvious changes to COM are in theuser interface. For example, the MTS Explorer (andindeed just about any mention of MTS at all) isnowhere to be found in Windows 2000. Instead, ithas been replaced by the Component Services Ma-nagement Console snap-in (see figure 1). This iswhere both administrators and developers come todo most COM+ related activities. Administratorsuse Component Services to deploy and administercomponents, while developers can use it to confi-gure things like security and transaction support.The user interface is nice, but the COM+ teamworked hard to make sure that all the functionalityin the Component Services snap-in is also availablethrough scripting. This makes it easier for bothdevelopers and administrators to automate routinetasks.

New ServicesCOM+ brings several new services for developingapplications. My personal favorite is load balan-cing. This is something that COM has desperatelyneeded for a long time, and unless you wanted towrite it yourself it just wasn't available. COM+gives administrators and developers the ability todeploy components on a "farm" of servers and haveclient workload automatically distributed amongstthose servers. You designate one server as a compo-nent load balancing server (CLB). This machineacts as a router - all client requests are sent here,and it is your single point of failure. Microsoftrecommends that you designate a backup CLB ser-ver for fault tolerance. The CLB server keeps trackof servers in the farm and forwards the request to

(Continued on page 10)

COM+ FEATURESBy Alan J. Walsh

Page 9: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 9

Page 10: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 10

the most appropriate server, as illustrated in thisdiagram from the Load Balancing Help in Windows2000:

Figure 2, Load balancing

Load Balancing provides gains in both performanceand fault tolerance, and I am certain that manydevelopers will take advantage of it in building theirapplications. One final note: it is important to keepin mind that developers must understand how todevelop components that are capable of being loadbalanced. The fact that you don't know exactlywhich server your component will live on mighthave some implications that you will have to keepin mind as you develop your application. The Plat-form SDK has detailed information about buildingload balanced components

Get in the QueueAnother powerful feature in COM+ is queued com-ponents. Microsoft introduced message queue servi-ces in the Windows NT 4 Option Pack with MSMQ(Microsoft Message Queuing). Now COM+ deve-lopers have that same functionality available tothem. The idea is that your applications can makecalls to components whether they are online or not.Requests are sent to a message queue and thenplayed back when the component is available. Aswas the case with load balancing, there are somerestrictions that the developer must take into ac-count when developing queued components. Forexample, all parameters must be passed by valueand are in-only. This is an asynchronous kind of

(Continued from page 8)

(Continued on page 11)

Figure 1, Component Services

Page 11: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 11

activity, so you can't have clients sitting aroundwaiting for out parameters or even return values.They fire and forget. You may or may not have acall to use message queues and queued componentsin your applications, but it is certainly nice to havethat option. Queued components offer a degree offault tolerance that is hard to match if you canlivewith the restrictions that they impose.

EventsThere are times when it would be nice for yourapplication components to be automatically notifiedwhen something happens. Anyone familiar withWindows already understands events, and nowCOM+ brings events and event services to compo-nents. With COM+ events, developers can utilize asimple publish and subscribe model to allow theircomponents to be notified when something inter-esting or important happens. It uses late binding, sosubscribers are identified after the event happens,and then COM+ sends the notification via standardCOM calls. As with queued components, methodparameters are in-only. The notifier will not bewaiting around to hear back from the client.

IMDBThe last new service that I want to talk aboutattempts to solve a problem that developers havehad for a long time when creating server compo-nents: how to decrease access time for databases.COM+ solves this problem with something calledIMDB: In Memory DataBase. The idea is that youcan load a copy of your data into memory either atstartup or at some other time that you decide.Because the data is in memory, access is extremelyfast. You are only constrained by the physical me-mory on your server. In addition to fast access,IMDB provides a simple and standard ADO/OLEDB interface and transaction support.

ConclusionIn conclusion, you can see that there is a lot that hasimproved with the delivery of COM+. It is noweven easier for developers using any language tobuild scalable and reliable distributed applicationson the Windows platform. COM+ retains the bestparts of COM and MTS and gives us a host ofpowerful new services.

(Continued from page 10)

?Alan Walsh works for Indiana University. He canbe reached at [email protected].

Alan after having given a presentation on COM inSwitzerland (Swiss PB User Group Meeting in Zurich,November 1998)

Page 12: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 12

IntroductionIn the previous two issues of PowerTimes we havedemonstrated a sample application working in Cli-ent/Server, Distributed PowerBuilder and COM/MTS modes of operation. In this issue we use thesame sample application with the Jaguar componenttransaction manager that is part of Sybase Enter-prise Application Server (EAServer). In addition todemonstrating a PowerBuilder client accessing aJaguar component, we will also look at accessingJaguar components from other environments inclu-ding as a COM object from Microsoft Active ServerPages (ASP).

Jaguar OverviewJaguar, from a product feature standpoint, is verysimilar to Microsoft Transaction Server (MTS). Itprovides an environment for deploying middle-tierlogic of distributed component-based applications.From a PowerBuilder perspective it can host Non-Visual Objects (NVOs) as components within theJaguar server which are then accessible by a widevariety of client applications. Jaguar also providesfeatures such as transaction management, compo-nent instance pooling (down to a method invocationlevel) and database connection pooling. These fea-tures provide a robust and scalable environment forhosting components. Sybase has a number of whitepapers and working examples on their developerweb site (www.sybase.com/sdn). Please refer to thissite to get additional information on Jaguar.

Why Use Jaguar?Jaguar allows the reuse of components, at a binarylevel, across many environments including Power-Builder, Java, C/C++ and COM. By supportingthese additional environments Jaguar provides amuch broader support as compared to MTS. Jaguarruns on NT and UNIX which allows for muchgreater scalability. Jaguar also hosts PowerBuilderruntime natively, which facilitates tighter integra-tion with the PowerBuilder development environ-ment including the ability to support remote debug-ging of components, component deployment fromwithin the development environment and a singlevendor for product support. Together these features

provide an extremely compelling package for deve-loping distributed applications, especially when thedevelopment tool used is PowerBuilder.

COM Component UpdateIn the last issue we discussed the generation ofCOM components using the OLE Generation Regi-stration Wizard and the COM Component Genera-tor. In that issue I mentioned that I had encountereda problem when building a project with the COMGenerator in which the object parser, during thecomponent compilation, gets into a recursive loopwhenever an ancestor object has references to de-scendent objects. In recent testing with PowerBuil-der 7.0 I noticed the generator no longer GPF’s, asit did in 6.X, but instead now reports an error. Thisis a problem for frameworks which frequently im-plement such behaviour including Riverton’s Open-Frame. To resolve this issue, I developed a newbusiness component ancestor object(n_cst_bso_component) that removes the traditionalframework ancestry and at the same time providesthe same method interfaces normally availablethrough the ancestry. By switching the sample ap-plication business component ancestor fromn_cst_bso to this new ancestor, I was able to elimi-nate the recursive errors previously encounteredwithin the component generators.

Not All Good NewsAlthough I eliminated the recursion errors during

(Continued on page 13)

DEVELOPING JAGUAR BUSINESS COMPONENTSby Sean Flynn

Figure 1, Jaguar Component Reuse.

BusinessComponent

Jaguar Server

PowerBuilder

BusinessComponent

Java

C/C++

COM

Page 13: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 13

the COM Component Generator build, I still en-countered other errors. The errors were caused bymethods that have arguments with unsupporteddatatypes (e.g. any). Ironically the Jaguar Compo-nent Generator simply displays a warning messagestating that the offending methods will not be sup-ported on the component and continues with thegeneration. Unfortunately the COM ComponentGenerator generates errors and stops the build.Hopefully this will be fixed in a future release (readplease fix this!). To work around this issue I createda wrapper NVO (n_cst_bso_order_component) thatonly contains the public methods necessary for thedistributed COM component. Finally I was able tosuccessfully build using both the COM ComponentGenerator and the Jaguar Component Generator.

I ran into an additional issue when attempting toaccess the COM component from ASP. I traced thisdown to a compilation switch in the COM projectthat controls how reference arguments are passed tomethods. The switch is called “Reference Argu-ments as Variants” which is located on the“Objects” tab within the Properties dialog for theCOM/MTS Component Generator project. Whenthis switch is turned off the PowerBuilder client cansuccessfully call the COM component, however, theASP client cannot. When this switch is turned onthe ASP client works but the PowerBuilder clientdoes not. Hopefully I will have more information onthis issue and the others that I encountered by thetime I give my presentation at the TechWave confe-rence in Orlando.

Jaguar Component GenerationPowerBuilder 7.0 has introduced many new wizardsfor object creation, including several for generatingJaguar components. Since the business componentalready exists as an NVO in the sample application,I selected the Jaguar Component wizard to createthe new project. The wizard prompts for relevantinformation such as the name of the component,libraries to be used and how the component will bedeployed within the Jaguar server. The generatedproject not only handles the component compila-tion, but also handles the deployment of the compo-nent directly into the Jaguar server.

Proxy Object GenerationIn the previous article to invoke a remote COMcomponent we used an object with the same nameas our business component (n_cst_bso_order) whosebase type was OLE Object. By simply moving thePBL (COM.PBL) in which this object exists higher

in our library search path we were able to invoke theremote COM component without changing any ofthe code in the client application. In order to accessthe remote business component in Jaguar we needto create a proxy object that has the same name asour business component. By placing this library(JAGUAR.PBL) earlier in our client library searchpath we can invoke the remote Jaguar componentwithout having to change our client code.

PowerBuilder 7.0 makes the generation of clientside proxy objects as easy with the Jaguar ProxyWizard. The wizard automatically connects to aJaguar server allowing you to select either an indivi-dual component or an entire package of componentsfrom which to generate proxy objects. Note that theproxy objects must be re-generated whenever theinterface (e.g. public methods and instance va-riables) of the component on the server is changed.

Component InvocationInvoking a Jaguar component is exactly the same asinvoking a Distributed PowerBuilder component,and since the sample application was developedfrom the beginning as a distributed application wedo not have to change any of the client code. All wehave to do is simply change the appropriate INI filesettings to point to the Jaguar server. The Drivervalue in the INI file is set to “Jaguar” and theApplication value is set to the name of the package(“order”) in which the component was installed inJaguar. Additionally a user-id and password mustalso be specified. This facilitates the implementa-tion of role based security within the Jaguar serverindependent of the database, network and operatingsystem security.

Sample ApplicationAs with the other articles in this series, the sampleapplication is a simple order/entry system basedupon the PowerBuilder Demo database. The onlydifference this time is that I used PowerBuilder 7.0as opposed to 6.x in the previous examples. I haveincluded a new library (JAGUAR.PBL) that con-tains the Jaguar proxy object for the business com-ponent.

Building the ComponentAs noted earlier, the component generation is assimple as opening the Jaguar project (p_order_jag)and selecting the “Build” icon. After compilationcompletes the component is automatically installedwithin Jaguar. Next the proxy object needs to be

(Continued from page 12)

(Continued on page 14)

Page 14: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 14

generated for the client application and the librarysearch path needs to be changed to include theproxy library (JAGUAR.PBL) before the componentlibrary (SERVER.PBL). Finally references to thecomponent object in the client application need tobe regenerated. For our example this can be accom-plished by simply regenerating the sheet window(w_order).

Running the Sample ApplicationThe sample application should behave the same asit did in the previous article examples with the onlydifference being that the business component is nowbeing hosted within Jaguar. We can monitor thecomponent activity by invoking the Jaguar Mana-ger. After connecting to the Jaguar server it provi-des a large number of ways to view server activityincluding monitoring components, databaseconnections and network activity. Select the“Runtime Monitoring” node to see the current acti-vity.

Jaguar Component AccessAs noted earlier, Jaguar allows access from a num-ber of client environments including COM. We cantake advantage of this with the ASP example fromthe last article to access our business component inJaguar. Jaguar supports COM access from clients byinstalling a client side COM proxy object. Theproxy object translates COM calls on the clientmachine into standard CORBA calls that are usedto invoke the remote Jaguar component. The COMregistration file for the client machine is generatedfrom the Jaguar Manager. By highlighting thepackage and selecting the “Generate TLB/REG… ”menu item the corresponding type library and regi-stry files are created. After installing the registryfile on a client machine it can then access theremote Jaguar component as a COM component.We can now use the ASP example from the pre-vious article in the same way it was used with MTS.

SummarySybase has made significant gains in the area ofdistributed application support with the release ofEAStudio and EAServer. Not only do these pro-ducts provide a robust and open environment, theyalso make it extremely easy to build distributedapplications. This allows organisations to leverageexisting skills sets while at the same time creating acomponent environment that dramatically increasesobject reuse. This is becoming more important ascompanies build Internet applications that need toshare the same components that internal systemsuse.

TechWave ’99Once again I’m plugging my session that I will bepresenting at TechWave ’99 in Orlando. The ses-sion number is AD251 and will be presented at 3:30on Monday August 23rd. The session will includemany of same topics I have covered in this articleseries including architecture and design issues fordistributed applications and the various technologi-cal solutions that are available. Topics include ap-plication partitioning, object set management, bu-siness rule implementation, data access abstractionand transaction state management. Distributed im-plementation tech-nologies covered include Ja-guarCTS and Microsoft Transaction Server. Webapplication servers will also be demonstrated inclu-ding Microsoft Active Server Pages. The presenta-tion runs long, so plan on staying late if you want toask questions.

(Continued from page 13)

IIOP

Figure 2, Jaguar COM Proxy Object.

Component

JaguarClientApp

Proxy

CORBA

Client

Component

Server

COM

?Sean Flynn is a Managing Partner at InfinitySystems Group, a Boston area consulting andtraining company specialising in distributedsystems design and development. Sean was theprincipal developer of the Riverton OpenFramedistributed business object framework. Sean is aCPD Professional, member of the CPD ReviewCommittee and sits on the PowerBuilder CustomerAdvisory Board. Sean can be reached [email protected] or by voice at 001-978-287-5332.

Page 15: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 15

CYRANO ClientPack

Comprehensive Automated Software Qualitysolution for PowerBuilder developments

Key Features of CYRANO ClientPack• Delivers a complete suite of integrated tools for managing and control-

ling quality in PowerBuilder development

• Provides the only tool for defining and maintaining standards inPowerBuilder applications

• Optimizes development, simplifies maintenance and checks com-pliance to standards in PowerBuilder applications

• Offers the industry’s leading MS Windows multiplatform test plan-ning, and defect tracking tool set

• Integrates all of the key components needed for building and runningautomated regression test suites.

• Analyzes in detail the API and SQL calls of the transactions in PC based client/serverapplications

• Identifies where changes are needed in a PowerBuilder regression test suite as your application isupdated, developed and maintained.

• Measures how much of a PowerBuilder application’s functionality and objects are being tested.

Key Benefits of CYRANO ClientPack• Allows development teams to start working on building quality much sooner

than would be possible with more traditional development methods

• Provides an almost instant return on investment without the need forextensive product or methodology training

• Improves communication between team members saving expensive traveland meeting costs discussing routine project progress

• Simplifies the maintenance of PowerBuilder applications and regressionstest suites

• Accelerates and secures migration to latest versions of PowerBuilder• Shortens the PowerBuilder development learning curve

CYRANO Worldwide Headquarters38, rue du Général Foy75008 PARISTél : +33 (0) 1 44 90 85 70Fax : +33 (0) 1 44 90 85 79

http://www.cyrano.com

Page 16: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 16

IntroductionRecently I migrated a large Distributed PowerBuil-der 6.5 application to PowerBuilder 7.0 and Enter-prise Application Server 3.0. Having tried, in theprevious versions of PowerBuilder, to use JaguarCTS, I was pleasantly surprised by how easily onecan now deploy PowerBuilder components to EAS,and how smooth the migration process can be.

Nevertheless, there are some significant architectu-ral differences between DPB and EAS. Many of thedifficulties we encountered during migration couldhave been minimized if we had known more aboutthese differences before we started.

I have even learned some things I wish I hadapplied when we developed the original DPB archi-tecture. The purpose of this article is to describemany of the issues and challenges we confrontedduring this process, in the hopes you are able tohave an easier and successful migration.

Important migration issues• Designing a flexible architecture• Replacing server push with client pull• Instance poling• New custom class events• Stateless vs. stateful components• Database connection caches• Using global variables• PowerBuilder connection object• PowerBuilder objects as datatypes• Using PowerBuilder’s Any datatype• Passing null values• Benefits of Encapsulation

Designing a Flexible ArchitectureMost PowerBuilder applications I have seen are notwell partitioned. A well-partitioned application se-parates business rules into business objects. Bymoving business rules out of window events andfunctions into business objects, you are well positio-ned to deploy these objects on a remote applicationserver such as Distributed PowerBuilder (DPB) orSybase Enterprise Application Server (EAS), for-merly known as Jaguar.

Unfortunately, most distributed applications tend totake an all-or-nothing approach towards deployingbusiness objects remotely. All business rules aredeployed on an application server while the clientapplication simply has a proxy for the remote ob-ject.

In our architecture, business objects are implemen-ted in pairs. For each remote business object, thereis a local business object paired with it. The localbusiness object contains the proxy for its associatedremote business object.

When the client application instantiates a businessobject on the client, this local object instantiates itsassociated remote object. This architecture allowsus to deploy a particular business rule either remo-tely or locally. We can choose to deploy any givenbusiness rule on the most appropriate platformbased on goals of minimizing network traffic andmaximizing performance.

The client application is not aware of where abusiness rule is deployed; it only invokes methodsin the local business object. The local businessobject may implement the business rule or it mayredirect a message through the proxy to the remotebusiness object where a business rule is deployed.

Replacing Server Push with Client PullWhen Distributed PowerBuilder (DPB) was firstintroduced with PowerBuilder 5.0, it was not possi-ble to implement asynchronous communication bet-ween the client application and remote objects run-ning on the server. With DPB 6.0, this majorshortcoming was addressed using server push.

With server push, the client application can post(rather than trigger) a method (function or event)on a remote object. Because the request is posted,the client application can continue processing whilethe remote object processes the request.The client application may or may not requirenotification when the remote object finishes proces-

(Continued on page 17)

MIGRATING APPLICATIONS FROM DISTRIBUTED POWERBUILDER TO

ENTERPRISE APPLICATION SERVER 3.0By William B. Heys

Page 17: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 17

sing a request. If a response is needed, the clientapplication passes a reference to a locally instantia-ted business object custom class to the remote ob-ject. The remote object can post a response messageback to the local business object. The local businessobject can, in turn, pass this response to the appro-priate window.

As we migrated our application from DPB to EAS,we learned server push would no longer work. EAScomponents cannot post messages back to a clientapplication. With our architecture, changing fromserver push to client pull was fairly easy andstraightforward.

To implement client pull, you must instantiate localbusiness objects in separate threads on the client.You do this by creating these objects on the clientusing the SharedObjectRegister() and SharedOb-jectGet() system functions. Shared objects run inseparate threads on the client. It is not necessary tohave a distributed application in order to haveshared objects or multi-threaded applications.

Since our architecture already creates local businessobjects on the client, we only need to change howthe application instantiates them. We also changedthe client application so it communicates asynchro-nously with the local shared business objects. Thelocal business objects communicate synchronouslywith remote objects on the EAS server.

Unfortunately, you cannot pass window referencesto business objects running in separate threads. Youcan pass custom classes but you cannot pass systemclasses or visual objects to methods of an objectrunning in a separate thread.

Our solution was to build a "notify" object on theclient to act as a mediator between a client windowand a local business object running in a separatethread. Before calling a method in the local bu-siness object, a window must first create a notifyobject and register itself to it. The window calls aregister method in the notify object, passing a refe-rence to the window (itself) and the name of anevent in the window to be called when a response isreceived from the server. The notify object saves thereference to its client window in a variable of typePowerObject, and saves the window’s “notify" eventin a string variable.

After registering itself with the notify object, aclient window can post a method on the localbusiness object, passing a reference to the notify

object as an argument. The local business objectsaves this reference to the notify object and commu-nicates synchronously with the remote object. Whenthe remote objects finishes processing a request, itreturns control to the local business object.

The local business object calls a "notify" method onthe notify object. Next, the notify object notifies itsinvoking window by dynamically posting a messageto the notify event passed to it by the window.

We designed our architecture to be very flexible.The notify object we designed can mediate commu-nications between disparate object types (visual andnon-visual objects). Since it uses a variable of typePowerObject to reference its "owning" or"invoking" client object, it can be used with anytype of object, not simply windows. In addition,since the notify object uses dynamic messaging, itcan post different responses back to its owner basedupon context.

In summary, with server push, client windows com-municate synchronously with local business objects,and these local business objects communicate asyn-chronously with remote business objects on theserver. Messages are posted back and forth allowingboth the client and the server to continue processingsimultaneously without waiting on each other.

On the other hand, with client push, client windowscommunicate asynchronously with business objectsrunning in separate threads on the client, and theselocal business objects communicate synchronouslywith remote business objects on the server.

Unfortunately, we did not know about client pullwhen we designed the DPB application, so we usedserver push. Client pull works well for both DPBand EAS. If we had known about client pull and theinability of EAS to use server push, we would havedesigned the DPB application to use client pull; andmigrating this application to EAS would have beenfar simpler and quicker.

Instance PoolingEAS supports instance pooling of components,where component instances can be kept in a pooland reused without being created and destroyedwith each use. Support for instance pooling can beset separately for individual components.

If an EAS component supports instance pooling,once it is constructed, is kept in the instance pool

(Continued from page 16)

(Continued on page 18)

Page 18: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 18

and made available for reuse. A pooled componentremains in the instance pool and will not be de-stroyed until the EAS server is shut down. When aclient application creates a proxy for an EAS com-ponent, EAS will only create a new instance of thecomponent if there isn’t one available in the poolfor reuse. Otherwise, EAS simply activates an in-stance from the pool.

The life cycle of an EAS component instance beginswhen it is created and ends when it is destroyed. Ifa component does not support instance pooling, itmust be created and destroyed with each use. Onceconstructed, a pooled instance, however, may becontinuously reused, simply being activated witheach use. When not being used, a pooled instance isdeactivated and returned to the pool.

Instance pooling can significantly improve the per-formance of an EAS application by dramaticallyreducing the number of components being createdand destroyed.

New Custom Class EventsTo support instance pooling, PowerBuilder 7.0 in-troduces three new custom class system events.These events (and their associated event ids) areactivate (pbm_component_activate), deactivate(pbm_component_deactivate), and can be pooled(pbm_component_canbepooled).

The activate event is invoked by PowerBuilder fol-lowing the constructor event when a component isinitially created. For pooled components, the acti-vate event is also invoked each time an instance istaken from the pool to be reused.

A client application releases a remote component bydestroying the client-side proxy for the component.For pooled components, the deactivate event isinvoked when the component is released back to theinstance pool. The constructor event is invoked onlyonce when the component is initially created; andthe destructor event may not be invoked until theEAS server is shut down.

To support instance pooling, you will want to movecode from a component’s constructor event to thenew activate event, and from the destructor event tothe new deactivate event.

Instance pool support is a property of an EAScomponent. With pooling enabled, a componentinstance is always pooled after each client use. Thecanbepooled event is only triggered for compo-

nents where instance pooling is not enabled. Thecanbepooled event is returns a boolean, true if theinstance can be pooled, and false if the instancecannot be pooled.

If you are migrating an application or componentfrom PowerBuilder 6.5 to PowerBuilder 7, you willneed to add these three new events to all existingcomponents. When you build new EAS componentsusing the wizards in PowerBuilder 7, these eventswill be defined for you automatically.

Stateless vs. Stateful ComponentsWith DPB and traditional client/server, people donot give much thought to the benefits of statelesscomponents. Almost everyone uses stateful compo-nents. In our DPB application, our componentswere stateful although they didn't have to be.

A stateful component is one which maintains statefor a specific client between method invocations. Astateless component can be released following eachmethod invocation. Stateless components tend to bepreferred because they enable increased scalability.

In my experience, stateless components are a newand often difficult concept for many developers tograsp. Even I tended to design most components intraditional client/server and Distributed PowerBuil-der applications to be stateful. With a stateful com-ponent a client application might call a method toretrieve and save the results of a query in a Data-Store. Subsequently the client may invoke a diffe-rent method to return all or some of the contents ofthe DataStore. Since the component needs to keepthe contents of the DataStore between method invo-cations, it is a stateful component.

When a component is stateless, it can be reusedimmediately after each method invocation. By enab-ling auto demarcation, a pooled component can bereleased back to the instance pool without requiringthe client application to explicitly release it.

Stateless, pooled components are much morereusable resulting in higher performance and grea-ter scalability with fewer physical component in-stances being created. This also makes it easier totake advantage of clustered servers and their failo-ver protection. If a component does not rememberany state, it is not important what server is used thenext time a client calls a method on the component.In addition, the component won’t lose its state if aserver goes down.

(Continued from page 17)

(Continued on page 19)

Page 19: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 19

If we had designed our components to be statelesswhere possible, migration from DPB to EAS wouldhave been quicker. We changed the architecture touse stateless components after starting the migra-tion. The moral of the story is, only design acomponent to be stateful if you need to.

Database Connection CachesDatabase connection caches help minimize perfor-mance penalties when components frequentlyconnect and disconnect from databases. EAS data-base connection caches are more robust than thetransaction-pooling feature of DPB. We chose to usethe Cache by Name feature to simplify the processof connecting to the database from an EAS compo-nent.

The Database Connection Cache is set up using theJaguar Manager that is now part of SQL Central. Ina future column, I will introduce you to JaguarManager and describe the process of setting upDatabase connection caches.

Using Global VariablesWhen I first started using Distributed PowerBuil-der, I was under the mistaken impression that onlythe server application could have an applicationobject and that individual DPB client sessions run-ning on the server did not. For this reason I believedit was impossible to use global variables withinremote client sessions.

Subsequently, I discovered that each client sessionhas a copy of the DPB server’s application objectcreated for it, although the open and close eventsare never triggered. All server-side objects createdwithin the client session have access to this applica-tion object and can reference its global variables.For this reason you can declare your own globalvariables or use the default global variables such asthe SQLCA transaction object within your DPBserver components.

In EAS, each component instance runs in its ownPowerBuilder VM session. Therefore, global va-riables cannot be shared by multiple client sessionsor even component instances created within a singleclient session. Global variables can still be used,however, within a component.

PowerBuilder Connection ObjectThe same connection object used to connect to aDPB server can also be used to connect to an EASserver. There are, however, several changes to how

certain connection properties are used.The Driver property in DPB specifies the protocolused for connecting to a DPB server (e.g. Winsockor NamedPipes). In EAS the Driver property is setto “Jaguar”).

The Location property in DPB points to the IPaddress or host name of the DPB server. In EAS,the Location property supports clustering servers(for load balancing and failover). Here you canspecify a list of EAS server names and ports separa-ted by semicolons.

The Application property in DPB specifies theservice name or port the DPB server listens to. InEAS, the Application property specifies thepackage name used by default when creating com-ponents.

The Options property is used to specify ObjectRequest Broker (ORB) options to be used. All ORBoptions start with ORB, all others options are igno-red.

UserID and Password are used by EAS whencreating component instances.

The ConnectionString and Trace properties arenot currently used in EAS.

PowerBuilder Objects as DatatypesIn EAS, public instance variables, as well as argu-ments and return values used in public events orfunctions must be valid CORBA data types. Youcannot use a PowerBuilder system class (such asDataStore or window) where a CORBA data type isrequired. You can pass simple data types and struc-tures between components.

PowerBuilder custom class NVOs may be passedbetween EAS components as long as they have alsobeen deployed as an EAS component.

Using PowerBuilder’s Any DatatypeThe PowerBuilder any type is unique to PowerBuil-der and cannot be used as the datatype for anargument or return value for any public method ofan EAS component. CORBA does in fact have anany datatype, but EAS does not currently support it.

Passing NULL valuesUnlike PowerBuilder, CORBA does not directlysupport null values for simple data types such as

(Continued from page 18)

(Continued on page 20)

Page 20: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 20

string or integer. PowerBuilder does, however,have a technique for communicating null valuesbetween clients and remote EAS components.

If a component’s method requires propagation ofnull values, PowerBuilder will add an additionalnullflags argument to the method of the componentwhen it is deployed to EAS. In addition, the methodname undergoes a change (called name mangling)such that the method name will end in __N.The nullflags parameter is a CORBA unboundedarray (sequence) of booleans. It becomes the lastargument in the method, passed by reference(inout). By turning individual nullflags on or off,one component can communicate to another compo-nent which of the associated arguments “containnull” values.

Benefits of EncapsulationI have long advocated carefully encapsulating allobjects. This means you should never have publicinstance variables, and only make methods public ifthey need to be accessed by other objects. If amethod is only called internally, make the methodprivate or protected. Encapsulation results in thenarrowest and simplest public interface for an ob-ject.

Careful encapsulation simplified the effort for mi-grating our application to EAS. When you deploy acomponent to EAS, its public interface must complywith standard CORBA Interface Definition Lan-guage (IDL). Most of our component methods werealready private or protected and therefore not im-pacted by this constraint. This is an example wherepracticing what I preach (carefully encapsulate yourobjects and simplify the public interface) paid backbenefits in real life.

I would encourage everyone to become aware of thelimitations of CORBA. By conforming to its requi-rements in future development, you won't end upwith components or methods that cannot be de-ployed to EAS in the future.

SummaryIn this article I have tried to describe some of theimportant issues you will need to understand whenyou migrate a Distributed PowerBuilder applicationto use Enterprise Application Server. In future co-

lumns, I will describe when and how to use otherimportant features of EAS such as shared and ser-vice components, database connection caches, re-mote debugging, using Jaguar Manager to configureand monitor the operation of EAS, and much more.

(Continued from page 19)

?Bill Heys (CPD, CPI) is a Senior Consultant atWhittman-Hart, Inc. in Lexington, MA. Bill willbe speaking at the Sybase TechWave conference inOrlando and at the Swiss Sybase and PowerBuilderUser Group meeting in Zurich on October 21. Youmay write Bill at [email protected].

Bill Heys, one of the speakers at the Swiss PBConference ‘97 in Lugano, Switzerland and one of hisyoungest admirers (below), Ryan Lansing, son of theco-editor of PowerTimes, Mark Lansing.

Page 21: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 21

DATASTORE UPDATE PROBLEM AND SOLUTION

by Gene Steiker and Alan Staub

IntroductionThe following discussion analyses database updatefailures in dynamically generated datastores andDataWindow objects. Powerbuilder documentationregarding similar issues is reviewed and a fix isproposed that corrects the problem.

Problem DescriptionThe update problems discussed below were encoun-tered during development of an application windowdesigned to correct data entry errors in a criticaldata field, the employee ID number, contained in arange of database tables. The authors chose to usedynamically created datastore and DataWindow ob-jects for this purpose in order to minimise themaintenance required to accommodate future chan-ges to database tables and the addition of newtables.

The application was built using Powerbuilder 5.0.04and PFC. The application serves as a front end fora DB2 database.

The window functions by querying the databasesystem tables to identify tables containing the sub-ject columns and then creating a datastore dynami-cally for each relevant table to implement updates.DataWindow objects were also generated dynami-cally for each datastore using SyntaxFromSQL()and Create() functions.

Initial tests of this window resulted in erratic updatefailures. Upon execution, the PB update() functionreturned errors (return value of –1) for 10 of 43tables in which changes were applied. However,following implementation of the fix outlined below,all 43 tables were successfully updated using thedynamic datastores.

PB DocumentationA similar case may be found in the PowerbuilderTechnical Bulletin (see Issue 457498, opened7/29/97, closed 10/24/97).

In the reported case, both the Retrieve() and Up-date() functions failed (returned –1) against a data-

store containing a dynamically generated DataWin-dow object. The user noted that this problem occur-red when tables had defaults associated with at leastone column. This case involved an application builtwith PB 5.0.02, going against a MS SQL Serverdatabase.

To resolve this issue, the PB Technical Personneladvised the user to list specific column names whenbuilding DataWindows on the fly, instead of em-ploying the wild card character, e.g.:

SELECT column_1, column_2, …FROM …

instead of

SELECT *FROM …

However, application of this technique did not cor-rect the update problems in our case. Update failu-res continued regardless of which form of SQL wasused.

AnalysisThe update failures were investigated further byexamining SQL syntax issued to the database. Amessagebox was placed in the datastore's SQLPre-view event for this purpose.

This revealed two problems. First, in cases whereupdates were failing, the update SQL statementsgenerated by the DataWindow objects did not con-tain key columns for the relevant tables in theWHERE clauses. This occurred despite specifica-tion of option 2 for the DataWindow's“Table.UpdateWhere” property requiring use of allkey and modified columns.

In other words, the DataWindow issued the fol-lowing type of SQL string for updates:

UPDATE target_tableSET modified_column = ‘0002’WHERE modified_column = ‘0001’

instead of(Continued on page 22)

Page 22: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 22

UPDATE target_tableSET modified_column = ‘0002’WHERE key_column = ‘XXX’AND modified_column = ‘0001’

Second, the messagebox placed in the datastoreSQLPreview event appeared twice for unsuccessfulupdates. When this occurred, an error code of 100was returned in the datastore’s DBError event fromthe second update with the following error message:“No data was found to satisfy the request.”

It was surmised that the database table was modi-fied successfully by the first SQL statement. Howe-ver, failures were caused when the same SQL sta-tement was issued to the database a second time andthe modified table no longer contained records thatmatched the update statement’s WHERE clause.This conclusion was verified by the success of thesolution outlined below.

Additional insights were gained by building Data-Window objects manually for the database tablesgenerating failed updates. In these cases, it was notpossible to set DataWindow update properties wi-thout first specifying key columns manually. TheDataWindow was apparently unable to query thedatabase successfully to identify the key fields. Thislack of database communication explains why refe-rences to key columns are absent from the SQLupdate syntax issued by some of the dynamicallygenerated DataWindow objects.

SolutionThe update failures were corrected by adding codein the datastore’s DBError event and at the point inthe main window where updates are executed. Thiscode avoids interruption of processing when thedouble update bug occurs.

It should be noted that in our application everyupdate was preceded by a retrieve. It was thereforecertain that database records corres-ponding to theWHERE clause in the SQL UPDATE statementexisted in all cases, so that the double update bugwas the only possible reason for an update to returnan error code of 100. This may not be true for otherapplications.

The following specific steps were implemented:

• An instance variable was defined in the subjectdatastore and code was added to the datastore’sDBError event to capture database error codes.

//* Datastore DBError Eventil_sqldbcode = sqldbcodereturn 1

• Before issuing an update, the datastore instancevariable containing the database error code wasinitialised to avoid confusion when successiveupdates were implemented. Then the error codereturned from the datastore was examined fol-lowing execution of the Update() function.

An error code of 100 returned from the data-base indicated an occurrence of the double up-date bug. When this was detected, the –1 errorcode returned from the Update() function, re-presenting a failed update, was reset to 1 andprocessing was continued.

//************************************//* Main window function://* wf_modify_datastore_records//************************************

//* Initialise Error Codeids_table_change[ll_i].il_sqldbcode = 0

//* Execute Updateli_ret = ids_table_change[ll_i].Update()

//* Ignore Update BugIF ids_table_change[ll_i].il_sqldbcode & = 100 THEN

li_ret = 1END IF

ConclusionThe preceding article describes datastore updatefailures that occur sporadically with dynamicallygenerated DataWindow objects. It appears this iscaused by the DataWindow object’s inability toidentify key columns for certain database tables. Insuch cases, the DataWindow generates an errorcode of 100 when it sends the update SQL sta-tements to the database a second time.

A fix is outlined for this problem that is effectivebut less than optimal. The authors would be inter-ested in learning whether other developers haveencountered similar problems and, if so, what tech-niques were employed to resolve the issue. In addi-tion, since this problem occurred using Powerbuil-der Version 5.0.04, we are curious to know whethersubsequent versions of Powerbuilder also includethe double update bug.

(Continued from page 21)

(Continued on page 23)

Page 23: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 23

(Continued from page 22)

?Gene Steiker is the principal of GDS Associates and is currently Project Leader for a PowerBuilder/Oracle project at a large university. Previously, Gene has worked on Powerbuilder applications forcorporations in the financial services, telecommunications electronics, and health services fields. Genecan be reached at [email protected] .

Alan Staub is a Senior Programmer/Analyst with Salomon Smith Barney currently working onapplications utilizing Powerbuilder and DB2. His previous experience includes development ofPowerbuilder applications at various firms utilizing a variety of databases. Alan can be reached [email protected].

Are you living in or around Switzerland and looking fortraining on Use Case Analysis with HOW ?

Stop searching...Course: Use Case Analysis with HOWDate: September 10 - 11, 1999 and September 13 - 14, 1999Location: Zurich, Switzerland

More information available at: http://www.raksoft.ch or e-mail: [email protected]

Course organised by RAKSoft in collaboration with KVL IT Solution Providers, Netherlands

RAK Software, Consulting & PublishingRolf André KlaedtkeBächlistrasse 21CH-8280 Kreuzlingen / Switzerland

Phone: +41-71-670 01 60Fax: +41-71-670 01 71Internet: http://www.raksoft.ch

Sybase System Integrator - IBM Business Circle Partner - Riverton Software: HOW Partner

Page 24: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

�������

a Client/Server and Internet development and consulting company

�����

Catsoft Development GmbH, Amdenerstr. 28a, CH-8872 WeesenTel: ++41 55 616 51 11, Fax ++41 616 51 14

Web: www.catsoft.ch, E-Mail: [email protected], Compuserve: CATsoftCH

�������� �� ��� �� ��� � �������

����������- Custom made Soft-

ware in any BusinessArea

�� � ��- For Sybase AG and

SQL AG

������ ��- On various Power-

Builder Topics

����������- Custom made Web Sites + Easy to maintain + Fast Development + Public Hosting available

������- ColdFusion- HomeSite- ScriptBuilder

����������- Custom made Web

Sites for Intranet andInternet usage

������- SilverStream Reseller

����������� �� ����������������� ����� � ������

Page 25: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 25

MULTI-SELECT TREEVIEW

by Boris Gasin and Roy Kiesler

IntroductionAs I frequent the newsgroups and mailing lists oneof the treeview-related questions comes up over andover. “How do I enable multiple selection in thetreeview?” Unfortunately, by design , the Power-Builder Treeview control does not support multipleselection. Or does it? This month’s column willrevolve around the treeview control, specifically theability to provide multiple item selection.

The RequirementThe idea of a multiple selection in a navigationcontrol may seem strange to some. After all, thetreeview was intended for navigation. This can beseen in the standard Explorer interface. See Figure1 below. If you need selection, well that’s what thelistview is for.

Figure 1, Windows Explorer Interface

However, when it comes to GUI standards, thingsare never black and white. The standards themsel-ves are often subjective and are in a constant state offlux. Prior to version 5 of PowerBuilder, manydevelopers and popular class libraries emulated thetreeview with a DataWindow control. Multi-rowselection was often supported in the DataWindow–based treeviews. The PowerBuilder development

environment was no exception. The library paintertreeview in PowerBuilder 5 and 6 was also a“simulated treeview”. See Figure 2.

Figure 2, PowerBuilder 6.0 Library Painter

The Poweruilder 6 library painter offers a perfectexample of the “dual purpose” treeview. While thetreeview is used for navigation, it also offers objectselection to be copied, deleted, checked out from thesource control, or processed in some other manner.It is this metaphor, familiar to all the PowerBuilderdevelopers, that often leads to the multi-select tree-view requirement.

Could there be valid reasons to allow multipleselection in a treeview? Whenever there is littleneed to manipulate the items at the lowest level itseems to be a waste to add another control just toallow selection. Why duplicate the data?

The multi-select treeview examples above comefrom simulated treeviews and may not be conside-red real authentic standards. How about Microsoft?Well, even they have strayed a little from the origi-nal stance on the treeview item selection standard.Take a close look at the Internet Explorer and the

(Continued on page 26)

Page 26: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 26

Active Desktop options window. The advanced tabdisplays a control similar to a treeview, but at thelowest level there are checkboxes and radio buttonsallowing single and multiple item selection. Seebelow.

Now here is an idea. If we can’t accomplish multi-ple selection by highlighting the treeview items,how about adding a checkbox or a radio button statepicture to flag the selected items? This interface isthe best of both worlds. The highlighted item stillprovides indication of navigation, while checkboxesemulate multiple selection. We can use a checkboxor radio button bitmap in the state picture to indi-cate selection. The finished product is shown inFigure 4.

Making it WorkThe biggest implementation challenge has to dowith the selection of the tree view items. Specifi-cally, choosing the correct event to select the check-box. The checkbox or the radio button pictureshould be toggled when it is clicked. If item selec-tion is performed from the treeview clicked event,the checkbox or a radio button would be toggled,but the item state picture will also be toggled whenthe treeview is clicked anywhere on the item. Asecond problem is that there is no way to select anitem from the clicked event without causing thefocus to change to the new item. The Option Treetreeview provides two distinct functions – naviga-tion and selection. Mixing these two functions andcausing the selection to affect the navigation would

not be desirable. The ideal case would be to togglethe item selection only when the state picture isclicked. Clicking on the state picture should notcause the item focus to change. How can this bedone? The treeview does not have a StatePictu-reClicked event. Fortunately there is always aworkaround…

The solution is to set a boolean indicator whenevera mouse pointer is over the state picture. In theclicked event we can check the boolean instancevariable and only process clicks on the state picture.To determine whether the pointer is over the stateimage we will rely on a TVM_HITTEST message.The message determines the location of the speci-fied point relative to the client area of a tree viewcontrol. It is used along with an argument structure– TVHITTESTINFO.

FUNCTION long HitMsg( long hWindow, uintuMsg, long wParam, REF OS_TVHITTESTINFOlParam ) LIBRARY "user32.dll" ALIAS FORSendMessageA

Listing 1, SendMessage API Call

After the message is triggered and the x, y locationare provided, the TVHITTESTINFO structure ispopulated with the information specifying the loca-tion relative to a tree view control. The locationflags are shown in Table 1 below.

(Continued from page 25)

(Continued on page 27)

Figure 3, IE Options Window “Treeview”

Figure 4, Multi-Select Treeview

Page 27: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 27

Table 1, Treeview Location Flags

The flag of interest to us isTVHT_ONITEMSTATEICON. Below is the codefrom the mousemove event.

OS_TVHITTESTINFO lstr_tvhittest

// Get the pointer location.lstr_tvhittest.str_pt.l_x = UnitsToPixels(xpos, XUnitsToPixels! )lstr_tvhittest.str_pt.l_y = UnitsToPixels(ypos, YUnitsToPixels! )

// Send message to retrieve handle to// item pointed by mouse.HitMsg( il_handle, TVM_HITTEST, 0,lstr_tvhittest )

// Set the flag if we are over a state// checkbox.IF lstr_tvhittest.l_hItem <> 0 THEN ib_stateclick = &

(lstr_tvhittest.l_flags = &TVHT_ONITEMSTATEICON )

END IF

Listing 2, Using TVM_HITTEST

This approach can be utilised in any situation whenyou need to determine the specific pointer position.

After the selection problem is solved, the rest of theimplementation involves a few functions traversingthe treeview and performing the requested action. Asample application along with the source code men-tioned in this article can be downloaded from theresources section of the PowerTimes website.

Using the ObjectUsing the “Option Treeview” is pretty straightfor-ward. Object functions allow the selection of asingle item and a group of items. They also provideaccess to selected item handles, labels or data. Mostof the functions are overloaded to take action on thewhole treeview or items under a specified treebranch.

of_SelectAll - Selects all tree view items under aspecified root item.

of_DeSelectAll - De-selects all tree view itemsunder a specified root item.

of_IsSelected - Returns TRUE if a specified treeview item is selected.

of_GetSelectedItems - Returns an array of handles/labels/data for all selected items under a specifiedroot item.

of_SelectItem - Toggles the selection state of aspecified tree view item. For radio button items, allsibling items are toggled as well to ensure mutuallyexclusive selection.

Code samples for some of the above functions areprovided below.

Integer li_rcli_rc = tv_1.of_SelectAll()

Listing 3, Selecting all items in a treeview

Long ll_root, ll_childInteger li_rcll_root = tv_1.FindItem(&RootTreeItem!, 0 )IF ll_root > 0 THEN

ll_child = tv_1.FindItem(&ChildTreeItem!, ll_root )

END IFli_rc = tv_1.of_SelectAll( ll_child )

Listing 4, Selecting all items under aspecified root item

(Continued from page 26)

(Continued on page 28)

TVHT_ABOVEAbove the client area.

TVHT_BELOWBelow the client area.

TVHT_NOWHEREIn the client area, butbelow the last item.

TVHT_ONITEMOn the bitmap or la-bel associated with anitem.

TVHT_ONITEMBUTTONOn the button asso-ciated with an item.

TVHT_ONITEMICONOn the bitmap asso-ciated with an item.

TVHT_ONITEMINDENTIn the indentation as-sociated with anitem.

TVHT_ONITEMLABELOn the label (string)associated with anitem.

TVHT_ONITEMRIGHTIn the area to theright of an item.

TVHT_ONITEMSTATEICONOn the state icon fora tree view item thatis in a user-definedstate.

TVHT_TOLEFTTo the left of the cli-ent area.

TVHT_TORIGHTTo the right of theclient area.

Page 28: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 28

Long ll_root, ll_childInteger li_rcString ls_labels[]ll_root = tv_1.FindItem(&RootTreeItem!, 0 )IF ll_root > 0 THEN

ll_child = tv_1.FindItem(&ChildTreeItem!, ll_root )

END IFli_rc = tv_1.of_GetSelectedItems(ll_child,& ls_labels )

Listing 5, Getting all text labels of selectedtreeview items under a specified root

ConclusionIn this article we have demonstrated a PFC basedimplementation of a “multiple-selection/option”treeview control. The code and examples shown inthe article were kept simple to demonstrate thetechniques involved. If you are going to implementthis in your extension to PFC, you might want toconsider moving it into a Treeview service.

While the utilisation of the new metaphor isstraightforward, the real question is when shouldthis approach be used instead of a more traditionaltreeview / listview or treeview / DataWindow com-bination approach? As previously mentioned, themain purpose of the treeview control is to providehierarchical navigation. However, there are caseswhen the last treeview level represents some data.This “data” level, as well as operations the applica-tion users will need to perform on this data, deter-mine which approach is more appropriate. If thedata needs to be presented in a number of differentways, if it needs to be sorted, filtered, or processedin some other way then stick with a listview or aDataWindow approach. If multiple selection is re-quired and data itself does not require a complexpresentation, the “Option Treeview” may be a goodcandidate.

(Continued from page 27) ?Roy Kiesler is a Senior Consultant at NoblestarSystems Corporation. He has been working withPowerBuilder since version 4.0, developing client/server applications for the pharmaceutical,financial and communications industries, usingPowerBuilder, C++ and MFC.Roy is a member of Team Sybase - an elite group oftechnically proficient Powersoft product users whovolunteer their time to answer questions in varioussupport forums. He can be reached via email [email protected]. For a picture of Roy,please see on page 7.

Boris Gasin is a ChiefTechnology Officer atDynamic TechnologyGroup, a New Jersey basedconsulting companyspecialising in Internet andClient-Server technologies.Boris is a president of NewJersey PowerBuilder User

group – http://www.njpbug.org/, a member ofTeam Sybase and a three time winner of the TeamMVP award. Boris is a co-author of PowerBuilder Foundation Class Professional Reference published by McGraw-Hill, ISBN # 0-07-913267-7and a contributing author of the PowerBuilder 6.0 Secrets of the Masters by SYS-Con Publishing.He can be reached via email [email protected].

Page 29: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 29

TToooollooff tthheemmoonntthh

The bridge fromclient/server to Weband distributedapplications

PowerBuilder 7The good news is, the skills you’ve already learnedwill make you successful as you pursue newopportunities on the Internet. PowerBuilder 7.0 isdesigned to take you to the next phase of yourdevelopment career, with all the power andcapability that has made PowerBuilder the numberone choice for serious business applicationdevelopment year after year.

Client-Server Datenbanken Services

PowerGenThe essential tool forgenerating PBapplications.PowerGen's breakthroughtechnology gives youunprecedented flexibility andspeed when you buildingPowerBuilder applications.Recreate your libraries (PBLs)from object source. UsePowerGen to produce all yourPowerBuilder deliverables in asingle step.

PowerDocGet your self someextra sparetime.PowerDoc automates theentire process of generatinghigh quality, technicaldocumentation. With simple,easy-to-understandinstructions, you select thePowerBuilder application todocument, and PowerDocdoes the rest, including thepreparation of Table ofContents and Index.

ImagN’Show what you’vegot.The family of ImagN’ toolkitstakes the headache out ofintegrating graphics images intoyour Windows applications!Display BMP, PCX, DCX, GIF,JPEG, Progressiv JPEG, PIC,Targa, and TIFF images usingImagN’s powerful 16 & 32-bitengines.Super FAST viewing and printengine available as an ActiveXor DLL/VCL.

PB SpyGet an inner sightof what’s going onin your PB 6.5Application.More than a debugger. Theservice-based TreeView andListView controls are now PBSpy objects with MessagePump and other features. Just-in-time debugging has beenbuilt into the Message Serviceand the Action Menu so thatyou can break into the sourcecode.

Am Borsigturm 48D-13507 BerlinGermanyPhone: +49 (0)30 430 323 50Fax: +49 (0)30 430 323 55Email: [email protected]

Page 30: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 30

'SHARE' THE GLOBALSby Jon Credit

IntroductionEver since I can remember I have heard the samething regarding global variables… DON'T USETHEM! Everywhere I have been it's the same story,"don't use global variables… global variables arebad… ". During technical interviews I have beentold repeatedly that global variables are really bad.We all seem to agree that global variables are notgood, but it still seems that they make their way intoapplications. I can't remember the last architectureI saw that did not use a global variable of some type.Even the PFC, which is touted for its object orienteddesign, abuses the rule of no global variables. Thisarticle will discuss a technique that will allow youto eliminate the use of global variables in yourapplication code once and for all.

Why Developers Use GlobalsGlobal variables are used when a variable has to beavailable to multiple modules of an application.Everyone knows global variables are bad design butthey are still used. Some common responses indefense of using global variables are:

• Well, we only have one global variable• There is no other way around it• I need this variable in multiple places in the

application• It makes the code easier to read

Global variables can make developing an applica-tion easier, but they can cause nightmares when theapplication is actually deployed. The big problemwith global variables is that they are fully accessible(i.e. can be read and written to) from anywhere inan application. It is possible for modules of anapplication to test fine during unit testing and thennot work at all when the end user first gets theapplication (been there and done that!). The reasonthis happens is because the user does not use theapplication the way the developer thought theywould, and the global variables are most likely notproperly initialised.

There is no way to verify or enforce that globalvariables are properly initialised when entering amodule of code. It is not possible to restrict a part ofan application from modifying the contents of a

global variable while another part of the applicationis currently using that variable.

Mis-Behaving GlobalsNiki is a senior developer on a project and has aparticular result set that she needs to share inmultiple windows throughout her application. Shedecides to create a global DataStore to hold this dataand then she uses the ShareData function to sharethe data with her windows that require the data.

Holli is a newer developer on the team and has asimilar requirement to share a common set of datain multiple places in the application. She takes thesame approach as Niki and creates another globalDataStore variable to cache DataWindow data. Af-ter developing a few modules using the DataWin-dow caching technique, Holli notices that rowscould be added to, or removed from, the tableduring the running of the application. She decidesto add an embedded SQL call to count the numberof rows currently in the table and compare that withthe rowcount in the global DataStore just prior tothe ShareData call. If the number of rows currentlyin the table and the DataStore rowcount are not thesame she re-retrieves the DataStore before callingShareData.

Niki notices what Holli is doing and thinks thiswould be good logic to add to the modules that shehas already developed. She makes code changes toall the modules she has written that use the Data-Window caching technique.

Other developers on the team that have been usingglobal DataStores for DataWindow caching noticethe actual rows in their result sets may also changeduring the running of the application. They decideto add embedded SQL to compare the current num-ber of rows in the database with the DataStore rowcount.

Just prior to deploying the application the deve-lopers find out there is a data model change beingimplemented that is going to affect the SQL of allthe global DataStores that have been created fortheir application. Not only does the SQL for each of

(Continued on page 31)

Page 31: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 31

the DataStores need to be modified, but also theembedded SQL used to retrieve the current row-count in the table needs to be modified. The Data-Windows that actually display the data do not needto be modified because the result set does notchange (number of columns and data types). Howe-ver, the developers still need to make changes toevery window that uses the DataStore caching tech-nique in order to modify the embedded SQL.

The above is an example of how global access tovariables can cause problems in an application. TheDataStores are being accessed directly and there isno controlling interface to protect developers whenbusiness rules change.

What are Shared Variables?Shared variables (not to be confused with SharedObjects) are one of the most misunderstood va-riables in the PowerBuilder language. I have metmany PowerBuilder developers over the years and Ionly know of a handful that use Shared Variables orfully understand the benefit of using them. Sharedvariables have been available to us since PowerBuil-der 1.0, so this isn't any new ground breakingtechnology. The shared variable is analogous to theclass (or static) variable in C++ and the static fieldin Java. They are variables that have the same valuefor all instances of a class and do not lose theirvalue when the last instance of the class is de-stroyed. A shared variable placed on an ancestorobject maintains a common value for all descendentobjects. There is one catch to using Shared variablesin PowerBuilder: they are private in nature. Thismeans that any descendant objects cannot directlyaccess or write to the shared variable. Read accesscan be easily accomplished with a 'Get' method onthe ancestor object, and write ability can be provi-ded via a 'Set' method on the ancestor object.

Consider the following simple example:

Create an NVO, say n_count, with a single sharedvariable of type Integer// Shared VariablesInteger si_count = 0

// Constructor Eventsi_count = si_count + 1

// Method nf_howManyTimesString ls_countls_count = String(si_count)MessageBox( "This class has been instantia-ted", ls_count + " times" )

Create a window with a command button that con-tains the following script:

// We are going to display how many times// this script was calledn_count lnv_countlnv_count = Create n_countlnv_count.nf_howManyTimes()Destroy lnv_count

Each time the button is clicked, a MessageBox willbe displayed displaying the value of si_count. Thevalue of si_count is incremented in the constructorevent of n_count so the incremented value is beingdisplayed in the MessageBox call. The first time thebutton is clicked the MessageBox in figure 1 isdisplayed. The second time the button is clicked theMessageBox in figure 2 is displayed. Each subse-quent click of the button will increase the value ofsi_count and the new value is displayed in theMessageBox call.

Figure 1, First time n_count instantiated

Figure 2, Second time n_count instantiated

When you first look at the above code you may bethinking that since the NVO was destroyed and itwas local to the button script, there is NO WAYthat the MessageBox shows an incrementing num-ber. Remember, we said that Shared Variables havethe same value for all instances of the class and donot loose their value when the last instance of theclass is destroyed. Shared variables maintain theirvalue for the life of the application, not the objectinstance.

'Share' the SolutionUsing the DataWindow-caching example from be-fore, we can change the implementation of theglobal DataStores to be Shared Variables within aNon Visual Object (NVO). In order to implement

(Continued from page 30)

(Continued on page 32)

Page 32: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 32

this approach we need to create an NVO thatcontains the following:

• A shared variable to hold the DataStore• Code to initially setup and retrieve the Data-

Store• nf_share method to share the data in the Data-

Store with a passed in DataWindow

The best approach to sharing the data is to pass aDataWindow into the function and issue the Share-Data call within the NVO function. This hides theimplementation of how the DataWindow is actuallypopulated and prevents objects outside the NVOfrom being able to manipulate the DataStore.

The NVO would look something like this:

// Shared VariablesDataStore sds_NikisStuff

// Constructor Event// Check to see if the DataStore has// been initially createdIf NOT IsValid(sds_NikisStuff) Then sds_NikisStuff = Create DataStore sds_NikisStuff.dataObject = "d_niki" sds_NikiStuff.SetTransObject(SQLCA) sds_NikisStuff.Retrieve()End If

// method nf_share(REF DataWindow adw_1)Long ll_currentRows

// Get the # of rowsSelect count(*) INTO:ll_currentRows FROM <table> WHERE<condition that matches DataStore>

If ll_currentRows & <> sds_NikisStuff.RowCount() Then Sds_NikisStuff.Retrieve()End If// Share the dataReturn(sds_NikisStuff.ShareData(adw_1))

// Application open event// Setup DataWindow cachen_NikiCache lnv_cachelnv_cache = Create n_NikiCache// Everything is setup…destroyDestroy lnv_cache

// Open event of window that requires// the DataWindow cachen_NikiCache lnv_cachelnv_cache = Create n_NikiCachelnv_cache.nf_share(dw_1)// No longer need the NVODestroy lnv_cache

People who don't understand how Shared Variableswork get very confused when they see a call toCreate and Destroy on successive lines in the appli-cation open event script. We know the IF statementin the constructor event will only evaluate to truethe first time this NVO is instantiated. (If you still

have doubts, put a MessageBox call inside the IFcondition in the constructor event.)

The above example demonstrates how Shared Va-riables can be used to replace global variables inapplication code. In the above code, we can alsoeasily adapt if we ever need to add retrieval argu-ments to the DataStore. Another benefit that isachieved from using the Shared Variable approachis the NVOs that contain the Shared Variables arereusable with other applications; global variablesare not reusable across applications.

ConclusionBy using Shared Variables instead of global va-riables, the options are open to the developer whenchange occurs. This article discussed the usage ofShared Variables to replace global variables but italso touched on the topic of working with compo-nents. We did not have to put the shared Variable inan NVO; we could have placed it on a window. Ifwe had encapsulated the Shared Variable on awindow, however, we most likely would not be ableto freely reuse the functionality within a singleapplication, let alone start thinking of reusing it inother applications.

(Continued from page 31)

?Jon Credit is the VicePresident of TechnicalConsulting for CLMConcepts, a regionalconsulting companyspecialising in Internet andClient/Server technologies.Jon is a member of TeamPowersoft, CPDProfessional, and amember of the CPD

Certification Committee. You can visit Jon's website, Credit's Corner at http://jcredit.home.sprynet.com or send him an e-maildirectly at [email protected].

Page 33: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 33

ENCRYPTX 3.1by InnerDynamics SoftwareReviewed by Arthur Hefti

IntroductionDo you have applications that exchange data withother applications but you can’t use database repli-cation? Do you use text files for this data exchange?Do you ever worry about size and security, e.g.everybody can see what’s in these files? Well, En-cryptX, by InnerDynamics Software, can handle allthese problems for you. It is an ActiveX that canencrypt and compress your output.

DescriptionEncryptX uses the BLOWFISH Cipher to encryptthe data. This method was designed by BruceSchneier who is a well-known expert in the field ofencryption. Mr. Schneier is also the author of theexcellent book Applied Cryptography, Second Edi-tion, (John Wiley and Sons, 1996) which gives thecomplete code and description of BLOWFISH aswell as that for most of the other encryption algo-rithms in use today.

Technically BLOWFISH is a 16 pass block encryp-tion method that works in blocks of eight bytes.During each pass the bits are shuffled in a patternthat is different for each locking key. After 16passes the bits appear completely randomized. Ho-wever, the seemingly random bytes can be reco-vered by rerunning the algorithm with the sameencryption key

BLOWFISH is a symmetric block cipher that takesa variable-length key, from 32 bits to 448 bits.BLOWFISH was designed in 1993 by BruceSchneier as a fast, free alternative to existing en-cryption algorithms. Since then it has been analyzedconsiderably, and it is slowly gaining acceptance asa strong encryption algorithm. BLOWFISH is unpa-tented and license-free, and is available free for alluses.

To compress the data EncryptX uses C-CADE, a

(Continued on page 34)

Page 34: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 34

proprietary multi-pass compression block derivativethat dynamically compresses each phase of theBLOWFISH cipher stream as it's produced. Theencrypted and compressed files are only slightlylarger than having them zipped without encryption.

UsageThe ActiveX comes with 5 functions: One for swit-ching the component from trial to full mode, two toencrypt and decrypt files and two to encrypt anddecrypt strings.

Once the EncryptX ActiveX is installed and registe-red on your machine, you can insert the control onthe window or user object you need to encrypt/decrypt.

The usage of the encryption functions is quite sim-ple.

lb_Result=ole_crypt.Object.FileEncrypt( &<InFile>, <OutFile>, <password> )

ls_Crypt=ole_crypt.object.DataEncrypt( &<InText>, <password> )

The decryption functions are called FileDecrypt andDataDecrypt and have the same arguments.

ConclusionEncryptX is an easy to use and powerful ActiveXthat gives your applications the possibility to useencryption and compressions within a few minutes.

Pricing and AvailabilityThe price ranges from US$ 79 for an individualcopy up to US$ 450 for an unlimited developerlicense. EncryptX is available from:

InnerDynamics Software1264 King Carey DriveSt. Louis, MO. 63146USAhttp://www.innerdynamics.com.

(Continued from page 33)

Advertiser Index

Page Name Internet address

5 Sybase, Inc. www.sybase.com 9 E. Crane Computing www.ecrane.com15 Cyrano www.cyrano.com23 RAK Software, Consulting & Publishing www.raksoft.ch24 CATsoft Development GmbH www.catsoft.ch29 PowerPeople www.powerpeople.de35 SYAP AG www.syap.ch44 SybSearch www.sybsearch.com

Page 35: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 35

Name

Company

Function Department

Phone Fax

E-Mail

For More Information Fax back this reply, or call our sales team.

Phone: 041 760 5071 Fax: 041 760 1707

SYAP AG, Dorfstrasse 38, Baar CH-6340.Phone: 041 760 5072 Fax: 041 760 1707 Web Site: www.syap.ch

Page 36: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 36

PowerTimes provides this space to the subscribinguser groups to publish their news, announcementsand other communications to their members. Pleasesend your material to the editor or the co-editor ofPowerTimes (addresses under “Impressum”).

If your user group doesn’t subscribe to PowerTimesyet, please contact us to get the very reasonablerates or check out our web site at:

http://www.powertimes.com

Baltimore PowerBuilder User GroupThe Baltimore Area Power-Builder Users Group(BAPBUG) meets the firstWednesday of the even num-bered months at the Social Se-curity Administration OAGbuilding in Woodlawn, Mary-land.

http://www.geocities.com/Sili-conValley/Bay/8680

President: Debbie [email protected]

Vice President: Bill [email protected]

Secretary: Gordon [email protected]

Treasurer: Fred [email protected]

Web Administrator: Anne [email protected]

Newsletter Editor: Greg [email protected]

The members of the Baltimore PowerBuilder UserGroup receive PowerTimes thanks to a generoussponsorship from

http://www.ctpartners.com

Specializing in the Sybase, SilverStream andMicrosoft families of products, Corporate Techno-logy Partners offers a full line of client/server andweb application development and training services.Point your browser to http://www.ctpartners.com/asp/tips.asp for frequently updated, cutting edgewhitepapers, and a variety of helpful, technical tipsfrom industry pros. Visit today to see how we canhelp your organization realize the most effectiveemerging technology solution.

Calgary PowerBuilder User GroupThe President of the Calgary PowerBuilder UserGroup, Todd Costella, can be reached at thefollowing e-mail address:[email protected]

The members of the Calgary PowerBuilder UserGroup receive PowerTimes thanks to a generoussponsorship from aRenDeeco, Inc.

Page 37: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 37

ChicagoLand PowerBuilder User GroupThe officers of the CPBUG are:

President Michael Baraz (630) 235-4529Vice-President Peter Vassilatos (312) 856-6720Secretary Jeff Barnes (847) 549-7765Treasurer Nicky Petrila (630) 792-5073

The CPBUG website can be found at:

http://www.cpbug.org

The Secretary of the ChicagoLand PowerBuilderUser Group, Jeff Barnes, can be reached at thefollowing e-mail address: [email protected].

Central Ohio PowerBuilder User GroupThe Central Ohio PowerBuilder Users Group gene-rally meets during the second week of odd numbe-red months. Meetings alternate between memberdemos and product presentations.

Location: Bank One Offices 1111 Schrock Road, Columbus, OH

Refreshments: 6:00 - 6:15pm, Presentation: 6:15

Our mailing address is:Central Ohio PowerBuilder User GroupP.O. Box 363Worthington, OH 43085-0363

Internet: http://www.cmhpbug.com

President: Vince [email protected] - 220 7900

Vice President: Jeff [email protected] - 213 5329

Secretary: Jim [email protected] - 418 1748

Treasurer: Todd [email protected] - 418 1748

Greater Boston PowerBuilder Users Group

The officers of the User Group are:

President: Dan Murphy

Vice President: Olga I. [email protected]

Treasurer: Karen [email protected]

Secretary: Susan [email protected]

The members of the Greater Boston PowerBuilderUser Group receive PowerTimes thanks to a gene-rous sponsorship from KEVSystems Inc., locatedin Newton, MA.

KEVSystems is a PowerSoft Consulting Partnerand provides system design and integration assi-stance for financial, personnel, and medical sy-stems.

Our staff, made up exclusively of Certified Power-Builder Developers, has over 20 years experiencein securities processing systems and database de-sign. We have worked on systems for trust accoun-ting, shop floor management, personnel, and three-tiered integration.

KEV Systems, Inc.65 Stony Brae Rd.Newton, MA. 02161-1728

Phone: (617) 964 1426 or (800) 376 5755Fax: (617) 527 0090

Page 38: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 38

Club Fibonacci - Club des Utilisateurs Sybase FranceLe club francais des utilisateurs PowerBuilder n'e-xiste plus en France. Il a été remplacé par le ClubFibonacci: le club des utilisateurs Sybase, qui estgéré directement par Sybase France.

Les membres du Club Fibonacci reçoivent Power-Times grace au sponsoring généreux de la sociétéNOVALYS.

(The PowerBuilder User Group France doesn't exi-ste anymore. It has been replaced by the "ClubFibonacci" - the Sybase Users Group in France

The members of the Club Fibonacci (France) re-ceive PowerTimes thanks to a generous sponsor-ship from Novalys.).

NOVALYS met en place desoutils, méthodes et normes dedéveloppement pour la réussite devos applications. Les consultants

de Novalys accompagnent et certifient vos projetspour garantir leur réussite technique.

NOVALYS creates, distributes and supportscomplementary tools for PowerBuilder and is thedistributor of HOW from Riverton Software inFrance.

Visit our website at: http://www.novalys.fr.

Novalys SA140 rue Galliéni92100 Boulogne-Billancourt / France

Tel : 01.46.99.66.20 Fax: 01.46.99.08.92

New Jersey PowerBuilder User Group

The President of the New Jersey PowerBuilderUser Group, Guy Yasika, can be reached at thefollowing e-mail address: [email protected]

The NJPBUG website can be found at:http://www.njpbug.org

The members of the New Jersey PowerBuilder UserGroup receive PowerTimes thanks to a generoussponsorship from Dynamic Technology Group.

Dynamic Technology Group, Inc.1055 Parsippany Blvd., Suite 501-26Parsippany, NJ 07054

Phone: 973.402.5600Fax: 973.402.5620

http://www.dynamictechgroup.com

PowerBuilder User Group Denmark

E-mail: [email protected]: +45 6313-6128Fax: +45 6313-6199Internet: http://www.sybase.dk/pbusgdk

The members of the PowerBuilder User GroupDenmark receive PowerTimes thanks to agenerous sponsorship from Sybase Denmark.

Page 39: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 39

Houston PowerBuilder User Group

President: Rick [email protected]

Vice President: Ken [email protected]

Conference Coordinator: Ron [email protected]

Treasurer: Nonie [email protected]

Secretary: Ram [email protected]

Newsletter Editor: Randeep [email protected]

The members of the Houston PowerBuilder UserGroup receive PowerTimes thanks to a generoussponsorship from Dynamic Data Solutions, Inc.

http://www.dyn-data.com

Dynamic Data Solutions provides expert applica-tion development consulting in the areas of tradi-tional and web client/server focusing on integratedsolutions from the Sybase/Powersoft and Microsoftfamilies of products.

Come check our Tech Zone at http://www.dyn-data.com/ims/techzone/techzone.stm for a search-able database of development tips as well as realworld examples of our expertise at work.

PowerBuilder User Group Germany e.V.Das nächste Meeting der PBUGG findet am 18. und19. Oktober 1999 in Stuttgart statt. Es können nochVorträge gemeldet werden. Auch Anregungenwerden noch entgegen genommen.

Am 18.10.99 findet unsere Vereinsversammlungmit Wahl des Vorstands statt. Einladungen werdenrechtzeitig verschickt.

Viele GrüßeLudwin Feiten (Vorstand)E-mail: [email protected]

PBUGG e.V.c/o Power PeopleLudwin FeitenAm Borsigturm 48D-13507 BerlinTel.: +49 (0)30 4303 2350Fax: +49 (0)30 4303 2355

Besuchen Sie die Homepageder PowerBuilder User GroupGermany:http://www.pbugg.de

Madison PowerBuilder User Group

President: Eric Larson(608)252-3385

Vice President: Amy Jo EsserTreasurer: Craig ColeSecretary: Bruce MeisterWebmaster: Jeffrey White

Internet: http://www.madpug.org

Page 40: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 40

Indianapolis PowerBuilder User Group

The User Group meets on the 3rd Thursday of everyeven month.

President: Deanna [email protected]

VP: Scott [email protected]

Secretary: Angie [email protected]

Treasurer: Bruce [email protected]

Webmaster: [email protected]: http://www.ipbug.org

The members of the Indianapolis PowerBuilderUser Group receive PowerTimes thanks to a gene-rous sponsorship from

Since 1993, Fortune 1000 companies have lookedto Client Server Associates (CSA) for solutions totheir business computing needs. Offering softwareproducts for purchase, consulting services andcomprehensive and customized education pro-grams, CSA is a single source provider and partnerthroughout the Midwest with offices in Cincinnati,Columbus and Indianapolis.

Northwest PowerBuilder User Group

Meetings are generally scheduled once every othermonth.

The Northwest PB User Group URL is:http://www.cascadia-sw.com/nwpbug/

The NWPBUG officers are:

President: Anirban [email protected]

Vice President: Paul [email protected]

Secretary: Anil [email protected]

Treasurer: Connie [email protected]

Feel free to get in touch with us through our website for more meeting info... we look forward tohearing from you ! PBUG's can be fun (well atleast informative, trust us) !!

The members of the NorthWest PowerBuilder UserGroup receive PowerTimes thanks to a generoussponsorship from ServerLogic Corporation.

http: //www.serverlogic.com

ServerLogic Corporation is a premier provider ofcorporate software development and informationtechnology consulting. ServerLogic has worked withhundreds of organizations throughout the US, Ca-nada, and the world seeking effective consulting,tool, and training solutions. Successful applicationdevelopment or migration of legacy applications tomore productive client/server or internet environ-ments requires expertise in design, development,testing, and implementation. ServerLogic has theexperience to help ensure your success in these areas.

Page 41: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 41

Ottawa PowerBuilder User GroupThe Ottawa PowerBuilder User's Group iscomposed of Ottawa-area Information Sy-stems professionals who are interested instaying on the leading edge of Power-

Builder and client/server development.

The group meets on the 2nd Wednesday of eachmonth, from September through May. At eachmeeting, a new and interesting topic is presentedand discussion is encouraged. These meetings are agreat place to meet fellow users, discuss issues andideas, and network for future opportunities.

The Ottawa PowerBuilder User Group website canbe found at http://www.opbug.com

President: Carole Hargrave [email protected]

VP Public Relations: Mike Woods [email protected]

VP Administration: Bill Stevens [email protected]

Treasurer: Mark Jorgensen [email protected]

Secretary: Pauline Aubertin [email protected]

PowerBuilder User Group NorwayFormålet med brukerforeningen er to-delt:

1. Den skal være et kompetanseskapende forumfor brukere av Powersoft-produktene(PowerBuilder, PowerJ, Power++, Power-Designer, Enterprise Application Server).

2. Den skal være et kontaktpunkt mellom bru-kerne og Sybase Norge, når det gjelder fors-lag til endringer/forbedringer av produkterog relaterte tjenester.

Brukerforeningen er uavhengig av Sybase Norge, oghar et styre på seks medlemmer som er valgt påforeningens generalforsamling. De fleste arrange-menter i brukergruppens regi foregår på kveldstid.Arrangementene tar sikte på at man skal kunneutveksle erfaringer og kunnskap gjennom at brukere

presenterer sine løsninger, tredjepartsleverandørerpresenterer sine produkter, konsulenter viser pros-jekter de har deltatt i etc.

Blant aktivitetene i foreningen nevner vi:• Egne tekniske kvelder• Båttur• Julebord• Norsk / Nordisk brukerkonferanse

Både båtturen og julebordet er gode anledninger forå knytte faglige og sosiale kontakter i bransjen. Selvom disse arrangementene i første rekke er sosiale,starter vi med et faglig innhold som innledning tilkvelden. Årets båttur er planlagt til tirsdag 15. Juni.

Ønsker du mer informasjon kan du ta kontakt mednoen i styret.

Thomas Revetal EDB ASA Tlf. 22 72 80 00Stig Melling Avenir ASA Tlf. 23 15 75 00Rune Nerhagen WM-Data Tlf. 22 57 70 00Wenche Fronth Hærens Forsynings Kommando Tlf. 23 09 63 86Øystein Rolfsen De Norske Bokklubbene Tlf. 22 02 20 00Leif Aksel Grøthe OCP ASMona Eng Sybase Norge AS Tlf. 23 10 55 16

Page 42: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 42

St. Louis PowerBuilder User GroupWe meet on the 3rd Tuesday of every other month,beginning in January at Monsanto CorporateHeadquarters (directions on the web page). Themeetings begin at 5:30 pm.

The new website is http://www.stlpbug.org

President: Jay [email protected]

Vice President: Allen [email protected]

Secretary: Neal [email protected]

Treasurer: Dave [email protected]

The members of the St. Louis PowerBuilder UserGroup receive PowerTimes thanks to a generoussponsorship from Solutech, Inc. in St. Louis.

Solutech is a company specializing in client/server,web application development, technical training,vendor certified consulting and software solutions.

Solutech maintains strategic partnerships with lea-ding software vendors such as Microsoft, Oracle,Rational, Powersoft and Sybase. These partnershipsgive you a direct link to new product informationand on-going technology developments. Solutech isa local extension of our vendors, bringing you peaceof mind in a constantly changing environment.

Solutech has nine offices and training centers. For acomplete list of our free seminars and vendor certi-fied training classes; or to view the latest companyinformation on Solutech, our locations, and ourservices, please visit us on the web atwww.solutechinc.com.

UK PowerBuilder User GroupAn independent group formedin 1992, PBUG currently has amembership approaching 150companies. Events are heldthree times each year withattendances in the region of200 at each event. The groupis self-funding and receives

excellent technical support from Sybase.

PBUG Council:

Chairman: Warren Clayburn [email protected]

Treasurer: Ian [email protected]

Secretary: David [email protected]

Member: Brick Du [email protected]

The member council runs PBUG, but the day-to-daywork is managed by Pb Associates.

Anne Bocock is responsible for most aspects of thegroup including organising the conferences andputting together PBulletin. Judy Barnett handles allaccounting matters. You can reach Anne and Judyat the PBUG office.

Telephone: 0181 421 3533Fax: 0181 420 1420Email: [email protected]: http://www.pbug.co.uk

Postal address:Suite A8, Kebbell HouseCarpenders ParkWatford, Herts. WD1 5BE

Page 43: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 43

Sybase and PowerBuilder User Group Switzerland

Dear SPBUGS Member,

The Swiss PowerBuilder User Group and the SybaseUser Group Switzerland have merged to become theSybase and PowerBuilder User Group Switzerland.

Our first joint meeting (the 5th annual meeting of thePowerBuilder section) will take place in Zurich onOctober 21st. The main speaker will be Bill Heys, checkout the web page at http://www.spbug.ch for moredetails.

As our president is resigning after 5 years we arecurrently looking for new steering committee members.

If you are interested please contact the Secretary MrsCelia Hegarty by mailing her at [email protected].

We hope to see you in October.

The SPBUGS Steering Committee

The members of the SPBUG receive PowerTimes thanksto a generous sponsorship from CATsoft DevelopmentGmbH in Weesen.

CATsoft Development GmbH is a Swiss Client/Server and Internet/Intranet company specializingon PowerBuilder and JAVA development. Wehave experience in PowerBuilder on the Internet(Web.PB), Powersoft's PFC and HOW. We also doCold Fusion and SilverStream.

CATsoft Development GmbHAmdenerstrasse 28aCH-8872 Weesen

Phone: +41-55-616 51 11Fax: +41-55-616 51 14Web: www.catsoft.ch

CATsoft

PowerBuilder User Group Italia

Anche quest'anno possiamo contare su Sybase e ilsuo nuovo Powerbuilder 7, cogliamo l'occasioneper augurare un buon SMAU 99.

E-mail: [email protected]: 0331/700189Internet: http://www.telemacus.it/pbug/pbug.htm

L' abbonamento a PowerTimes per gli iscritti delPower Builder User Group Italia e' stato gentil-mente offerto da Sybase Italia.

The members of the PowerBuilder User GroupItaly receive PowerTimes thanks to a generoussponsorship from Sybase Italia.

Page 44: Guest Editorial: A Brighter Future for PowerBuilder and Sybase

Page 44