Building a distributed application
Deploying the PB Client

Building the Client application executable

Open the pbaccess application in pbaccess.pbl. Click on 'Project' icon in the toolbar and select 'New'. In the dialog that appears select 'Application' since we intend to create a normal PowerBuilder application executable. This will bring up the Project painter with a new untitled project.

For the build options un-check 'Machine Code' to generate the executable in p-code. Of course, you may also choose to build the executable with compiled code, but I've found compiled code to be buggy when using the datawindow state functions. More over, the performance gain is usually marginal. For this example we need not compile any PBLs into PBDs. We'll keep things simple and just put everything into a single .EXE file.

Specify the executable name as pbaccess.exe and hit the 'Build' toolbar button tbbuild.gif (921 bytes) to generate the executable.

 

Choosing the Deployment DLLs

Again, based on Chapter 33 of Application Techniques I was able to figure out that we need to deploy the following DLLs on all 32 bit Windows clients-

  1. PBVM60.DLL
  2. PBDWE60.DLL

These DLLs can be found in the Deployment Kit, which can be installed from the PowerBuilder installation.

Note: We do not need any database middleware on the client. This is because the client application never accesses the database directly.

To test if the client application was compiled correctly and to verify if these DLLs are the only ones needed, copy the DLLs to the same directory as pbaccess.exe, fire up the server application, and run pbaccess.exe.

 

Packaging the Client application for distribution

There are many tools available in the market to build installation programs. The best one - InstallShield, comes packaged with PowerBuilder Enterprise. You can find it on the PowerBuilder CD ROM. InstallShield does take some learning, so for simple installations you might still want to use InstallBuilder that used to ship with PowerBuilder 5.0. There's also a unsupported InstallBuilder 6.0 version available on Sybase' website.

In any case, make sure that your installation program -

  • Includes pbaccess.exe, pbaccess.ini, pbvm60.dll, pbdwe60.dll
  • Installs all the files on the user machine
  • Makes sure that pbaccess.ini, pbvm60.dll, pbdwe60.dll are available in the application path for pbaccess.exe. You can install the pbaccess.ini and the PowerBuilder run time DLLs in the same directory as pbaccess.exe.

Note: Make sure that the 'Location' property of the ConnectionObject points to the correct IP address. During our development phase we had used the special 'localhost' IP address. But in the production environment it should be the actual IP address of the server. It's a good idea to store the connection information in the Windows registry or an .INI file, just like you are used to storing the database connection information.

 



Introduction

Strategy
Building the monolith
Building the DPB Server
Building the PB Client

Setting up the DPB Server
Deploying the PB Client

Points to Ponder
Where to go from here

 DownloadDownload the application

What's Next?

 

Related Links:

Follow Me Download InstallBuilder 6.0l

Previous  Next Home
1