Converting from FoxPro legacy systems to VFP
Although Visual FoxPro has stayed very compatible with legacy versions of FoxPro
and all versions of FoxPro can share data files, there are some minor
programming problems when you convert an application from a legacy system like
FoxPro for Windows or DOS into Visual FoxPro. Much of the code can be
transported straight from one language to the other but the disadvantage
with this sort of conversion is that it leaves you with a system which
relies on outmoded features.
The immediate effect is not too serious and the familiar behaviour may even be
an advantage. Your application will look very dated but the users will be used
to that. More serious problems arise in the longer term because you
will find it difficult to take full advantage of the new features
of the VFP family.
Compatibility across the FoxPro generations though is very good. As an
extreme example, this is part of a screen shot showing a FoxBase program
we wrote in 1990. The original source files are running in the VFP 9
development environment having had no changes made to them at all. As an
experiment we tried running the original program simultaneously under DOS
in the Windows XP console and found that they could share the same data files
with no problems.
FoxBase was not object oriented and these legacy systems exist as a set of
program (.prg) files which can be compiled into a VFP executable for
distribution to the users. That would get the system running and solve the
immediate problem but the application would be at a dead end in terms of any
future development. If you needed to convert a similar system then the
best tactic might be to rewrite it. This will take some effort but the
good news is that the basic programming language has not changed and you
will be able to reuse much of the logic in functions and procedures.
What's more, you do not have to do it all at once. Visual FoxPro can read
and write data to tables in FoxPro legacy format and the two versions
respect each others' record locks.
The links below discuss six stages of converting a legacy Fox database:
Introduction |
Data
|
Program code
|
Menus
|
Reports
|
Screens
|
Strategy
|