Welcome!

PowerBuilder Authors: Chris Pollach, Yeshim Deniz, Jayaram Krishnaswamy, Kevin Benedict, Avi Rosenthal

Related Topics: PowerBuilder, Microsoft Cloud

PowerBuilder: Article

Converting a PowerBuilder 10.5 Client/Server Application to PB 11 Web Forms

Using .NET Interop and Web services

As a long-time PB developer, I have successfully created or maintained many PB applications for clients and for myself. Since day one, I was impressed with the ease with which applications can be created using PowerBuilder. Although I had been exposed to Visual Studio and other client/server tools, I have always felt PB was the better product. Even when I had to code GIS mapping functionality using OLE automation and there were no PB examples, I was able to find VB code examples and figure out the PB equivalent. I have also developed PB functionality for SAPI, TAPI, SMTP, and VoIP.

I have looked forward to each release of PowerBuilder and I must admit the latest release has me very excited. The idea of converting our client/server applications to be Web-based would have three major benefits: prospective users from around the world could try out our products at their convenience without waiting for a demo to be downloaded or mailed to them, program revisions and bug fixes are instantaneous, and we could start a subscription service that would find a whole new group of users who cannot afford to purchase programs costing several thousand dollars but could afford a low monthly fee.

Therefore when the PB 11 beta was released we wanted to prove the technology worked by converting one of our applications to PB 11 Web Forms or Windows Forms. The program we chose is an emergency alert system that lets users send text messages, e-mails with attachments, and voice messages to a selected group of users.

Preparing for my task, I attended an Ottawa ISUG User Group meeting to pick John Strano's brain, looked at Bruce Armstrong's examples, and scoured the Sybase newsgroups. My thought was that the fastest way to get on the Web would be a direct migration to Windows Forms. The migration was very easy; however, when running the app the response time was slow because the database connection was on the client computer. I determined that Windows Forms would work best for our intranet applications but to achieve the goal of creating our first data-driven Internet app, Web Forms seemed like the best choice. However, going this route meant some functionality would have to be replaced with equivalent .NET classes. I was also determined to reuse as much as possible from the 10.5 application. Here's how it was done.

This application is not a very complex one (see Figure 1). It has a tabbed interface, uses treeview and regular DataWindows, and is written in PB 10.5 PFC (Unicode version). PFC use is minimal and limited to DataWindow column sorting and control resizing. E-mail and text messaging were implemented using PBNI SMTP (see Listing 1) and voice messaging using a third-party OLE TAPI control with telephony-compliant hardware (see Listing 2).

More Stories By Mark Luckasavage

Mark Luckasavage is executive director of PoliceSoftware.com, a New Jersey-based Public Safety company that provides software products for police departments, various public and private organizations, and branches of the homeland security department. He is also a PowerBuilder consultant who has worked with PB since PB 2.0a. All of PoliceSoftware.com's programs are coded in PB 10.5 PFC and use Sybase SQL Anywhere.

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.