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

Related Topics: PowerBuilder, Java IoT

PowerBuilder: Product Review

Embracing Web Technologies

PowerVCS: Version Control System from the Makers of PowerGen

Enterprise Architecture on Ulitzer

Presently, I am the administrator of SCM AllFusion Harvest. SCM AllFusion Harvest is a process-based Software Configuration Management (SCM) tool for managing application source code. I manage 130 applications housed in SCM AllFusion Harvest and support 200 users using the product. The development tools we currently use are PowerBuilder PBV8, PBV11; Visual Studio 2003, 2005, 2008; and Eclipse Europa.

As the Software Configuration Manager (SCM), I provide the administration of the source code management tool. This includes creating the Harvest environments, developing life cycles, environment phases, processes, users, user groups, access to environments, loading repositories, documentation; maintaining build machines; providing best practices and training all users on proper source code management using the development tools in our environment.

This article focuses on a newly released version control system, PowerVCS, by E. Crane Computing. I am a fan of this product because this company makes great, easy-to-use products right out of the box. Many may have gathered from previous articles that I am not a fan of products that have too much overhead. By overhead I'm referring to the fact that they are too scientific for their own good. The easier the tool is to use, the more likely that folks will use it, especially if it integrates seamlessly with other products. PowerVCS falls into the low overhead product category for me. This is a very easy product to use.

PowerVCS is designed as a true web application; all of the version control functions can be accessed with just a browser. It also includes a Microsoft SCC-API compliant plug-in for the PowerBuilder IDE (and others) and a command-line interface. I don't use the command line that often but I like it for mass checkouts, and it's good to have this option available.

PowerVCS is a simple version control solution that requires minimal setup and administrative effort. User training is not required due to the ease of use. It is a perfect replacement for Object Cycle, which is no longer offered by Sybase, but which was a good solution for many PB development shops. It also presents a good growth path to those using PBNative, with its extremely limited source control capabilities. (For example PBNative does not allow you to maintain multiple revisions of a source file.)

To me this is what source code management is all about: securing, controlling and retrieving historical source and maintaining the history of your applications. Every tool should be able to do this at a minimum, otherwise what's the sense? PowerVCS is a great way to implement a source version control system for the first time because it has low overhead.

Surveys have shown that a surprising number of PB development efforts use no source control at all. That to me is nothing less than unprofessional.

There is really no need for that when there are so many options and tools available today. Folks have to remember that your source is your family jewels; it's your profit at the end of the day, the history of your applications in the event of a disaster - protect it, secure it and control it. Information is power and in my opinion there's nothing with greater value than your source code.

Source Control Model
PowerVCS organizes source files in projects that consist of one or more directories and sub-directories in the mySQL Repository. When you add a file to the repository, it's assigned version 0. As changes are made and checked into the repository, the version is incremented by integer values. At any time a project may consist of files of many different versions. If you want to save the state of a project at a given point, you assign it a label, for example, "Release 1.0 Beta". You can retrieve a project based on the label to reproduce the project at the moment the label was assigned. This is exactly how good version control tools should work.

PowerVCS uses a lock-modify-unlock model where files checked out to one user may not be checked out to another until the first has completed modifications. A file, which is checked out, may be "released" to give up the lock without applying any changes. In this case the file reverts to its pre-checked out state. If a file is checked in and found to be unchanged as the originally checked-out file, the lock is removed, but the file reverts to the original version. No new version gets added to the file.

PowerVCS uses standard web technology. The Repository uses mySQL, the standard open source DBMS, to store all source revisions (in compressed form) and the source control metadata. The web server scripting is PHP. These choices allow the web hosting to be provided from the widest possible selection of hosting services, keeping costs to a minimum.

E. Crane is hosting the web and customers' repositories in a cloud computing environment from RackspaceCloud. This environment is extremely secure, is backed up automatically, and scales easily to the largest repositories.

Browser Interface
PowerVCS can be accessed from a browser with no additional software required. This interface presents several resizable panes that show the project folder structure, files in a selected portion of the repository, and the version history (or labeling history) of a selected file. The interface is very responsive due to judicious use of AJAX technology. For example, when a new file is selected, an AJAX transaction queries the server for the file's version history and refreshes just the pane showing the history. The status accounting is pretty slick and produces some good metrics on use and file history too (see Figure 1).

When an operation like Check Out is selected, a second window opens (see Figure 2).

When the operation is completed, the main window is updated (via AJAX) and an output message with the results of the operation is shown. As a result of this design the main window does not require a (potentially time-consuming) page refresh.

PowerVCS' browser let's you perform all basic version control functions (check-in, checkout, add, get, undo checkout, remove, label) and provides other useful functions and reports. For example the Find function let's you search any part of the repository for files containing a specified string (see Figure 3).

