For five years now, our team is working on the preparation to migrate Berger-Levrault’s apps. To ease framework’s transition to new standards, we created Casino. A homemade tool to assist in future migrations.
Casino, what’s that?
It’s an innovative tool to simplify the migration process by automatically transforming apps code. We explain below the four steps represented in the animation.
1st step: read and simplify the source code
As it is text, it’s complicated to work on the source code of an application. To simplify the source code process, the flying saucer (representing the VerveineJ tool) read the source code of the original app, parse it, and produce the Application Model. This model allows one to represent the main lines of the original app: classes, methods attributes.
2nd step: extract elements of interest to migrate the app
Among the original app’s source code, only some aspects can be processed by Casino. These are the elements of interest. Within these elements, we find the visual code, the behavioral code, and the business code. Here, we’ll only speak about visual code in the app front-end and business code in its back-end.
3rd step: matching old and new code
For the visual code, Casino builds a dictionary to link the old code to the new one. It matches the visual elements of the original application into the migrated app to get the same result at the end. So, a GWTButton will be equivalent to an Angular Material Button, a Swing Panel to an Angular Material Card.
The same principle is used for the business code concerning DTOs and Services. Casino creates new Angular classes to match DTOs from the original app, and RMI’s or RPC’s Services are mapped with futures Rest Services.
4th step: code generation
Once the mapping is set up, Casino visits all the elements of interest found in step 2, then it refers to the dictionaries created in step 3 to generate the code of the migrated app. After the generation, developers have to check if the process went well first, then, they have to complete the migration by injecting their knowledge into the application such as business logic, and recreating links between DTOs/Services and the visual part of the app (HTML).
Casino’s purpose is to help in the migration process of all desktop or client/server applications. At the moment, the tool works especially well with Java’s apps, but it is also adapted for other programming languages and can be extended to support even more.