Workshop Details

The Conference for Delphi & more
November 7 - 9, 2022 | Düsseldorf

Bogdan Polak


30 Oct 2019
13:30 - 17:00
Early bird discount Register until September 22 and save up to 300 € Register now!
This talk originates from the archive. To the CURRENT program

Extracting the VCL spaghetto

30 Oct 2019
13:30 - 17:00

The VCL framework is great and very productive, but legacy projects based on it are difficult to maintain. It’s quicker to just copy and adapt important fragments of source code, but difficult to write unit tests and to refactor. During this workshop you will learn a very safe technique to extract an important code (spaghetto) from a large, legacy VCL project. We will start with the ugly and large OnClick event (spaghetti code) and move it to the TAction class. You will learn how to use basic OOP concepts (abstraction, encapsulation, and inheritance). We will try to deal with the datasets, data modules, and forms. Finally, the code will be almost ready for more difficult refactorings and for the unit tests. We will work with a real VCL Delphi project and the time for theory and slides will be minimal.