• Cases
  • Softacom Transformed a Delphi XE4 System for MSSQL, PostgreSQL, and Linux

Softacom Transformed a Delphi XE4 System for MSSQL, PostgreSQL, and Linux

  • Industry

    Software Development

  • Project type

    Software modernization, Software migration, Software development

2510409

lines of code

9

months it took to finish the project

500+

unit tests cut post-release defects by 50%

30%

of the process was accelerated by automation

Description

Softacom was contacted by a large enterprise that develops software solutions tailored to a range of business needs, starting from solutions to manage and automate finances, HR, accounting, and payroll to solutions for warehousing management and production process management. 

The company approached Softacom to modernize its technology stack and enhance its testing capabilities. Moreover, their app needed to be compatible with multiple database systems and provide multi-platform and multi-user support. The goal was to improve and optimize the business performance.

Facing similar compatibility issues with outdated Delphi systems? Let us evaluate your architecture!
Get a consultation
Challenges

The company faced several challenges that could damage its progress and scalability. 

  • The outdated data access technology no longer met the demands of modern systems and needed to be upgraded to use modern and powerful database access components.
  • Without a unit and integration testing framework, ensuring reliability across applications became challenging.
  • The MS SQL database required careful modification to ensure smooth compatibility with the existing Microsoft SQL Server (MSSQL) and to support the addition of a PostgreSQL database. 
  • The adaptability to diverse environments, such as Linux, was restricted because of a lack of multiplatform support. 

Multi-user functionality was required to meet the growing needs of users. 

Solutions

The company was seeking to modernize its database access layer, business logic, and runtime, as well as reduce the technical debt. After analyzing their request, we offered solutions to address the client’s challenges. We designed a modernization plan.

The Softacom team assessed the entire codebase of the Delphi XE4 app, consisting of 2510409 lines, along with its database and infrastructure. After the analysis, the following results on the application statistics were received:

  • pas-files (incl. 3rd-party components): 3698
  • pas-files (excl. 3rd-party components): 3395
  • dfm-files (incl. 3rd-party components): 666
  • dfm-files (excl. 3rd-party components): 666

Statistics of existing DLL:

  • Total units: 353;
  • Total lines: 1 416 608;
  • pas-files (incl. 3rd-party components): 353;
  • pas-files (excl. 3rd-party components): 117;
  • dfm-files (incl. 3rd-party components): 33;
  • dfm-files (excl. 3rd-party components): 33;

Statistics of DLL with code related to data only. Code that needs to be migrated to Linux:

  • Total units: 235;
  • Total lines: 769434;
  • pas-files (incl. 3rd-party components): 235;
  • pas-files (excl. 3rd-party components): 59;
  • dfm-files (incl. 3rd-party components): 20;
  • dfm-files (excl. 3rd-party components): 20.

The application was used for day-to-day payroll & HR activities. 

As we worked on the project, it became clear that the client had limited familiarity with certain aspects of their application. This required our team to conduct extensive research to fully understand the system’s architecture and functionality.

Our team identified several complexities in the modernization process:

  • Delphi XE4 intricacies – to better understand how its specific implementations affected performance and maintainability. 
  • Database migration risks – to transition from the legacy database access layer to UniDAC for MSSQL and PostgreSQL. It required evaluating differences in SQL dialects. For example, string functions – LEN() in MSSQL and LENGTH() in PostgreSQL, or auto-increment columns – IDENTITY in MSSQL and SERIAL in PostgreSQL. 
  • Concurrency handling – PostgreSQL manages transactions differently than MSSQL. So, when moving to it, poorly optimized transactions could cause performance bottlenecks. Our team needed to conduct a careful compatibility assessment of queries, functions, and procedures.  

To bring the software to modern standards:

  • The Softacom team of developers replaced the outdated database access technology with UniDAC. This replacement helped make the library compatible with MSSQL and PostgreSQL databases and addressed varying database behaviors. 
  • Converting large datasets and keeping the app operational at the same time is challenging. To balance these processes, we used several approaches, such as Change Data Capture (CDC) and Dual-Write Mechanism. 

“CDC allows for real-time synchronization and reduces downtime. It also works well with large datasets because it doesn’t require bulk transfers. The dual-write mechanism ensures data consistency, minimizing loss and enabling a gradual migration.”
– Project Manager

  • The Softacom team transformed the software into a multi-platform solution by adding support for Linux. It required an evaluation of the existing codebase to determine which parts could be migrated and which needed to be re-engineered. Since Delphi XE4 doesn’t provide support for Linux, our team refactored the Windows-specific parts of the app to make it compatible with Linux. That included rewriting 769434 lines of code. The Linux support ensured adaptability across diverse operating systems. 
  • To enhance code optimization and streamline debugging, we developed a unit testing framework, which would maintain development and mitigate risks in future iterations.
  • We also automated part of the migration with our in-house database conversion tool. It accelerated 30% of the process, which allowed us to finish the project 3 months earlier

The whole project took 9 months to complete.

Want to test our AI Migration Tool on your code?
Analyze your code

Outcomes

  • The migration to UniDAC reduced query time by 35% and eliminated database-specific errors, while 500+ unit tests cut post-release defects by 50%.
  • The migration to UniDAC enhanced the software’s compatibility with MSSQL and PostgreSQL databases. 
  • Linux support enabled operations across multiple operating systems, such as Windows and Linux. This increased flexibility by allowing the application to run on various Linux distributions, such as Ubuntu, CentOS, and Debian. The modernization allows the company to attract more clients. 
  • The modernization also reduced technical debt by approximately 40% and made the system easier to maintain and scale.

Before and after comparison of a legacy software modernization project along with post-migration results.

 

Ready to modernize your Delphi system?
Get a consultation

Subscribe to our newsletter and get amazing content right in your inbox.

You can unsubscribe from the newsletter at any time

This field is required
This field is required Invalid email address

You're almost there...

A confirmation was sent to your email

confirm your subscription, make sure to check
your promotions/spam folder