Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OOP recommendations, please
Message
De
22/06/2000 20:07:08
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
OOP recommendations, please
Divers
Thread ID:
00383528
Message ID:
00383528
Vues:
64
Hi,

I have a large app that I am moving to VFP. I have been doing things in a very non OOP way.

Frequently used routines reside in the start up program, in a procedure file, or in separate files if they are large. Setup code for reports resides right in menu snippets. There are also a lot of calculation routines in the procedure section of the forms that need those calculations.

Lastly, I use global variables to hold some frequently used values that I do not wish to fish repeatedly from the parameter table.

I wish to follow good OOP practice. A friend suggested three main objects: oApp, oBiz, and oDS (for data services). While these are good classifications those objects will quickly become bloated and it will be hard to find things.

I am thinking of adding the following objects:

1) oCalc. To hold calculation methods. One method, for example, may calculate accrued vacation.

2) oReports. Its methods would setup reports as well as call the report itself.

3) oValues or something like that to hold a bunch of values that I need quick access to. These are awfully much like global variables, but at least they are loaded upon object instantiation and therefore are more standalone.

What are natural subcategories that people use ?

TIA,

Alex
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform