Are there any tools to convert my Delphi application code to a more modern language?Are there any tools to convert my Delphi application code to a more modern language? https://www.softwaresolved.com/wp-content/themes/corpus/images/empty/thumbnail.jpg 150 150 Mark Reed https://secure.gravatar.com/avatar/25574f0a912de93447eae1bd196219d9?s=96&d=mm&r=g
FAQ: Are there any tools to convert my Delphi application code to a more modern language?
One of the questions we are frequently asked is whether you can use code conversion software to migrate a project from a legacy language to a modern language. This is coming up increasingly in relation to Delphi applications where despite the Delphi product’s continued endurance, resourcing support is becoming increasingly challenging and costly as time moves on.
The short answer to the question above is yes, there are tools to help convert Delphi applications to C#, most notably TurnSharp (by Collabratus) and Delphi2CS (by Netcoole). However, before taking this path, there are a few important things to consider about the potential migration of your application.
Considerations for migrating Delphi applications to modern programming languages such as C#.NET
1. How well written is the Delphi code of your application?
If you know the way your application code structured is poor, or even just outdated (e.g. highly procedural rather than object oriented) then using a code conversion as the basis for your new generation of software code would be very ill-advised.
2. What type of database/data access layer does your Delphi application use?
Many Delphi applications made use of the Borland Database Engine (BDE), a proprietary middleware layer provided with Delphi at the peak of its usage. Whilst TurnSharp does boast the ability to covert code that utilises the BDE, one also has to be aware that the BDE was designed primarily for file-based ISAPI database access. Therefore, many of the component types (e.g. TTable) would result in a very poor-performing application in a client/server database environment.
3. Does your application use 3rd party controls/components?
The success of code conversion tools depends on recognition of VCL (Visual Component Library) components to a great degree. Where a project uses 3rd party components or even custom components developed in-house or specifically for the project, the code conversion will be far less successful.
4. Does the functionality of the application model your business processes (or would you design the software differently with a “blank canvas”)?
Normally we find that applications written in legacy technologies will have a natural drop off in investment as a business looks forward to a replacement, reserving capital to commission the replacement project. Therefore, by the time the replacement project is commissioned, there are often a number of shortcomings with the application as a result of the fact it has not been kept in step with the way the business is operating. These will often result in manual workarounds and additional effort for key members of staff. The blank canvas approach provides much greater opportunity to address these issues.
5. Would your application benefit from being web based (in either a private intranet or public internet context)?
Nearly all Delphi applications we come across are Windows 32 bit client applications. There are a few ISAPI dll’s which drive websites and are built using Delphi, but these are in the minority and in most cases these would not convert at all well (because of their reliance on non-standard VCL components). Therefore one of the decisions that you will normally face when upgrading a Delphi application is whether a web based solution would suit better in the modern era. This is a particularly persuasive approach for most businesses as it eases deployment, makes remote and/or mobile access easier and modern browsers in conjunction with client side script allow a very rich user interface. So the question for a new development project is generally phrased the opposite way around, i.e. is there any compelling reason why the application cannot be web based?
When to use code conversion
You may have gathered by now that code conversion is not something that we would generally advocate, the only scenario in which I can see a good case for it is where you have developed a complex process represented by a well-structured code algorithm which has minimal user intervention and stores application data exclusively in memory rather than using a database, e.g. a file processing service. In that context, there would be a potential benefit of using code conversion.