There are also reports showing differences between labeled states of the Project. For example, if you had labeled the initial load of the Project as "Baseline" and had since labeled the Project "Maintenance Release," PowerVCS can show you which files changed between the Baseline and Maintenance Release. You can select any file and see the line-by-line differences between the two versions of the file. I personally can never get enough information. The more granule the better, especially if you're ever dealing with the corruption of a file. To be able to get all the information needed to isolate in on a version of a file that is corrupt is invaluable knowledge to have at the ready (see Figure 4).

Other functions let you report differences between any files and files that are checked out to an individual.

Command-Line Interface
PowerVCS offers a straightforward command-line interface that accesses all its source control functions.

Each command line begins with the name of the command-line program, PowerVCS, followed by a function designation, usually a two or three character mnemonic. The rest of the command line consists of one or more parameters, each specified with a unique flag, a hyphen followed by one or more characters (no spaces), for example -u for username. The flags are not case sensitive. In some cases the flag is followed by an argument required by the parameter, for example -u alans, indicating a username of alans. I like the flexibility of the command line for running large mass checkout's from a given repository.

An example command line:

PowerVCS get -f pbexamd1\*.* -t C:\dev\pbexample\pbexamd1 -r -p -l Baseline

gets all files from the pbexamd1 folder of the current project and saves them to a folder on the local disk. The -r flag indicates the get should recurse the subfolders of pbexamd1, the -p flag indicates that the folder structure should be preserved on the local disk, and the -l Baseline flag specifies that only versions that are part of the Project labeled "Baseline" should be retrieved.

PowerBuilder Emphasis
PowerVCS is being released initially in support of PowerBuilder development. Although it uses standard interfaces, such as the Microsoft SCC-API, that will allow it to run with any SCC-compliant development environment, testing and performance optimization have been focused on PowerBuilder.

E. Crane has developed extensive expertise in PowerBuilder source control issues having developed tools for that community for 15 years. You will be able to talk to support people who understand PB. This is the kind of support you need when issues go beyond your own knowledge base; you have a number to call and a person to speak with who is knowledgeable. This allows you to get problems fixed expeditiously to get developers back to work.

PowerVCS' documentation includes a step-by-step guide (available on the web site, PowerVCS.com) for using PowerVCS with PowerBuilder. Topics in the guide include "PowerBuilder Source Control Concepts and Complexities," "How to Set Up PowerBuilder for Source Control with PowerVCS," and many others to specifically help the PB developer.

The documentation also describes how you can use PowerVCS with PowerGen to automate the build process. (PowerGen, also from E. Crane Computing, has been used to automate the PB build process for thousands of applications since PB v4 and provides a very stable and robust build environment.) In the documentation you can see how to restore a previous release of an application using the combination of PowerVCS and PowerGen, synchronizing your application to the latest checked-in objects and other topics of interest to those managing build and configuration control for PowerBuilder

PowerVCS also includes PBDelta as the default source-differencing tool that is invoked when a PowerBuilder user selects "Show Differences" from the System Tree menu. PBDelta has the unique ability to parse PowerScript and highlight differences on the basis of logical blocks of code, even within individual lines of code. This makes it invaluable when comparing DataWindow syntax and has made it a standard in PowerBuilder shops.

PowerVCS is sold on a subscription basis of $15 per user per month. Support (and a copy of PBDelta) is included in the subscription fee. PowerBuilder developers receive PowerGen at no extra cost with any commitment of five annual PowerVCS subscriptions. I have reviewed PowerGen in a previous article and our environment has been using PowerGen with PowerBuilder for many years flawlessly.

E. Crane is addressing several areas for improvement. A SQL interface to the repository and many more canned reports are coming in the future. Status accounting provides valuable insight into your development environment and having these metrics available only adds to the total quality management of your development environment. The current release (v1.0) has only been certified with Internet Explorer. FireFox will be supported in the future.

I like E. Crane products and we use several in our shop. I found this product easy to use with a straightforward GUI. Its make use of standard SCM activities and functionality, integrates into PowerGen to automate builds, and offers command-line functionality. PowerVCS is a new product but is unique in its PowerBuilder emphasis. In a larger context it holds great promise because of its embrace of web technologies. It's a simple, affordable solution that I think is worth a look.

Our Experience
We develop and maintain a variety of applications at the State of New Hampshire's Department of Information Technology (DoIT). The applications are used extensively in our welfare and health services delivery agencies. Example applications are for child-care licensing and managing adult and elderly care. Throughout the state the applications are utilized by hundreds of users.

More Stories By Al Soucy

Al Soucy is software configuration manager at the State of New Hampshire's Department of Information Technology (DoIT). In that role Al manages software configuration for dozens of PowerBuilder applications as well as applications written in Java, .NET, and COBOL (yes, COBOL). Al plays bass guitar, acoustic guitar, electric rhythm/lead guitar, drums, mandolin, keyboard; he sings lead and back up vocals and he has released 8 CDs.

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.