Extracting the VCL spaghetto
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.