[DUG] Embarcadero article
John Bird
johnkbird at paradise.net.nz
Tue Jun 16 13:58:03 NZST 2009
Not sure of the pitfalls etc, but the idea is surely worth pursuing, it is
after all pretty much the holy grail of software. The ability to at least
move a pure VCL over several platfrorms to give native versions on each (or
complile all on Windows for instance) would be wonderful.
The areas where difficulties arise no doubt will be the moment the VCL or
hte programmer wants to start calling win32 stuff, a rewrite of VCL
internally to abstract that sounds like a terrific idea. For the
programmer will there be some even limited ability to call some win32
routines - ie some subset emulated as part of the newer VCL? Maybe maybe
not.
Some thoughts as I use to maintain a codebase of a large number of software
packages that could be recompiled across PDP's, DOS, Windows and SCO Unix:
-the program code was as much as possible written to have no OS IfDefs
in it, what remained where minimal
-anything that was OS variant was abstracted to a library routine that
was internally ifdef'd and recompiled once for that OS in the approprate
version of the library.
-Some entire programs were also largely different versions for each OS,
as they involved generating system commands, mainly programs to do with
backup and printing as the commands used for each were OS specific backup
and printing commands. These programs still shared most of their code base
and the areas that differered were separated out to text command parameter
files.
-Some fixed values most use literal characters for that you did not
think about were also abstracted into constants that were redefined on each
platform, eg CRLF as that differs everywhere.
Considering the intracies of dealing at the low level with PDP terminal
escape sequences, DOS ANSI character sequences for colour and screen
positioning, and Unix termcap entries, it all became a nice uniform
programming environment that did get most of the benefit from each OS visual
features.
So especially if the stuff that really differs from OS to OS can be
abstacted out at least to some degree so that the calling code is the
(mostly) same then this has a real chance of being a winner. I think a
benchmark to aim for is it should be about as easy or difficult as catering
for the existing versions of Windows (98,2000,XP,Vista) and with and without
themes as far as the programmer goes.
This ideally would be an alternative way to virtualising an OS to get cross
platform functionality...
Actually the more I think about it - the more an important an idea this
is!. Hardly anyone else is doing this, Microsoft certainly are not.
Other cross platform languages like Qt or XULRunner (Mozilla) do not have
the userbase of Delphi or have their own specialised area..
Also there is the possibility of getting some serious commercial backig for
such a project, I imagine Skype would be just one of the vendors interested
in supporting a version of Delphi for other OS's - I don't know how they do
the Max and Linux versions so far, but they are always behind the Windows
versions.
I would add to the list of OS-X/Windows/linux also look at mobile
platforms, and if at all possible consider a version for the Web using
Delphi code - might it be possible to run a recompiled version of a Delphi
app as a web page???? If you could do that you may not need the other
native versions of Delphi at all.....My guess however is that current Web
technology is still a long way below native program in functionality and
simplicity.
well Delphi for PHP is there, and ASP already does something similar using
C# code for both program and Web pages......
But surely the future of computing is one super language to use anywhere,
including Web pages, not owned by any one corporation. We may not able to
get there yet, maybe until HTML and Ajax is much more developed, but that
is a goal to not take ones eyes off.
John
More information about the Delphi
mailing list