PowerBuilder Tips, Tricks, and Techniques

Arthur Hefti

Subscribe to Arthur Hefti: eMailAlertsEmail Alerts
Get Arthur Hefti: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Related Topics: Adobe AIR on Ulitzer

Adobe AIR: Article

PowerBuilder .NET Web Services with Various Front Ends

A work in progress

Last year I wrote an article in PBDJ describing an ASP.NET project that was done with DataWindow.NET in the browser ("Prognos" Volume 14, Issue 4) and PowerBuilder Web Services in the back end. The front end consisted of an intro page, two data entry pages, and one page with the result.

The front end was rewritten in a couple of other technologies to test different ways to create browser-based applications. This article covers solutions that run in different browsers and on different operation systems. I will also look at PowerBuilder 11.2 Webform although it is IE-only. At the end I will cover PowerBuilder WinForm and PocketBuilder as they could be solutions for applications that are not always connected.

This article doesn't cover all the possible techniques (Appeon comes to mind if you're fine with an IE-only solution or WPF XBAP used for no-touch deployment of Windows applications) and doesn't cover a rewrite of the ASP.NET solution using third-party components.

The article shows the invocation of the help Web Service from one single button. The help Web Service takes three arguments (Configuration, Language, and Help Id). My presentation at TechWave 2008, for example, goes beyond this and covers passing XML data to a Web Service. The samples are available in the sandbox of our Web site. A list of links is provided at the end of the article.

OpenLaszlo 4.0
OpenLaszlo is an open source platform for developing and running RIAs. It's backed primarily by the company Laszlo Systems. The programming language is LZX (XML and JavaScript). Applications can either be compiled into a single SWF with some limitations (for example, no Web Services) or to Java servlets that generate the code during runtime on-the-fly. Besides generating a Flash GUI, OpenLaszo supports the generation of DHTML front ends. Development in OpenLaszlo can be done in different IDEs. My favorite is the spket plug-in for Eclipse. However there's no graphical designer for the GUI.

First, I create the application consisting of a window and three tab pages (no intro page). I create a new project and a new file called prognosclient.lzx. I only place one label, field, and help button on the first tab page (see Figure 1). The help button is named that way so that, by passing it to the help Web Service, the appropriate help text is returned. Since I need to display the help information I also create a helpwindow.

As a next step I define the SOAP interface for accessing the Web Service. It consists of a SOAP element referencing the wsdl with the wsdl attribute. For each function of the Web Service a remotecall element has to be defined with an ondata handler that is called when data is returned from the Web Service. In our sample the returned data is shown in the help window. The arguments are passed to the Web Service as XML strings. I create a createHelpXML function that takes as an argument the ID of the help item and returns the XML string to me. The only thing left is calling the help when clicking on the info button. This will be achieved by an onclick handler that calls the createHelpXML and passes it to the Web Service (see Listing 1).

More Stories By Arthur Hefti

Arthur Hefti is CEO of CATsoft Development GmbH in Zurich. He has been working with PowerBuilder since version 3 and taught dozens of PowerBuilder training classes. He and his team create custom-made client/server and Web applications using XML, Web Services, and encryption.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.