Power to Build

Home » Misc » PowerBuilder – File Types (extenstions)

PowerBuilder – File Types (extenstions)

I felt our current build process of our PowerBuilder application is kind of degenerating. This, I feel, is partly because of the lack of understanding of various parts/files in PowerBuilder. Here is a message I sent to our team recently. We have a large PowerBuilder application deployed to EA Server. We use Powergen to generate the bootstrap the PBL files and use PowerBuilder to deploy to EAServer. Our Source Control System is PVCS. I hope it helps anyone in a similar situation. All our sources are in Z: drive, which is just a substituted drive letter for C:\LA_SOURCE.

Lately, we have seen a lot of new targets being added, in our application. Where as, this is the right way to organize PB code, it adds an extra work for the build master. This is a very labor intensive process. Here at work, we use Powergen to build our application. For each new target added, we need to update Powergen scripts to make sure the object is picked up during the bootstrapping. We also need to make the workspace is up-to-date with the new target added. Otherwise, though the new target is included in the build, it won’t be deployed.

I sent this note to our development team recently. This may be helpful, if anyone works on a similar application, deployed to EAServer. This will cut down lot of back and forth and will only help us expedite the build process. You can skip the SRJ files, if you are not deploying your PowerBuilder application to EAServer. Also, skip Powergen parts, if you are building/deploying using PowerBuilder. Also, we use PVCS at work. This discussion is still applicable, if you are using a different Version Control System.

1. Target (PBT)

When you add a new Target, make sure you are connected to PVCS. The target is another file (.PBT). This needs to be checked in as well. So, if you are adding a new target or adding new libraries to an existing target, it needs to be checked out and checked back in. Make sure your target file is up to date. You can open the PBT file in any text editor. If your application is client/server (doesn’t involve EAServer), then you may only be dealing with client (Windows Exe) target(s).

2. Workspace(PBW)

If you are adding a new Target, the workspace file (.PBW) that we have for each module in source folder needs to be updated. This is what we use during Build. Otherwise, your new target/objects will not be deployed in the release.

3. PBG file
Any components you add to the libraries then will be added to PBG. PBG file is created for each PBL and is a laundry list of the objects in that library for PVCS to use. Anything you add/remove/change will be in the PBG file and this is what is used to sync up with PVCS.

A PBG file is automatically checked in and out when you are adding/changing objects in a library (provided you are connected to PVCS). You will see some messages to this extent while you are checking in other objects.

If you are done with checking in new objects for a library/target, open the PBG file in the source folder (created in the same folder as PBL file) in any text editor to check if it’s up-to-date.

If for some reason, your PBG is out of sync with the one in PVCS, you can lock it in PVCS and check it in directly from the source folder.

4. PBL file

You do not (should not) have to check in PBL file. We generate these during the build process. We have done this in one of the companies I worked at. This defeats the purpose of Source Control. Sure, you can get all PBLs for a particular release and rebuild it, but you are no longer relying on the Version Control System. We are just using it as a backup storage!! It’s almost like creating dated folders for each release.

5. Project File(s) – SRJ

This is required for all targets deploying to EA Server*. The project file contains the deployment information (sort of like an Ant script for Java code) for the component(s). Typically, if you are adding a new target, you need to add a new project. We use the convention to prefix such objects with p_d_.. Depending on whether your new objects/components will be called from outside, you may also need to add a proxy project (we prefix them with p_p_) as well, so proxies can be generated and/or updated. Typically, you will want to run the p_d first, so your components are deployed to EAServer and then run the p_p to get the updated proxy information.

* The project file is also needed for other types of components such as EJB, .Net, Web Service clients.

Please see my post about using PVCS properly, for additional notes.

Comments, please?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: