Thursday, 24 August 2017 12:54

Code Modernization: Focus on Powerbuilder

Written by

PowerBuilder, with its ever-popular DataWindow IDE feature, and strong client-server orientation, is still an important coding mechanism.  It has fallen out of favor in recent years, however, and its codebase has been neglected and moved to Sybase, then to SAP, and now to Appeon. Due to a few missteps along the way, and a late.NET capability addition, many companies are choosing to discontinue their use of PB and move to newer platforms. 

 While an upgrade to the most recently released PowerBuilder 2017—from Appeon—is feasible,  a successful update from older PB versions is difficult, and this fix does little to address fundamental uncertainties regarding continued support for the platform or its questionable relevance in the future. However daunting upgrading to Java or C# may seem, it facilitates the integration of transitioned applications into today’s multi-tiered environments and provides access to the tools and techniques of more modern software development platforms.  This type of modernization demands great care, and necessitates a carefully modeled approach that incorporates the strengths of the platform’s client-server database-oriented support, while still providing the advantages of the latest coding environments.

The TSRI Approach

Comprehensive PowerBuilder support is a robust new addition to TSRI’s  ever-growing conversion capability repertoire. Our experience developing code transformation pathways spans over two decades and more than 100 man years of concerted effort by leading experts. The resulting, fully automated modernization toolset, JANUS Studio®, has the ability to transform applications of any size from languages such as PowerBuilder to targets such as Visual Basic .NET, Java, C++, and C#. TSRI’s near 100% automated transformation technology can ingest more than 32 legacy software languages to produce native, uniform, object-oriented and human-readable target code in a client’s language-of-choice. TSRI’s JANUS Studio® toolset also transforms the underlying databases and user interfaces into multi-tiered modern environments, as well as documenting and re-factoring the modernized application using the same fully automated technology and model-driven approach.

PowerBuilder transformation can be problematic, and is complicated by the inclusion of a mix of UI and business logic in single PowerBuilder files and support of Object Oriented programming through inheritance. To handle these issues, TSRI translates the UI components in the file into HTML and the business logic code into server side code—such as Java. To manage the inheritance issues, the event handlers are wired with HTTP requests/responses, AngularJS2, and RESTful services automatically through a naming convention that may be based on PowerBuilder source file names to retain consistency in service calls.

A PowerBuilder Transformation Case Study

In 2010, TSRI worked with Navigant Consulting Services to modernize the Corporate Maintenance & Stop Loss System for Blue Cross Blue Shield (BSBS). This legacy system was written in PowerBuilder and Magna-X. with a modernized target language of Java.

TSRI’s engineers first adapted the JANUS Studio® toolset by building gateways for PB and Magna X into JANUS Studio’s® Intermediate Object Model (IOM) framework.  Following upon some additional optimization of the toolset, the modernization task itself was executed upon and the existing, sophisticated functions of the Janus toolset could be leveraged to apply a range of updates and refactoring, including but not limited to documentation, code transformation, re-factoring  (fully- and semi-automatic), and hyper-linking “as-is” and “to be” documentation for side by side comparison. Specific tasks and requirements were tailored to address client need and the necessities of the transformation situation, and these capabilities were retroactively applied to during an iterative and wholistic transformation process.  Modernization of the 187K lines of PowerBuilder code and 50K of Magna X code was completed in 15 months. Both Navigant and its client were pleased with the efficiency of the result, and anticipate additional modernization projects.

Since this project, TSRI has completed the modernization of very large, complex PowerBuilder systems for the US Navy, tax systems for a European government organization, and others.  The modernization process is fully automated and even allows for automated generation of responsive web-based screens in a multi-tier architecture using Bootstrap, AngularJS, and/or other frameworks of a customer's choice.

Modernization Process

TSRI employs JANUS Studio® for all transformation projects. This begins with taking the source language provided by the customer and parsing it to create an Abstract Syntax Tree Model (ASTM) of the legacy language. The ASTM is then transformed into an Intermediate Object Model (IOM) before being transformed into the final language. Use of this modeling format ensures that every code transformation takes advantage of the body of developmental progress associated with TSRIs hundreds of prior projects and the hundreds of millions of lines of code that TSRI has translated to deliver upon those projects successfully.

After code conversion is complete, JANUS Studio® transforms user interfaces and database schema to new targets such as webpages and relational databases. Finally, TSRI can use the JANUS Studio® toolset’s refactoring capability to perform both dead and redundant code elimination, as well as other specialized pattern-based refactoring according to the customer’s preference.

Read 8310 times