sunnuntai 21. kesäkuuta 2020

Delphi is still a valuable programming language

Past few years, I have been using a lot of C# and JavaScript. Writing backend code and API using ASP.NET Core and client applications using Angular. C#/.NET Core and JavaScript/TypeScript are great languages, but Delphi still has its place.

Soluling localization tool has four parts: the GUI tool, the command-line tool, browser app, and the cloud service. Delphi is used in GUI and command-line tools. The big difference between Soluling and other modern localization tools/services is that in Soluling, the file scanning, string extraction and localized files creating happens locally on the developer's machine or on the build server. As we know, three operating systems are used in the build process: Windows, Linux, and macOS. So we needed a programming language that can handle all these in the same code base. There are several possible choices here: Python, Java, JavaScript, .NET Core, and Delphi! Yes, the Delphi compiler can create native code from the same source code for Windows, Linux and Mac.

Traditionally Delphi has been a great tool to create Windows desktop applications. This is why it was a good choice to create Soluling's GUI tool. However, the command-line tool needs the same classes as the GUI minus the UI part. When we started the Soluling project, Delphi did not support Linux, only Windows, and macOS. We hoped that Linux support would come, and soon it did. We also considered Java and Python, but because for both of them, building GUI is so much harder than with Delphi, we chose Delphi.

Now when we are implementing the cloud version, we use C# and Delphi. All the normal backend code like API, DB access is done in C# ASP.NET Core, but the file scanning, string extraction and file building is using the same Delphi code as Soluling GUI and Soluling command line. The shared code size is huge. Because we support more than 100 file formats and database formats we have hundredths of classes totaling almost 700 000 lines of code. This is all none UI code. With desktop and web UI it is almost double. the only place where we do not use Delphi is the browser app where we use Angular.

Using Delphi, we can reuse the same code in three places: GUI, command line and cloud. Soluling's customers can use the Soluling command-line on Windows, Linux and Mac. The GUI version is still Windows only and probably will stay like that.

Ei kommentteja: