PowerBuilder Conversion Target Architecture
The PowerBuilder application is migrated to a web application using an MVC framework (Spring or ASP.NET Core) on the server side and Angular component architecture on the client side.
Every window and data window in the original application has a corresponding view file.
On the server side, the converted application has a set of MVC controllers that represents each one of the windows of the original application; these controllers have endpoints to handle each one of the different interactions of the windows, and receive and return data in JSON format.
The client side is pure HTML with CSS, with a faithful-to-the-PowerBuilder-UI or--by modifying the generated CSS--a more modern responsive design. The implementation is compatible with all modern browsers and does not rely on any binary libraries or plug-ins.
Besides the controllers, on the server side the application has model objects that represent the elements of each one of the windows and are equivalent to the ViewModel objects on the client side. Mobilize.Net libraries written in Java 1.8 or C# take care of the synchronization of objects sent from the client side with the models in the server-side. They also handle logic to create instances of these elements and retrieve the necessary objects for each user’s session. The source code for these libraries is part of the migrated application.
Once a request from the client side is processed by a controller on the server-side, instances of the models for the current windows are created and the control passes to the business logic layer, where the actual logic of the application is (this is the logic that comes from the event handlers and functions of the original application).
This logic interacts with the model classes instead of the user interface.
The models on the server side replicate the hierarchy defined in the original application. Additionally, during the conversion of the application all the logic that accesses the database is modified to use JDBC or ODBC to connect to the database and execute any existing queries. This exposes a method for each one of the different queries in the application and is the only set of classes with direct access to the database.