[DUG] Opinion wanted - is the upgrade from XE5 to XE6 worthwhile
John Bird
johnkbird at paradise.net.nz
Sun Jul 13 18:49:26 NZST 2014
The modern graphical world is a new complexity, but I past years I looked after a code base (not Pascal/Delphi) across 3 operating systems (PDP, Dos/Windows, and Unix) where the code was about 99.5-100% common in a code base of 1 million+ lines.
There we isolated anything that differed in any way across platforms to libraries, and made a wrapper for each with a new invented common name, and inside the wrapper was IFDEF code for each compiler/operating system. The libraries were as much as possible a single code base as well (with ifdefs). That was the crucial design step.
Looking back I can see some of the library routines eg screen output had ifdefs for TSXPL, DBL, SFW, Sibol, SFB, Unix, Debug which covered 5 compilers on 3 operating systems, 4 different compiler vendors (each with different memory models), and different versions of each compiler. Each compiler had quite different syntax extensions to deal with many of the API’s - ( None of these syntax extensions were allowed to be used outside of the libraries). The entire source code base had to be moved to each operating system and compiled there against the appropriate compiler and IFDEF’d library code. However it was very successful for the life of all those operating systems, and is still alive on Windows.
Inside each IFDEF in the library, the code was native, calling the appropriate native APIs. The approach can be described as “Put all the grief and problem stuff in just one place”
How much simpler life and bug fixing gets with a single code base cannot be overstated!
For instance something that misbehaved everywhere meant look in the common code, something that misbehaved only on one platform meant look at the library wrapper routine.
When getting to Android etc projects I am sure as much as feasible I will be taking a similar approach. So it can be done (in theory). In practice I have yet to see!
From: Leigh Wanstead
Hi Jolyon,
Don't you think that 75% common code is a great success?
Regards
Leigh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20140713/e8a0090a/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 96 bytes
Desc: not available
Url : http://listserver.123.net.nz/pipermail/delphi/attachments/20140713/e8a0090a/attachment-0001.gif
More information about the Delphi
mailing list