Workshop Details

The Conference for Delphi & More
November 2 - 4, 2020 | Meliá Düsseldorf

Bogdan Polak


30 Oct 2019
13:30 - 17:00
Very Early Bird Register until September 3 and save up to € 200! 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.