Today I tried to add a block to my code, and it used a different device. This block used three more. And three of them that used used a total of 27 other units.
Since these units were not in the same folder, I had to set up the search path or add 27 units to my demo project so that I could call one of my library functions.
If you think this is extreme, just try SOME of the JEDI JCL or JVCL without using much more.
This is an example of the type of connection that makes you feel like itβs not worth trying to reuse your code.
I think that for my next project, instead of the monolithic dUnit for unit tests, all tests for one reusable code fragment should be built into their own separate executable files, for each class they test, and set to explicitly include the units they need, without including any search folders / libraries that may allow new units to simply be added to the code discreetly. Then I, when someone collects things, they break the unit tests, and we find out that something bad happened.
In any case, it seems to me that this is one way to ensure that your code avoids binding, and that you could write a small or new application and draw into your code only the parts (components, if you want) that you need without a giant train "USE-CLASS-adeni".
Also to Marjan's statement that the One Unit is not the way; Dependencies in the huge Utility division are about to escape. To create any project that uses this Utility module, you will need to have all the blocks in the interface and implementation section.
Keep it simple. Keep it separate. The grip is bad. easy and fun Reuse is only possible if you avoid traction.
source share