Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
An old BIG application needs to move on
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00606882
Message ID:
00606962
Vues:
52
Hi,

I had an application I was developing in FoxPro 2.5. It was an accounting program. When Visual FoxPro 3.0 came along I decided to port over to OOP, but I wanted to keep all the functionality I already had in 2.5 version. I decided to use the 2.5 version of the app as a prototype for the new program. In this way I could keep the program as much as possible like the prototype while doing a complete rewrite and adding the enhanced feature of the new OOP language.
I started by setting up code that allowed me to switch beteen lagacy 2.5 code and the OOP as follows:

lee=.T.
if lee && created a new form "client" and completely re-wrote procedural code making sure to include all lecacy functionality.


if wexist([client])
activate form client
else
modify form client
do form client
endif
return

else
***** legacy code ******




endif
return

To start with you might use this method to re-write all procedural code where you are adding clients, vendor, employees, etc. This would give you some experience and provide the time need to climb the learning curve. You might try the Visual FoxPro Form Wizard as a starting place to creating new OOP form to add your parent records like clients, vendor, employee, etc. Make sure each parent record has a unique code for identification proposes.

You can switch lee on or off depending on whether your in development mode working on form "client" or you need to distribute the app before for "client" form is ready. Once you are satisfied that the new form is debugged, you can remove the fork and legacy code. Later you will want to create forms that include one to many relationship where a parent record like a client owns clild records like invoice transactions. Be patient, but persistent, and eventually you will get the app ported. Remember, some procedural code does not need to be ported. Procedural code is small, fast, and efficent when used correctly within an OOP application.


Also, you might want to invest in a framework on which to build so you will have a fundamentally sound structure for the new overall design. There are special step need in starting and shuting down an application under Visual FoxPro for example.
Leland F. Jackson, CPA
Software - Master (TM)
smvfp@mail.smvfp.com
Software Master TM
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform