Demo presentation text:
Today I will show you how Ispirer Migration and Modernization Toolkit 2015 can automatically migrate a PowerBuilder application to a .NET web platform.
First of all let’s look at the PowerBuilder application. It represents data from a Microsoft SQL Server database and sorts this data using a specific filter applied to the DataWindow object.
Let’s look through the source code of this application. There is a main window and some controls: statictext, singlelineedit, commandbutton, and DataWindow. Below we can see a definition of controls. When we click the button, the data is sorted by a specified criteria.
The application has a simple menu. The menu contains several main items - “File” with 2 sub items: Item 1 and Item 2.
And like every application, it has an item “About”. When we click «About», a window «simple about» opens.
Let’s look at the window «simple about». It is a window for the description of an application, and there is only a label with the text “This is a simple demo application”.
In the application we have a PowerBuilder user object “n_simple_demo_connectservice”. It contains settings and options for connection to a database as well as some methods and functions necessary for manipulation of errors during connection to a database.
There is also one DataWindow with PBSELECT to represent data from simple_demo table for Name and Age columns.
Let’s run the application and see how it works. There is a menu with menu items. When we click the item “About”, the window with the definition of the application appears.
There is the DataWindow with Name and Age columns. Below there is a filter for data sorting in the DataWindow. For example, we want to see names with the age equal to 19 – when we click “Show”, the sorted data appears and we can see only names with the age 19. I have just shown you the PowerBuilder application. And now I’ll show you how Ispirer MnMTK 2015 can migrate it to a web .NET application.
Before the migration of this application we need to extract all the sources from the PowerBuilder library. For this purpose we can use the PowerBuilder environment – Source Edit, or we can use an Ispirer tool PowerBuilder Extractor which you can find on our website in the Download section.
We have already extracted these objects from the PowerBuilder library. You can see, for example, the source code for the PowerBuilder DataWindow. Once the sources have been extracted, we should put them in one folder, SRC in our case. And then we need to run Ispirer MnMTK 2015.
For the migration of the PowerBuilder application we use Ispirer Migration and Modernization Engine. It is necessary to create a bat file – a command file to run the tool. Let’s look at the structure of this file.
First, there is a path to where Ispirer MnMTK 2015 was installed. The option /D=FIXED means that in this case we don’t need to migrate a database, it will remain the same. We see that the source is PowerBuilder scripts and the target is C#. /F Option is a path to where the sources are located. /DIR is the folder where the results of the conversion will be put and /INI option is a path to our configuration file SQLWays ini - in this file we put some options for specific needs of clients or options for a specific migration.
In our case SQLWays ini file contains only one option. It means that the UI will be built using ASP.NET pages.
Let’s run this BAT file. You can see that Ispirer MnMTK 2015 has started the process – all the files have been extracted, there are 6 files for the conversion. First, the tool selects the information about the dependecies of variables and any information that can be useful when we migrate the whole application. Once the information has been collected, the tool starts to convert each script separately.
The result folder has been generated and you can see that all PowerBuilder objects have been converted. It is SQLWays log file. Here you can see the information about the migration.
We can see that one application file, one data window, one menu file, one user object and two windows have been migrated. There are 6 scripts and it took only 40 seconds to complete the migration.
Let’s copy these conversion results to an empty .NET solution and run the application.
You can see that this application is written in Visual Studio 2010. Since we have added the migration results to an empty solution, the solution makes some dependencies and some references to these scripts.
Now we can evaluate how Ispirer MnMTK 2015 converts PowerBuilder objects. First let’s look at the main window. PB controls have been migrated to ASP.NET controls and PowerBuilder events have been migrated to .NET events.
Simple menu has been converted to a standard ASP.NET menu with items “File” and sub items “Item 1”, “Item 2” and a menu item “About”. When we click “About”, a page «Simple about» opens. This page contains the information about this demo application.
The PowerBuilder user object has been converted to a C# class with the information about the connection specified, and PowerBuilder functions have been converted to C# methods.
DataWindow is included in the main page as a control. DataWindow has been migrated to GridView with columns to represent names and age, and PBSELECT has been converted to a standard SELECT of Microsoft SQL Server.
We can run this application and look how it works now in a .NET environment.
The view is the same as in PB - it has a menu with 2 items. We can click «About» and we see that the «About» page with the description of our application opens.
Let’s check how the filter works. For example, we want to see names with the age equal to 25. Let’s click “Show” and we can see the sorted data.
The functionality of this application is the same as in PB.
As you can see, Ispirer MnMTK 2015 can automatically convert your application from PB to a web .NET environment. If you are interested in our toolkit or services, please contact us. Thank you for your attention.