This topic describes how to refactor an application by moving some modules to a new application and, this way, split the original business logic into two different applications.
In this example, the modules that integrate with PayPal are going to be decoupled from the eCommerce application to be autonomous and widely used by other applications. This way, the PayPal extension and PayPalGateway modules are going to be moved to a new application, the one which will provide PayPal services to other applications.
In the visual development environment, open the detail of the eCommerce application and look for the implementation of PayPal integration which is already separated in the following modules: PaypalGateway and PayPal (extension).
The refactoring of applications depends on how they are designed, but it usually starts with the following procedures:
In the above procedure, and unlike traditional development environments, OutSystems Platform and its TrueChange capability greatly simplify the refactoring effort, providing real-time impact analysis and guiding developers through the refactoring process.
Once the business logic is isolated in new modules, i.e., separated from the rest of the business logic, you can move those new modules to a new application to attain an autonomous development cycle.
Create a new application as follows:
Go back to the Applications screen and open the eCommerce application to list all its modules again.
Hover the mouse over the PayPalGateway, click on the ▼ button, click on the 'Move to Another Application' option, and choose the PayPal Services application as your target application.
Follow the same procedure to move the PayPal extension to the PayPal Services application.
With all PayPal modules isolated into the PayPal Services application, you can now propagate this refactoring to the other environments in your infrastructure by deploying the PayPal Services application to those environments. For example, to propagate it to Quality Assurance do as follows:
After the deployment is finished, the refactoring is done in the Quality Assurance environment.
Deploy an Application with Dependencies
Plan a Deployment for the Operations Team