Achieve your business goals with modernized environment! Based on MainTrend’s proprietary toolset, automated conversion as a replacement methodology saves all the investments in business knowledge and opens a way to maintenance and further development in the new environment.
IntroductionFor many years PowerBuilder was one of the most serious and robust Rapid Application Development tools for Client/Server and n-tier development. Reliable high-performance PowerBuilder applications are deployed worldwide. Software firms invested in PowerBuilder frameworks, resulting in billions of PowerBuilder code lines written by thousands of trained developers. Unfortunately, PowerBuilder is now a niche player in the application development tool market. Even PowerBuilder’s attempts to make inroads in the .NET development market have not significantly increased its development tool market share. The number of new installations is diminishing. PowerBuilder professional personnel are becoming scarce.
Enterprises with deployed active PowerBuilder applications need to both maintain their current systems, and provide solutions for dynamic changes and enhancements. Enterprises are at a point where they have to make a strategic choice: to continue building and updating applications in PowerBuilder where there may be little future, or to move to another platform.
Remaining with PowerBuilder causes no upheavals but insures the widening of the legacy gap.
Moving to another platform is probably strategically correct, and has serious implications:
How to prevent the loss of the investment already made in the legacy applications.
How to reduce the almost prohibiting cost of the new application development.
How to ensure a rapid and smooth migration from one infrastructure to another without disturbing critical systems; specifically how to integrate the new with the old.
More and more, organizations are being urged to move their PowerBuilder applications to a modern thin-client environment.
There are 3 main options:
Face lifting (a strategy provided with the new PowerBuilder versions)
Manual rewriting from scratch
Face lifting uses the existing PowerBuilder application as a back-end, and therefore does not really move it to a modern environment.
Rewriting PowerBuilder applications from scratch is a very costly, time consuming process and may lead to a long learning curve for the end-users. Another significant point is that legacy applications and maintenance changes are not always well documented. Even when original system analysis documents exist, the risk of business knowledge loss is very high.
Automated conversion (with some minimal manual intervention) as a replacement methodology saves all the investment in business knowledge and enables further development and maintenance in the new modern environment.
This document presents the migration process suggested by MainTrend in order to meet all aspects and challenges of migrating PowerBuilder applications to full thin-client Java or .NET applications.
The migration target is a pure thin client environment based on J2EE or .NET and AJAX methodologies.
In case of J2EE target the server side can be any J2EE container / Java Application Server, running on any Java supporting operating system (IBM WebSphere, BEA WebLogic, Oracle Application Server, Tomcat, JBoss, Sybase EAServer, etc.).
This architecture provides centralized application management and does not require any additional software to be installed on the end-user workstations:
Application changes that are made to the XML definition files (database access definitions, GUI definitions, etc.) are available immediately.
Business logic changes, encapsulated within application server components, are available immediately after installation.
The database is accessed from the application server components.
Migration to another platform requires a number of factors to be considered:
Existing investment in legacy applications and the significant cost of new application development.
Ensuring a rapid and smooth migration path from one infrastructure to another without disturbing critical production systems.
Smooth and reliable transformation preserving all of the needed business logic. Maintaining legacy software business logic is the important part of an organization’s knowledge storage. The more valuable the encapsulation of the business logic software is, the more complex the process of its evolution.
More and more organizations are looking to move their PowerBuilder applications away from the thick client, proprietary environment provided via PowerBuilder, into the n-tier thin client environment provided by J2EE or .NET. In order to accomplish this, some organizations have attempted to manually rewrite their PowerBuilder applications. Others have used conversion tools currently available on the market.
Organizations that have already moved applications, or are investigating such a move, have had two options:
To manually rewrite their PowerBuilder applications.
To use conversion tools.
Each replacement methodology approach has its advantages and disadvantages.
Manually rewriting can produce very effective resulting code, which may exactly match the target environment. On the other hand, it is a very costly and time-consuming process and may lead to a long learning curve for the end users and for the maintenance team. In addition, the risk of business knowledge loss is very high, in that legacy applications and the changes made to them are not always well documented.
Automatic conversion is much faster, much cheaper, and also ensures that all the business knowledge is preserved. The resulting application is similar to the original one, so the learning curve for the end users and maintenance team is not as long as with a “rewritten” application. On the other hand, the resulting code is generated automatically. It may not necessarily be optimal for the target environment and for the specific application.
PowerBuilder as a migration source is the ideal case for a mixed approach.
A central element in PowerBuilder environment is DataWindow, a patented Sybase technology – very powerful object, concentrating almost all the data processing of a PowerBuilder application and almost all the visual representation of the application’s data. The PowerBuilder DataWindow object is one of the main reasons for the success that PowerBuilder has achieved as a software development tool. Usually in a PowerBuilder application DataWindow objects consume more than a half of the application building efforts.
MainTrend approach to the conversion is to include DataWindow objects in the full-automatic part of the conversion, while making all the other PowerBuilder objects’ conversion as flexible as possible to allow manual intrusion and rewriting of the objects’ methods if required. For .NET conversion target we use Sybase DataWindow .NET technology for PowerBuilder DataWindow objects.
Such a migration concept unites advantages of both approaches:
The original application is automatically reversed engineered.
All the DataWindow definitions (for Java conversion target) are automatically converted to JDataPanel XML definitions and corresponding Java classes (JDataPanel framework is MainTrend’s product for the J2EE environment; it is described here). In case of .Net target DataWindow definitions are used for DataWindow .NET objects.
All the other PowerBuilder objects are parsed and converted to corresponding Java or .NET classes.
All the target classes are generated in a match with the original inheritance tree.
All the attributes and method signatures of the original classes are automatically converted.
The bodies of all the methods in the generated classes contain generated script in target language, with the original PowerScript code included as a comment. This allows for easier manual rewriting where appropriate of these scripts and ensures effective resulting code, which exactly matches the target environment. This approach also prevents business knowledge from being accidentally dropped or omitted.
PowerBuilder to Java (PB2J) and PowerBuilder to .NET (PB2N) is MainTrend’s software engine toolset and set of methodologies that take an application coded in PowerBuilder and generates target application source code with a minimal need for a programmer intervention. Java and .NET as target environments allow maximum platform flexibility. They have proven themselves to be superior technologies as modern business application tools for highly reliable applications.
This migration methodology provides:
Rapid, accurate and valid way to migrate PowerBuilder applications to the new environment.
Low assimilation costs for the new application
The same productivity and more, in the new modern environment.
Almost no limitations for the target server-side platform.
Much lower cost and faster solution for the legacy applications’ migration path.
Flexible open-platform development environment. The applications can be further developed with the most cutting-edge development tools
Cross-application code reuse enabled environment and reduced maintenance costs.
Seamless integration with modern technologies and new approaches.
Migration Process and Solution Architecture
Generally the migration process has the following steps:
Detailed analysis. Selecting the target server-side platform
Verification and fixing of the source application
Export of all the PowerBuilder objects of the application to be migrated
Reverse engineering of the original application
Manual rewriting of the application classes’ method’s code when needed to achieve better performance
Preparing test environment
Database migration (if a new database platform is chosen)
Unit testing, including required database connection for the data access layer objects
External links migration (if any)
Code integration and thin platform adaptation. Application restructuring required for the thin client conversion model
Database integration and changes required for the chosen database platform
General graphical design; fine tuning of the resulting GUI in line with customer standards
Application integration testing and corrections
Building the production environment and implementing the new application in production
Trainings for the customer’s developers
The automated part of the conversion is covered by steps 3 through 6 and uses PowerBuilder Conversion Suite.
PowerBuilder Conversion Suite consists of these parts:
For Java targets: J2EE-based JDataPanel framework that allows future flexible and reliable development in the new Java-based environment, and which also includes an independent product for rich Form/Report design – MainTrend’s JDataPanel Designer. The framework supplies all the needed functionality that PowerBuilder DataWindow objects have, including database access, forms and reports. JDataPanel can be also used to create new Java applications, not just to convert existing PowerBuilder applications.
The PowerBuilder Converter itself, which translates each PowerBuilder application into a set of Java or .NET and XML modules.
Conversion and development methodologies, including best practices for the most effective manual completion and enhancement of the resulting applications.
We use the PowerBuilder “library export” functionality to obtain all the sources of PowerBuilder objects for the specific PowerBuilder library set. After the reverse engineering stage the code generation stage comes. All the DataWindow definitions are automatically converted to JDataPanel XML definitions and corresponding classes or used for Sybase’s DataWindow .NET objects. All the other PowerBuilder objects are parsed and converted to corresponding target classes. The bodies of all the methods in the generated classes have the original PowerScript code included as a comment. These methods are then revised in the manual completion stage, which also includes GUI tuning (based on the customer’s requirements) and database access tuning.
The PB2J / PB2N toolset uses a sophisticated concept of multi-level embedded parsers and template-based code generators. This concept allows use of different parsers for different parts of the scripts and objects’ types, and improves the conversion performance.
Visually the conversion process can be depicted in this manner (PowerBuilder to Java migration as an example):
Conversion Services and Pricing Model
MainTrend offers an automated conversion service that lifts PowerBuilder applications to Java/XML or .NET technologies while preserving the business logic base and user interface investments.
Most of the work can be done remotely. This reduces or eliminates most of the costs associated with travel and accommodation at the customer location.
The manual part can be divided between MainTrend and the customer or a third party conversion partner.
Varying options can be applied to the conversion projects, from full conversion to different “reverse engineering” stages and automatic generation of scripts to be used by customer’s developers as a tool for business logic capture, etc.
The business model can also vary, from fixed price projects to hourly based consulting. A mix of type models for different stages of the conversion is also possible.